|
|
|
@ -370,6 +370,7 @@ QString UBTrapFlashController::generateFullPageHtml(const QString& pDirPath, boo |
|
|
|
|
QString UBTrapFlashController::generateHtml(const UBWebKitUtils::HtmlObject& pObject, |
|
|
|
|
const QString& pDirPath, bool pGenerateFile) |
|
|
|
|
{ |
|
|
|
|
qDebug() << pObject.source; |
|
|
|
|
QUrl objectUrl(pObject.source); |
|
|
|
|
QString objectFullUrl = pObject.source; |
|
|
|
|
if (!objectUrl.isValid()) |
|
|
|
@ -471,9 +472,13 @@ QString UBTrapFlashController::generateHtml(const UBWebKitUtils::HtmlObject& pOb |
|
|
|
|
|
|
|
|
|
QString UBTrapFlashController::widgetNameForObject(UBWebKitUtils::HtmlObject pObject) |
|
|
|
|
{ |
|
|
|
|
int lastSlashIndex = pObject.source.lastIndexOf("/"); |
|
|
|
|
QString url = pObject.source; |
|
|
|
|
int parametersIndex = url.indexOf("?"); |
|
|
|
|
if(parametersIndex != -1) |
|
|
|
|
url = url.left(parametersIndex); |
|
|
|
|
int lastSlashIndex = url.lastIndexOf("/"); |
|
|
|
|
|
|
|
|
|
QString result = pObject.source.right(pObject.source.length() - lastSlashIndex); |
|
|
|
|
QString result = url.right(url.length() - lastSlashIndex); |
|
|
|
|
result = UBFileSystemUtils::cleanName(result); |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|