summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp8
-rw-r--r--src/plugins/iconengines/svgiconengine/qsvgiconengine.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp b/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
index 2644326..734f4bb 100644
--- a/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
+++ b/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
@@ -375,6 +375,14 @@ bool QSvgIconEngine::write(QDataStream &out) const
return true;
}
+void QSvgIconEngine::virtual_hook(int id, void *data)
+{
+ if (id == QIconEngine::IsNullHook) {
+ *reinterpret_cast<bool*>(data) = d->svgFiles.isEmpty() && !d->addedPixmaps;
+ }
+ QIconEngine::virtual_hook(id, data);
+}
+
QT_END_NAMESPACE
#endif // QT_NO_SVGRENDERER
diff --git a/src/plugins/iconengines/svgiconengine/qsvgiconengine.h b/src/plugins/iconengines/svgiconengine/qsvgiconengine.h
index cf4f255..672828c 100644
--- a/src/plugins/iconengines/svgiconengine/qsvgiconengine.h
+++ b/src/plugins/iconengines/svgiconengine/qsvgiconengine.h
@@ -70,6 +70,7 @@ public:
bool read(QDataStream &in) override;
bool write(QDataStream &out) const override;
+ void virtual_hook(int id, void *data) override;
private:
QSharedDataPointer<QSvgIconEnginePrivate> d;
};