From 510224f4463c2a372b83d91f0daf24a91069a9fe Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 20 Jul 2023 02:35:53 +0200 Subject: [PATCH] QIconLoader: add some more debugging help As a drive-by, re-use the result from the first QFile::exists check. Pick-to: 6.6 Change-Id: I6b36b165ba3d1f82c9b4be18d44a671f71e8507e Reviewed-by: Axel Spoerl Reviewed-by: Qt CI Bot --- src/gui/image/qiconloader.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index b228173e9d2..7eb4dcd97e9 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -359,12 +359,12 @@ QIconTheme::QIconTheme(const QString &themeName) if (!m_valid) { themeIndex.setFileName(themeDir + "/index.theme"_L1); - if (themeIndex.exists()) - m_valid = true; + m_valid = themeIndex.exists(); + qCDebug(lcIconLoader) << "Probing theme file at" << themeIndex.fileName() << m_valid; } } #if QT_CONFIG(settings) - if (themeIndex.exists()) { + if (m_valid) { const QSettings indexReader(themeIndex.fileName(), QSettings::IniFormat); const QStringList keys = indexReader.allKeys(); for (const QString &key : keys) { @@ -433,7 +433,8 @@ QThemeIconInfo QIconLoader::findIconHelper(const QString &themeName, const QString &iconName, QStringList &visited) const { - qCDebug(lcIconLoader) << "Finding icon" << iconName << "in theme" << themeName; + qCDebug(lcIconLoader) << "Finding icon" << iconName << "in theme" << themeName + << "skipping" << visited; QThemeIconInfo info; Q_ASSERT(!themeName.isEmpty());