Minor: add some additional debug output

This commit is contained in:
Gerhard Hoffmann 2024-01-10 09:58:37 +01:00
parent d521fd977a
commit 854c8b9706

View File

@ -128,12 +128,20 @@ void CommandLineParser::readSettings() {
QString const iniFileDir = m_parser.value(m_iniFileDirectoryOption); QString const iniFileDir = m_parser.value(m_iniFileDirectoryOption);
QString const iniFileName = m_parser.value(m_iniFileNameOption); QString const iniFileName = m_parser.value(m_iniFileNameOption);
m_iniFileName = QDir::cleanPath(iniFileDir + QDir::separator() + iniFileName); m_iniFileName = QDir::cleanPath(iniFileDir + QDir::separator() + iniFileName);
qCritical() << __PRETTY_FUNCTION__ << " iniFileDir" << iniFileDir;
qCritical() << __PRETTY_FUNCTION__ << "iniFileName" << m_iniFileName;
if (!m_iniFileName.isEmpty()) { if (!m_iniFileName.isEmpty()) {
if (QFile(m_iniFileName).exists()) { if (QFile(m_iniFileName).exists()) {
QSettings settings(m_iniFileName, QSettings::IniFormat); QSettings settings(m_iniFileName, QSettings::IniFormat);
QStringList keys = settings.allKeys(); QStringList keys = settings.allKeys();
for (QString const &key: keys) { for (QString const &key: keys) {
QVariant v = settings.value(key); QVariant v = settings.value(key);
qCritical() << __PRETTY_FUNCTION__
<< key << " -> " << v.toString();
if (key.contains("repository-url")) { if (key.contains("repository-url")) {
m_repositoryUrl = v.toString(); m_repositoryUrl = v.toString();
} else } else
@ -166,8 +174,14 @@ void CommandLineParser::readSettings() {
} else } else
if (key.contains("plugin-name")) { if (key.contains("plugin-name")) {
m_plugInName = v.toString(); m_plugInName = v.toString();
} else {
qCritical() << __PRETTY_FUNCTION__
<< key << " -> (UNKNOWN) " << v.toString();
} }
} }
} else {
qCritical() << __PRETTY_FUNCTION__ << "iniFileName" << m_iniFileName
<< "DOES NOT EXIST";
} }
} }
} }
@ -238,7 +252,9 @@ bool CommandLineParser::extendedVersion() {
bool CommandLineParser::alwaysDownloadConfig() { bool CommandLineParser::alwaysDownloadConfig() {
if (m_parser.isSet(m_alwaysDownloadConfigOption)) { if (m_parser.isSet(m_alwaysDownloadConfigOption)) {
m_alwaysDownloadConfig = m_parser.value(m_alwaysDownloadConfigOption); m_alwaysDownloadConfig = m_parser.value(m_alwaysDownloadConfigOption);
qCritical() << "m_alwaysDownloadConfigOption IS SET" << m_alwaysDownloadConfig;
} }
qCritical() << "m_alwaysDownloadConfig" << m_alwaysDownloadConfig;
return m_alwaysDownloadConfig == "false" ? false : true; return m_alwaysDownloadConfig == "false" ? false : true;
} }