mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 23:42:46 -07:00
Avoid creating unnecessary event loops
The `exec()` method will create another event loop and transfer control over there which might introduce unexpected bugs.
This commit is contained in:
parent
206bb018dd
commit
3748b995ff
22 changed files with 509 additions and 476 deletions
|
@ -423,7 +423,12 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
|||
connect(m_ui->checkSmartFilterDownloadRepacks, &QCheckBox::toggled, this, &OptionsDialog::enableApplyButton);
|
||||
connect(m_ui->spinRSSRefreshInterval, qSpinBoxValueChanged, this, &OptionsDialog::enableApplyButton);
|
||||
connect(m_ui->spinRSSMaxArticlesPerFeed, qSpinBoxValueChanged, this, &OptionsDialog::enableApplyButton);
|
||||
connect(m_ui->btnEditRules, &QPushButton::clicked, this, [this]() { AutomatedRssDownloader(this).exec(); });
|
||||
connect(m_ui->btnEditRules, &QPushButton::clicked, this, [this]()
|
||||
{
|
||||
auto *downloader = new AutomatedRssDownloader(this);
|
||||
downloader->setAttribute(Qt::WA_DeleteOnClose);
|
||||
downloader->open();
|
||||
});
|
||||
|
||||
// Disable apply Button
|
||||
m_applyButton->setEnabled(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue