From 7b34f426e28ae72ef32abdd21d7505fad2200f2d Mon Sep 17 00:00:00 2001 From: Cerapter Date: Thu, 26 Jul 2018 14:42:32 +0200 Subject: [PATCH] Read log limit maximum from config.ini. --- aoapplication.h | 4 ++++ text_file_functions.cpp | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/aoapplication.h b/aoapplication.h index 2a5c436..eb518f3 100644 --- a/aoapplication.h +++ b/aoapplication.h @@ -129,6 +129,10 @@ public: //Returns the value of default_blip in config.ini int get_default_blip(); + //Returns the value of the maximum amount of lines the IC chatlog + //may contain, from config.ini. + int get_max_log_size(); + //Returns the list of words in callwords.ini QStringList get_call_words(); diff --git a/text_file_functions.cpp b/text_file_functions.cpp index 90b10f5..f35de91 100644 --- a/text_file_functions.cpp +++ b/text_file_functions.cpp @@ -90,6 +90,15 @@ int AOApplication::get_default_blip() else return f_result.toInt(); } +int AOApplication::get_max_log_size() +{ + QString f_result = read_config("log_maximum"); + + if (f_result == "") + return 200; + else return f_result.toInt(); +} + QStringList AOApplication::get_call_words() { QStringList return_value;