diff options
author | Robin Burchell <robin+qt@viroteck.net> | 2012-06-23 09:15:10 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-02 06:09:21 +0200 |
commit | dfb39b0a78efcceb117b237d9f97b1d03a7174ba (patch) | |
tree | 32ae7904e0b61c0ffd3a2166457b67cf368d1dff /src/quick/items/qquickimagebase.cpp | |
parent | 2d1c7f6348943b9adbab3b940d17896c15636156 (diff) |
Remove QQuickImageBase's explicitSourceSize.
The only case where this really did anything was in resetSourceSize() to avoid
resetting if it had not been set already, but this logic is already in
setSourceSize too, so it's really not useful.
Done-with: John Brooks <john.brooks@dereferenced.net>
Change-Id: Idb86686ea5ab711ceb2390e3703e0e04f7d537bb
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/quick/items/qquickimagebase.cpp')
-rw-r--r-- | src/quick/items/qquickimagebase.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/quick/items/qquickimagebase.cpp b/src/quick/items/qquickimagebase.cpp index 735910e7ff..798050d776 100644 --- a/src/quick/items/qquickimagebase.cpp +++ b/src/quick/items/qquickimagebase.cpp @@ -118,7 +118,6 @@ void QQuickImageBase::setSourceSize(const QSize& size) return; d->sourcesize = size; - d->explicitSourceSize = true; emit sourceSizeChanged(); if (isComponentComplete()) load(); @@ -135,14 +134,7 @@ QSize QQuickImageBase::sourceSize() const void QQuickImageBase::resetSourceSize() { - Q_D(QQuickImageBase); - if (!d->explicitSourceSize) - return; - d->explicitSourceSize = false; - d->sourcesize = QSize(); - emit sourceSizeChanged(); - if (isComponentComplete()) - load(); + setSourceSize(QSize()); } bool QQuickImageBase::cache() const @@ -209,7 +201,7 @@ void QQuickImageBase::load() options |= QQuickPixmap::Cache; d->pix.clear(this); pixmapChange(); - d->pix.load(qmlEngine(this), d->url, d->explicitSourceSize ? sourceSize() : QSize(), options); + d->pix.load(qmlEngine(this), d->url, d->sourcesize, options); if (d->pix.isLoading()) { d->progress = 0.0; |