aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickpixmapcache.cpp
diff options
context:
space:
mode:
authorOleg Shparber <trollixx@gmail.com>2014-07-07 14:56:38 -0700
committerOleg Shparber <trollixx@gmail.com>2014-10-02 00:58:12 +0200
commite076b8620367623b59309dd0a9cfdae18b13165a (patch)
tree4f2a53710be1a519cdf0922f60dede8284ed4703 /src/quick/util/qquickpixmapcache.cpp
parent667728a9da5331dad253d047153daec8a2c1ff55 (diff)
QQuickPixmapStore: Don't start expiration timer when application quits
This change removes a warning printed during application closing stage about a timer started not from QThread. Change-Id: I93ca4da7066bd5e0784509676bc59969a8e2ad48 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/util/qquickpixmapcache.cpp')
-rw-r--r--src/quick/util/qquickpixmapcache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp
index 818e6fb2bf..3e94d0cea6 100644
--- a/src/quick/util/qquickpixmapcache.cpp
+++ b/src/quick/util/qquickpixmapcache.cpp
@@ -804,8 +804,10 @@ void QQuickPixmapStore::unreferencePixmap(QQuickPixmapData *data)
shrinkCache(-1); // Shrink the cache in case it has become larger than cache_limit
- if (m_timerId == -1 && m_unreferencedPixmaps && !m_destroying)
+ if (m_timerId == -1 && m_unreferencedPixmaps
+ && !m_destroying && !QCoreApplication::closingDown()) {
m_timerId = startTimer(CACHE_EXPIRE_TIME * 1000);
+ }
}
void QQuickPixmapStore::referencePixmap(QQuickPixmapData *data)