Replace qDebug() by report_info() in qt-init.cpp

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-03-26 15:42:31 +01:00 committed by bstoeger
parent 9923d49624
commit 47254d91e0

View file

@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
#include <QApplication> #include <QApplication>
#include <Qt>
#include <QNetworkProxy> #include <QNetworkProxy>
#include <QLibraryInfo> #include <QLibraryInfo>
#include <QTextCodec> #include <QTextCodec>
@ -33,9 +32,9 @@ void init_qt_late()
if (settings_suffix) { if (settings_suffix) {
if (verbose) if (verbose)
#if defined(SUBSURFACE_MOBILE) && ((defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || (defined(Q_OS_DARWIN) && !defined(Q_OS_IOS))) #if defined(SUBSURFACE_MOBILE) && ((defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || (defined(Q_OS_DARWIN) && !defined(Q_OS_IOS)))
qDebug() << "using custom config for" << QString("Subsurface-Mobile-%1").arg(settings_suffix); report_info("using custom config for Subsurface-Mobile-%s", settings_suffix);
#else #else
qDebug() << "using custom config for" << QString("Subsurface-%1").arg(settings_suffix); report_info("using custom config for Subsurface-%s", settings_suffix);
#endif #endif
#if defined(SUBSURFACE_MOBILE) && ((defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || (defined(Q_OS_DARWIN) && !defined(Q_OS_IOS))) #if defined(SUBSURFACE_MOBILE) && ((defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || (defined(Q_OS_DARWIN) && !defined(Q_OS_IOS)))
QCoreApplication::setApplicationName(QString("Subsurface-Mobile-%1").arg(settings_suffix)); QCoreApplication::setApplicationName(QString("Subsurface-Mobile-%1").arg(settings_suffix));
@ -93,7 +92,7 @@ void init_qt_late()
qtTranslator.load(loc, "qt", "_", getSubsurfaceDataPath("../translations"))) { qtTranslator.load(loc, "qt", "_", getSubsurfaceDataPath("../translations"))) {
application->installTranslator(&qtTranslator); application->installTranslator(&qtTranslator);
} else { } else {
qDebug() << "can't find Qt base localization for locale" << uiLang << "searching in" << translationLocation; report_info("can't find Qt base localization for locale %s searching in %s", qPrintable(uiLang), qPrintable(translationLocation));
} }
} }
} }
@ -117,10 +116,10 @@ void init_qt_late()
parentLanguageTranslator.load(parentLoc, "subsurface", "_", getSubsurfaceDataPath("translations")) || parentLanguageTranslator.load(parentLoc, "subsurface", "_", getSubsurfaceDataPath("translations")) ||
parentLanguageTranslator.load(parentLoc, "subsurface", "_", getSubsurfaceDataPath("../translations"))) { parentLanguageTranslator.load(parentLoc, "subsurface", "_", getSubsurfaceDataPath("../translations"))) {
if (verbose) if (verbose)
qDebug() << "loading" << parentLoc.name() << "translations"; report_info("loading %s translations", qPrintable(parentLoc.name()));
application->installTranslator(&parentLanguageTranslator); application->installTranslator(&parentLanguageTranslator);
} else { } else {
qDebug() << "can't find Subsurface localization for locale" << parentLoc.name(); report_info("can't find Subsurface localization for locale %s", qPrintable(parentLoc.name()));
} }
} }
@ -130,9 +129,9 @@ void init_qt_late()
ssrfTranslator.load(loc, "subsurface", "_", getSubsurfaceDataPath("translations")) || ssrfTranslator.load(loc, "subsurface", "_", getSubsurfaceDataPath("translations")) ||
ssrfTranslator.load(loc, "subsurface", "_", getSubsurfaceDataPath("../translations"))) { ssrfTranslator.load(loc, "subsurface", "_", getSubsurfaceDataPath("../translations"))) {
if (verbose) if (verbose)
qDebug() << "loading" << uiLang << "translations"; report_info("loading %s translations", qPrintable(uiLang));
application->installTranslator(&ssrfTranslator); application->installTranslator(&ssrfTranslator);
} else { } else {
qDebug() << "can't find Subsurface localization for locale" << uiLang; report_info("can't find Subsurface localization for locale %s", qPrintable(uiLang));
} }
} }