From 6bee9a679df3f0d9f106cad21c924520221d6c21 Mon Sep 17 00:00:00 2001 From: chenhongtao Date: Fri, 22 Sep 2023 17:24:23 +0800 Subject: [PATCH] fix: when iconName is absolute path Log: --- src/util/dicontheme.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/dicontheme.cpp b/src/util/dicontheme.cpp index c31db9d1..b78298c0 100644 --- a/src/util/dicontheme.cpp +++ b/src/util/dicontheme.cpp @@ -95,6 +95,9 @@ QIconEngine *DIconTheme::createIconEngine(const QString &iconName, Options optio QIcon DIconTheme::findQIcon(const QString &iconName, Options options) { + if (QDir::isAbsolutePath(iconName)) { + return QIcon(iconName); + } auto engine = createIconEngine(iconName, options); // fallback to QIcon::fromTheme if (!options.testFlag(DontFallbackToQIconFromTheme) && !engine)