From 846b6a115bf1574deaef6e37d9e2f33fad649a59 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 28 Aug 2023 19:56:40 +0200 Subject: [PATCH] qDebug() output resulted in application installer showing warnings --- platformthemeplugin/hintsettings.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/platformthemeplugin/hintsettings.cpp b/platformthemeplugin/hintsettings.cpp index bdde95d..84e99c8 100644 --- a/platformthemeplugin/hintsettings.cpp +++ b/platformthemeplugin/hintsettings.cpp @@ -1,6 +1,5 @@ #include "hintsettings.h" -#include #include #include #include @@ -19,6 +18,7 @@ #include #include #include +#include static const QByteArray s_systemFontName = QByteArrayLiteral("Font"); static const QByteArray s_systemFixedFontName = QByteArrayLiteral("FixedFont"); @@ -62,32 +62,32 @@ HintsSettings::HintsSettings(QObject *parent) QString defaultIconTheme; for (const QString &iconThemePath : iconThemePaths) { - qDebug() << "iconThemePath" << iconThemePath; + // qDebug() << "iconThemePath" << iconThemePath; QDir defaultDir(resolveSymlink(iconThemePath + "/default")); - qDebug() << "defaultDir" << defaultDir.path(); + // qDebug() << "defaultDir" << defaultDir.path(); if (!defaultDir.exists()) { - qDebug() << "defaultDir" << defaultDir.path() << "does not exist"; + // qDebug() << "defaultDir" << defaultDir.path() << "does not exist"; defaultIconTheme = "hicolor"; } QFile indexThemeFile(resolveSymlink(defaultDir.path() + "/index.theme")); if (indexThemeFile.exists()) { - qDebug() << "indexThemeFile" << indexThemeFile.fileName(); + // qDebug() << "indexThemeFile" << indexThemeFile.fileName(); QFile file(indexThemeFile.fileName()); if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { QTextStream in(&file); while (!in.atEnd()) { QString line = in.readLine(); if (line.startsWith("Name=")) { - qDebug() << "line" << line; + // qDebug() << "line" << line; QString themeNameFromFile = line.mid(5); // Remove "Name=" QDir themesDir(resolveSymlink(iconThemePath)); QDirIterator it(themesDir.path(), QDir::Dirs | QDir::NoDotAndDotDot, QDirIterator::NoIteratorFlags); while (it.hasNext()) { QString subDir = it.next(); - qDebug() << "subDir" << subDir; + // qDebug() << "subDir" << subDir; // If it is a symlink, resolve it if (QFileInfo(subDir).isSymLink()) { subDir = resolveSymlink(subDir); @@ -107,17 +107,17 @@ HintsSettings::HintsSettings(QObject *parent) if (subDir.contains("_cursors")) { continue; } - qDebug() << "subIndexThemeFile" << subIndexThemeFile.fileName(); + // qDebug() << "subIndexThemeFile" << subIndexThemeFile.fileName(); QFile subFile(subIndexThemeFile.fileName()); if (subFile.open(QIODevice::ReadOnly | QIODevice::Text)) { QTextStream subIn(&subFile); while (!subIn.atEnd()) { QString subLine = subIn.readLine(); if (subLine.startsWith("Name=")) { - qDebug() << "Comparing to" << subLine; + // qDebug() << "Comparing to" << subLine; QString themeNameFromSubFile = subLine.mid(5); // Remove "Name=" if (themeNameFromFile == themeNameFromSubFile) { - qDebug() << "Found default icon theme" << themeNameFromFile << "in" << subDir; + // qDebug() << "Found default icon theme" << themeNameFromFile << "in" << subDir; // defaultIconTheme = themeNameFromSubFile; // Breeze // Actually the directory is called breeze, so we need to use the subDir; // is this a bug in how Qt finds the icon theme? @@ -128,7 +128,7 @@ HintsSettings::HintsSettings(QObject *parent) } } } else { - qDebug() << "subIndexThemeFile" << subIndexThemeFile.fileName() << "does not exist"; + // qDebug() << "subIndexThemeFile" << subIndexThemeFile.fileName() << "does not exist"; } } } @@ -137,9 +137,9 @@ HintsSettings::HintsSettings(QObject *parent) } } - qDebug() << "defaultIconTheme" << defaultIconTheme; + // qDebug() << "defaultIconTheme" << defaultIconTheme; if (defaultIconTheme.isEmpty()) { - qDebug() << "Falling back to hicolor icon theme"; + // qDebug() << "Falling back to hicolor icon theme"; defaultIconTheme = "hicolor"; }