Merge pull request #11672 from sledgehammer999/show_console

Option to show console when external program is run
This commit is contained in:
sledgehammer999
2019-12-23 16:16:24 +02:00
committed by GitHub
5 changed files with 63 additions and 7 deletions

View File

@@ -781,7 +781,7 @@ bool Preferences::isUILocked() const
void Preferences::setUILocked(const bool locked)
{
return setValue("Locking/locked", locked);
setValue("Locking/locked", locked);
}
bool Preferences::isAutoRunEnabled() const
@@ -791,7 +791,7 @@ bool Preferences::isAutoRunEnabled() const
void Preferences::setAutoRunEnabled(const bool enabled)
{
return setValue("AutoRun/enabled", enabled);
setValue("AutoRun/enabled", enabled);
}
QString Preferences::getAutoRunProgram() const
@@ -804,6 +804,18 @@ void Preferences::setAutoRunProgram(const QString &program)
setValue("AutoRun/program", program);
}
#if defined(Q_OS_WIN) && (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
bool Preferences::isAutoRunConsoleEnabled() const
{
return value("AutoRun/ConsoleEnabled", false).toBool();
}
void Preferences::setAutoRunConsoleEnabled(const bool enabled)
{
setValue("AutoRun/ConsoleEnabled", enabled);
}
#endif
bool Preferences::shutdownWhenDownloadsComplete() const
{
return value("Preferences/Downloads/AutoShutDownOnCompletion", false).toBool();

View File

@@ -238,6 +238,10 @@ public:
void setAutoRunEnabled(bool enabled);
QString getAutoRunProgram() const;
void setAutoRunProgram(const QString &program);
#if defined(Q_OS_WIN) && (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
bool isAutoRunConsoleEnabled() const;
void setAutoRunConsoleEnabled(bool enabled);
#endif
bool shutdownWhenDownloadsComplete() const;
void setShutdownWhenDownloadsComplete(bool shutdown);
bool suspendWhenDownloadsComplete() const;