summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qpixmapcache.cpp10
-rw-r--r--src/gui/image/qpixmapcache.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 71a79745e8..04e1d442b0 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -156,6 +156,16 @@ bool QPixmapCache::Key::operator ==(const Key &key) const
*/
/*!
+ Returns \c true if there is a cached pixmap associated with this key.
+ Otherwise, if pixmap was flushed, the key is no longer valid.
+ \since 5.7
+*/
+bool QPixmapCache::Key::isValid() const Q_DECL_NOTHROW
+{
+ return d && d->isValid;
+}
+
+/*!
\internal
*/
QPixmapCache::Key &QPixmapCache::Key::operator =(const Key &other)
diff --git a/src/gui/image/qpixmapcache.h b/src/gui/image/qpixmapcache.h
index 37a0588e06..ca18f299a7 100644
--- a/src/gui/image/qpixmapcache.h
+++ b/src/gui/image/qpixmapcache.h
@@ -59,6 +59,7 @@ public:
Key &operator =(const Key &other);
void swap(Key &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
+ bool isValid() const Q_DECL_NOTHROW;
private:
KeyData *d;