Commit 786ae035 authored by Yimgo's avatar Yimgo

Modifications from cfd4f8d1 merged.

parent fa5fa92b
...@@ -110,7 +110,7 @@ void UBGraphicsWidgetItem::initialize() ...@@ -110,7 +110,7 @@ void UBGraphicsWidgetItem::initialize()
connect(page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(javaScriptWindowObjectCleared())); connect(page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(javaScriptWindowObjectCleared()));
connect(page(), SIGNAL(geometryChangeRequested(const QRect&)), this, SLOT(geometryChangeRequested(const QRect&))); connect(page(), SIGNAL(geometryChangeRequested(const QRect&)), this, SLOT(geometryChangeRequested(const QRect&)));
connect(page(), SIGNAL(loadFinished(bool)), this, SLOT(mainFrameLoadFinished (bool))); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(mainFrameLoadFinished (bool)));
} }
QUrl UBGraphicsWidgetItem::mainHtml() QUrl UBGraphicsWidgetItem::mainHtml()
...@@ -566,18 +566,15 @@ void UBGraphicsWidgetItem::paint( QPainter *painter, const QStyleOptionGraphicsI ...@@ -566,18 +566,15 @@ void UBGraphicsWidgetItem::paint( QPainter *painter, const QStyleOptionGraphicsI
{ {
if (mIsFrozen) if (mIsFrozen)
painter->drawPixmap(0, 0, mSnapshot); painter->drawPixmap(0, 0, mSnapshot);
else if(mIsTakingSnapshot || (mInitialLoadDone && !mLoadIsErronous)) else
QGraphicsWebView::paint(painter, option, widget); QGraphicsWebView::paint(painter, option, widget);
else { if (!mInitialLoadDone || mLoadIsErronous) {
QString message = tr("Loading ..."); QString message;
/* this is the right way of doing but we receive two callback and the one return always that the if (mInitialLoadDone && mLoadIsErronous)
* load as failed... to check
if (mLoadIsErronous)
message = tr("Cannot load content"); message = tr("Cannot load content");
else else
message = tr("Loading ..."); message = tr("Loading ...");
*/
painter->setFont(QFont("Arial", 12)); painter->setFont(QFont("Arial", 12));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment