summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-04-17 17:02:46 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-04-17 18:19:07 +0200
commit164110f7bbea7345de709edd092afa84fdde232c (patch)
tree7d352657c0c8ed94702ad121b8d0d9e4bdb71c4f
parentcd41b01f32104a484db53e8a1ea913d596c939c7 (diff)
Warn when trying to load an icon without a matching icon engine
A typical case is trying to load an SVG icon without the QtSvg module built. You want to know what's going on instead of trying to debug why the icon doesn't produce any valid images. Change-Id: I4418ad758a1232f1394058368c50e0d87235271e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--src/gui/image/qicon.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 41fe649fc5..562e5e9a3e 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -1049,6 +1049,8 @@ static QIconEngine *iconEngineFromSuffix(const QString &fileName, const QString
}
}
}
+ qWarning("Could not find icon engine for suffix '%s' of file '%s'",
+ qUtf8Printable(suffix), qUtf8Printable(fileName));
return nullptr;
}