[pim/trojita] src/UiUtils: Fix Clazy level 0 warning

Espen Sandøy Hustad <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 33f8c62da9c90118f587f646e60a14576960ee2b by Espen Sandøy Hustad.
Committed on 22/07/2026 at 16:25.
Pushed by ehustad into branch 'master'.

Fix Clazy level 0 warning

Fix warning: Use the static QFileInfo::exists() instead.
It's documented to be faster. [-Wclazy-qfileinfo-exists]

M  +1    -1    src/UiUtils/IconLoader.cpp

https://invent.kde.org/pim/trojita/-/commit/33f8c62da9c90118f587f646e60a14576960ee2b

diff --git a/src/UiUtils/IconLoader.cpp b/src/UiUtils/IconLoader.cpp
index 0db7ed4a5..6d7319432 100644
--- a/src/UiUtils/IconLoader.cpp
+++ b/src/UiUtils/IconLoader.cpp
@@ -62,7 +62,7 @@ QIcon loadIcon(const QString &name)
         return *it;
 
     auto overrideIcon = QStringLiteral(":/icons/%1/%2.svg").arg(QIcon::themeName(), name);
-    if (QFileInfo(overrideIcon).exists()) {
+    if (QFileInfo::exists(overrideIcon)) {
         QIcon icon(overrideIcon);
         iconDict()->insert(name, icon);
         return icon;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.