diff options
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetext.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetext.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 9fcfd92..a95c930 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -77,7 +77,7 @@ protected: if (type == QTextDocument::ImageResource) { QPixmap pm; QString errorString; - QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(url, &pm, &errorString, 0, true, 0, 0); + QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(url, &pm, &errorString, 0, false, 0, 0); if (status == QDeclarativePixmapReply::Ready) return pm; if (status == QDeclarativePixmapReply::Error) { @@ -89,7 +89,6 @@ protected: QDeclarativePixmapReply *reply = QDeclarativePixmapCache::request(qmlEngine(parent()), url); connect(reply, SIGNAL(finished()), this, SLOT(requestFinished())); outstanding++; - static_cast<QDeclarativeText*>(parent())->reloadWithResources(); } } @@ -100,7 +99,8 @@ private slots: void requestFinished() { outstanding--; - static_cast<QDeclarativeText*>(parent())->reloadWithResources(); + if (outstanding == 0) + static_cast<QDeclarativeText*>(parent())->reloadWithResources(); } private: @@ -968,17 +968,13 @@ void QDeclarativeText::reloadWithResources() Q_D(QDeclarativeText); if (!d->richText) return; - if (resourcesLoading()!=0) - return; - emit resourcesLoadingChanged(); d->doc->setHtml(d->text); d->updateLayout(); d->markImgDirty(); } /*! - \qmlproperty int Text::resourcesLoading - This property is the number of resources (images) that are being loaded asynchronously. + Returns the number of resources (images) that are being loaded asynchronously. */ int QDeclarativeText::resourcesLoading() const { @@ -986,7 +982,6 @@ int QDeclarativeText::resourcesLoading() const return d->doc ? d->doc->resourcesLoading() : 0; } - void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) { Q_D(QDeclarativeText); |