mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
Option to show console when external program is run
Windows only. Closes #9592
This commit is contained in:
@@ -295,6 +295,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
connect(m_ui->mailNotifPassword, &QLineEdit::textChanged, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->autoRunBox, &QGroupBox::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->lineEditAutoRun, &QLineEdit::textChanged, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->autoRunConsole, &QCheckBox::toggled, this, &ThisType::enableApplyButton);
|
||||
|
||||
const QString autoRunStr = QString("%1\n %2\n %3\n %4\n %5\n %6\n %7\n %8\n %9\n %10\n %11\n%12")
|
||||
.arg(tr("Supported parameters (case sensitive):")
|
||||
@@ -696,6 +697,9 @@ void OptionsDialog::saveOptions()
|
||||
pref->setMailNotificationSMTPPassword(m_ui->mailNotifPassword->text());
|
||||
pref->setAutoRunEnabled(m_ui->autoRunBox->isChecked());
|
||||
pref->setAutoRunProgram(m_ui->lineEditAutoRun->text().trimmed());
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) && defined(Q_OS_WIN)
|
||||
pref->setAutoRunConsoleEnabled(m_ui->autoRunConsole->isChecked());
|
||||
#endif
|
||||
pref->setActionOnDblClOnTorrentDl(getActionOnDblClOnTorrentDl());
|
||||
pref->setActionOnDblClOnTorrentFn(getActionOnDblClOnTorrentFn());
|
||||
TorrentFileGuard::setAutoDeleteMode(!m_ui->deleteTorrentBox->isChecked() ? TorrentFileGuard::Never
|
||||
@@ -970,6 +974,11 @@ void OptionsDialog::loadOptions()
|
||||
|
||||
m_ui->autoRunBox->setChecked(pref->isAutoRunEnabled());
|
||||
m_ui->lineEditAutoRun->setText(pref->getAutoRunProgram());
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) && defined(Q_OS_WIN)
|
||||
m_ui->autoRunConsole->setChecked(pref->isAutoRunConsoleEnabled());
|
||||
#else
|
||||
m_ui->autoRunConsole->hide();
|
||||
#endif
|
||||
intValue = pref->getActionOnDblClOnTorrentDl();
|
||||
if (intValue >= m_ui->actionTorrentDlOnDblClBox->count())
|
||||
intValue = 0;
|
||||
|
||||
Reference in New Issue
Block a user