summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qiconengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qiconengine.cpp')
-rw-r--r--src/gui/image/qiconengine.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/image/qiconengine.cpp b/src/gui/image/qiconengine.cpp
index c09933d45f..7411dbb054 100644
--- a/src/gui/image/qiconengine.cpp
+++ b/src/gui/image/qiconengine.cpp
@@ -150,6 +150,11 @@ void QIconEngine::addFile(const QString &/*fileName*/, const QSize &/*size*/, QI
icon, for example when instantiating an icon using
QIcon::fromTheme().
+ \value IsNullHook Allow to query if this engine represents a null
+ icon. The \a data argument of the virtual_hook() is a pointer to a
+ bool that can be set to true if the icon is null. This enum value
+ was added in Qt 5.7.
+
\sa virtual_hook()
*/
@@ -283,4 +288,16 @@ QString QIconEngine::iconName() const
return name;
}
+/*!
+ \since 5.7
+
+ Returns true if this icon engine represent a null QIcon.
+ */
+bool QIconEngine::isNull() const
+{
+ bool isNull = false;
+ const_cast<QIconEngine *>(this)->virtual_hook(QIconEngine::IsNullHook, &isNull);
+ return isNull;
+}
+
QT_END_NAMESPACE