|
|
@ -119,7 +119,8 @@ void UBGraphicsWidgetItem::initialize() |
|
|
|
|
|
|
|
|
|
|
|
void UBGraphicsWidgetItem::onLinkClicked(const QUrl& url) |
|
|
|
void UBGraphicsWidgetItem::onLinkClicked(const QUrl& url) |
|
|
|
{ |
|
|
|
{ |
|
|
|
UBApplication::webController->loadUrl(url); |
|
|
|
//UBApplication::webController->loadUrl(url);
|
|
|
|
|
|
|
|
load(url); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBGraphicsWidgetItem::initialLayoutCompleted() |
|
|
|
void UBGraphicsWidgetItem::initialLayoutCompleted() |
|
|
@ -147,24 +148,6 @@ QString UBGraphicsWidgetItem::mainHtmlFileName() |
|
|
|
return mMainHtmlFileName; |
|
|
|
return mMainHtmlFileName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool UBGraphicsWidgetItem::hasEmbededObjects() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (page()->mainFrame()) { |
|
|
|
|
|
|
|
QList<UBWebKitUtils::HtmlObject> htmlObjects = UBWebKitUtils::objectsInFrame(page()->mainFrame()); |
|
|
|
|
|
|
|
return htmlObjects.length() > 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool UBGraphicsWidgetItem::hasEmbededFlash() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (hasEmbededObjects()) |
|
|
|
|
|
|
|
return page()->mainFrame()->toHtml().contains("application/x-shockwave-flash"); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool UBGraphicsWidgetItem::canBeContent() |
|
|
|
bool UBGraphicsWidgetItem::canBeContent() |
|
|
|
{ |
|
|
|
{ |
|
|
|
// if we under MAC OS
|
|
|
|
// if we under MAC OS
|
|
|
@ -886,9 +869,6 @@ UBGraphicsW3CWidgetItem::UBGraphicsW3CWidgetItem(const QUrl& pWidgetUrl, QGraphi |
|
|
|
/* is it a valid local file ? */ |
|
|
|
/* is it a valid local file ? */ |
|
|
|
QFile f(mMainHtmlUrl.toLocalFile()); |
|
|
|
QFile f(mMainHtmlUrl.toLocalFile()); |
|
|
|
|
|
|
|
|
|
|
|
qDebug() << mMainHtmlFileName; |
|
|
|
|
|
|
|
qDebug() << mMainHtmlUrl.toLocalFile(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!f.exists()) |
|
|
|
if(!f.exists()) |
|
|
|
mMainHtmlUrl = QUrl(mMainHtmlFileName); |
|
|
|
mMainHtmlUrl = QUrl(mMainHtmlFileName); |
|
|
|
|
|
|
|
|
|
|
|