summaryrefslogtreecommitdiffstats
path: root/api/logic/BaseInstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic/BaseInstance.cpp')
-rw-r--r--api/logic/BaseInstance.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/api/logic/BaseInstance.cpp b/api/logic/BaseInstance.cpp
index 335ef392..6d719c32 100644
--- a/api/logic/BaseInstance.cpp
+++ b/api/logic/BaseInstance.cpp
@@ -51,6 +51,9 @@ BaseInstance::BaseInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr s
m_settings->registerOverride(globalSettings->getSetting("AutoCloseConsole"), consoleSetting);
m_settings->registerOverride(globalSettings->getSetting("ShowConsoleOnError"), consoleSetting);
m_settings->registerOverride(globalSettings->getSetting("LogPrePostOutput"), consoleSetting);
+
+ m_settings->registerPassthrough(globalSettings->getSetting("ConsoleMaxLines"), nullptr);
+ m_settings->registerPassthrough(globalSettings->getSetting("ConsoleOverflowStop"), nullptr);
}
QString BaseInstance::getPreLaunchCommand()
@@ -68,6 +71,24 @@ QString BaseInstance::getPostExitCommand()
return settings()->get("PostExitCommand").toString();
}
+int BaseInstance::getConsoleMaxLines() const
+{
+ auto lineSetting = settings()->getSetting("ConsoleMaxLines");
+ bool conversionOk = false;
+ int maxLines = lineSetting->get().toInt(&conversionOk);
+ if(!conversionOk)
+ {
+ maxLines = lineSetting->defValue().toInt();
+ qWarning() << "ConsoleMaxLines has nonsensical value, defaulting to" << maxLines;
+ }
+ return maxLines;
+}
+
+bool BaseInstance::shouldStopOnConsoleOverflow() const
+{
+ return settings()->get("ConsoleOverflowStop").toBool();
+}
+
void BaseInstance::iconUpdated(QString key)
{
if(iconKey() == key)