From 530fdb48d0519844c423f6e9b8259d0f16a864f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Fri, 17 Jan 2025 12:31:35 +0100 Subject: [PATCH] Uncomment defaults, include main category. --- cockatrice/resources/config/qtlogging.ini | 17 ++++++++--------- cockatrice/src/main.cpp | 6 +++--- cockatrice/src/main.h | 1 + 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cockatrice/resources/config/qtlogging.ini b/cockatrice/resources/config/qtlogging.ini index 5e76390e9..dc8524798 100644 --- a/cockatrice/resources/config/qtlogging.ini +++ b/cockatrice/resources/config/qtlogging.ini @@ -1,13 +1,13 @@ [Rules] # Uncomment a rule to disable logging for that category +# main = false # qt_translator = false - -window_main.* = false -release_channel = false -spoiler_background_updater = false -theme_manager = false -sound_engine = false +# window_main.* = false +# release_channel = false +# spoiler_background_updater = false +# theme_manager = false +# sound_engine = false # tapped_out_interface = false # tab_game = false @@ -31,14 +31,13 @@ sound_engine = false # user_info_connection = false -picture_loader.* = false # picture_loader = false # picture_loader.worker = false # deck_loader = false # card_database = false -card_database.loading = false +# card_database.loading = false # card_database.loading.success_or_failure = false -cockatrice_xml.* = false +# cockatrice_xml.* = false # cockatrice_xml.xml_3_parser = false # cockatrice_xml.xml_4_parser = false # set_list = false diff --git a/cockatrice/src/main.cpp b/cockatrice/src/main.cpp index 1ed258f5a..ef58d242d 100644 --- a/cockatrice/src/main.cpp +++ b/cockatrice/src/main.cpp @@ -194,13 +194,13 @@ int main(int argc, char *argv[]) QLocale::setDefault(QLocale::English); - qDebug("main(): starting main program"); + qCDebug(MainLog) << "main(): starting main program"; MainWindow ui; if (parser.isSet("connect")) { ui.setConnectTo(parser.value("connect")); } - qDebug("main(): MainWindow constructor finished"); + qCDebug(MainLog) << "main(): MainWindow constructor finished"; ui.setWindowIcon(QPixmap("theme:cockatrice")); #if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) @@ -215,7 +215,7 @@ int main(int argc, char *argv[]) SpoilerBackgroundUpdater spoilerBackgroundUpdater; ui.show(); - qDebug("main(): ui.show() finished"); + qCDebug(MainLog) << "main(): ui.show() finished"; // force shortcuts to be shown/hidden in right-click menus, regardless of system defaults qApp->setAttribute(Qt::AA_DontShowShortcutsInContextMenus, !SettingsCache::instance().getShowShortcuts()); diff --git a/cockatrice/src/main.h b/cockatrice/src/main.h index 49ef61bf4..e7dccd631 100644 --- a/cockatrice/src/main.h +++ b/cockatrice/src/main.h @@ -5,6 +5,7 @@ #include +inline Q_LOGGING_CATEGORY(MainLog, "main"); inline Q_LOGGING_CATEGORY(QtTranslatorDebug, "qt_translator"); class CardDatabase;