mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 15:32:48 -07:00
Option to show console when external program is run
Windows only. Closes #9592
This commit is contained in:
parent
4ae8e176dc
commit
8fa6e372a2
5 changed files with 59 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue