aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aoapplication.h3
-rw-r--r--courtroom.cpp2
-rw-r--r--text_file_functions.cpp6
3 files changed, 11 insertions, 0 deletions
diff --git a/aoapplication.h b/aoapplication.h
index eb518f35..947bb1df 100644
--- a/aoapplication.h
+++ b/aoapplication.h
@@ -133,6 +133,9 @@ public:
//may contain, from config.ini.
int get_max_log_size();
+ // Returns the username the user may have set in config.ini.
+ QString get_default_username();
+
//Returns the list of words in callwords.ini
QStringList get_call_words();
diff --git a/courtroom.cpp b/courtroom.cpp
index 264192d9..d3e3728e 100644
--- a/courtroom.cpp
+++ b/courtroom.cpp
@@ -111,6 +111,8 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
ui_ooc_chat_name->setFrame(false);
ui_ooc_chat_name->setPlaceholderText("Name");
+ ui_ooc_chat_name->setText(p_ao_app->get_default_username());
+
//ui_area_password = new QLineEdit(this);
//ui_area_password->setFrame(false);
ui_music_search = new QLineEdit(this);
diff --git a/text_file_functions.cpp b/text_file_functions.cpp
index f35de91c..db858cb9 100644
--- a/text_file_functions.cpp
+++ b/text_file_functions.cpp
@@ -99,6 +99,12 @@ int AOApplication::get_max_log_size()
else return f_result.toInt();
}
+QString AOApplication::get_default_username()
+{
+ QString f_result = read_config("default_username");
+ return f_result;
+}
+
QStringList AOApplication::get_call_words()
{
QStringList return_value;