From 164110f7bbea7345de709edd092afa84fdde232c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 17 Apr 2020 17:02:46 +0200 Subject: [PATCH] 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 --- src/gui/image/qicon.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; }