From 2eed786c776ba31e464e5929a6a0299a19897192 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Thu, 23 Dec 2021 17:29:17 -0600 Subject: Split logging option into text and demo Apparently, people don't like logging demos because it takes up too much space. It's possible to enable NTFS compression for demo files (or the entire demos folder), though. --- src/text_file_functions.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/text_file_functions.cpp') diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index d873b3c1..af96b3d1 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -1067,13 +1067,20 @@ QString AOApplication::get_casing_can_host_cases() return result; } -bool AOApplication::get_auto_logging_enabled() +bool AOApplication::get_text_logging_enabled() { QString result = configini->value("automatic_logging_enabled", "true").value(); return result.startsWith("true"); } +bool AOApplication::get_demo_logging_enabled() +{ + QString result = + configini->value("demo_logging_enabled", "true").value(); + return result.startsWith("true"); +} + QString AOApplication::get_subtheme() { QString result = -- cgit From ecfe6f2542d73e9559b75a502f6eebffe63a76cf Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Sat, 25 Dec 2021 19:17:27 -0600 Subject: Change master chat in courtroom to debug log Since the MS chat has been disabled for quite some time now (and we aren't planning on bringing it back since Discord, Guilded etc. have better chat features), I decided to go ahead and change the pane into a debug log to keep it useful and avoid creating a gaping hole in themes. Though, maybe it is worth removing the whole switcher and keeping the debug log hidden away where it can't scare people. --- src/text_file_functions.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/text_file_functions.cpp') diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index af96b3d1..6ea82f59 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -167,7 +167,7 @@ QString AOApplication::read_file(QString filename) QFile f_log(filename); if (!f_log.open(QIODevice::ReadOnly | QIODevice::Text)) { - qDebug() << "Couldn't open" << filename; + qWarning() << "Couldn't open" << filename; return ""; } @@ -699,7 +699,7 @@ QString AOApplication::get_emote_comment(QString p_char, int p_emote) QStringList result_contents = f_result.split("#"); if (result_contents.size() < 4) { - qDebug() << "W: misformatted char.ini: " << p_char << ", " << p_emote; + qWarning() << "misformatted char.ini: " << p_char << ", " << p_emote; return "normal"; } return result_contents.at(0); @@ -713,7 +713,7 @@ QString AOApplication::get_pre_emote(QString p_char, int p_emote) QStringList result_contents = f_result.split("#"); if (result_contents.size() < 4) { - qDebug() << "W: misformatted char.ini: " << p_char << ", " << p_emote; + qWarning() << "misformatted char.ini: " << p_char << ", " << p_emote; return ""; } return result_contents.at(1); @@ -727,7 +727,7 @@ QString AOApplication::get_emote(QString p_char, int p_emote) QStringList result_contents = f_result.split("#"); if (result_contents.size() < 4) { - qDebug() << "W: misformatted char.ini: " << p_char << ", " << p_emote; + qWarning() << "misformatted char.ini: " << p_char << ", " << p_emote; return "normal"; } return result_contents.at(2); @@ -741,7 +741,7 @@ int AOApplication::get_emote_mod(QString p_char, int p_emote) QStringList result_contents = f_result.split("#"); if (result_contents.size() < 4) { - qDebug() << "W: misformatted char.ini: " << p_char << ", " + qWarning() << "misformatted char.ini: " << p_char << ", " << QString::number(p_emote); return 0; } -- cgit