From 480db3e5857b02adcd229ee61ca644e7ff4953d6 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sun, 16 Dec 2018 10:41:59 +0100 Subject: [PATCH] AO 2.6 bugfixes. - The `base/` folder's path is now determined based on where the executable was executed, not where its workspace is. - Showing custom shownames is now assumed to be `true` by default, unless the `config.ini` says otherwise. - The Lobby's listing of servers has now been moved into its constructor (previously only specifically called by the "Back to Lobby" button). This makes it list servers even if the user was kicked, banned, or left due to timeout. --- courtroom.cpp | 1 - lobby.cpp | 2 ++ path_functions.cpp | 2 +- text_file_functions.cpp | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/courtroom.cpp b/courtroom.cpp index 249cc16..c187e9c 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -3294,7 +3294,6 @@ void Courtroom::on_reload_theme_clicked() void Courtroom::on_back_to_lobby_clicked() { ao_app->construct_lobby(); - ao_app->w_lobby->list_servers(); ao_app->destruct_courtroom(); } diff --git a/lobby.cpp b/lobby.cpp index 5158a1f..4a96e56 100644 --- a/lobby.cpp +++ b/lobby.cpp @@ -52,6 +52,8 @@ Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow() ui_connect->setEnabled(false); + list_servers(); + set_widgets(); } diff --git a/path_functions.cpp b/path_functions.cpp index 7d40054..a22b775 100644 --- a/path_functions.cpp +++ b/path_functions.cpp @@ -31,7 +31,7 @@ QString AOApplication::get_base_path() base_path = external_storage + "/AO2/"; } #else - base_path = QDir::currentPath() + "/base/"; + base_path = applicationDirPath() + "/base/"; #endif return base_path; diff --git a/text_file_functions.cpp b/text_file_functions.cpp index afe8fc3..fcb8df2 100644 --- a/text_file_functions.cpp +++ b/text_file_functions.cpp @@ -50,7 +50,7 @@ bool AOApplication::get_log_goes_downwards() bool AOApplication::get_showname_enabled_by_default() { - QString result = configini->value("show_custom_shownames", "false").value(); + QString result = configini->value("show_custom_shownames", "true").value(); return result.startsWith("true"); }