mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 21:52:32 -06:00
Migrate away from deprecated functions in Qt 6.9
Closes #21412. PR #21415.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include <QtVersionChecks>
|
||||
#include <QHeaderView>
|
||||
#include <QHostAddress>
|
||||
#include <QLabel>
|
||||
@@ -981,7 +982,13 @@ void AdvancedSettings::addRow(const int row, const QString &text, T *widget)
|
||||
setCellWidget(row, VALUE, widget);
|
||||
|
||||
if constexpr (std::is_same_v<T, QCheckBox>)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||
connect(widget, &QCheckBox::checkStateChanged, this, &AdvancedSettings::settingsChanged);
|
||||
#else
|
||||
connect(widget, &QCheckBox::stateChanged, this, &AdvancedSettings::settingsChanged);
|
||||
#endif
|
||||
}
|
||||
else if constexpr (std::is_same_v<T, QSpinBox>)
|
||||
connect(widget, qOverload<int>(&QSpinBox::valueChanged), this, &AdvancedSettings::settingsChanged);
|
||||
else if constexpr (std::is_same_v<T, QComboBox>)
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "automatedrssdownloader.h"
|
||||
|
||||
#include <QtVersionChecks>
|
||||
#include <QCursor>
|
||||
#include <QFileDialog>
|
||||
#include <QMenu>
|
||||
@@ -129,10 +130,17 @@ AutomatedRssDownloader::AutomatedRssDownloader(QWidget *parent)
|
||||
connect(m_ui->lineNotContains, &QLineEdit::textEdited, this, &AutomatedRssDownloader::updateMustNotLineValidity);
|
||||
connect(m_ui->lineEFilter, &QLineEdit::textEdited, this, &AutomatedRssDownloader::handleRuleDefinitionChanged);
|
||||
connect(m_ui->lineEFilter, &QLineEdit::textEdited, this, &AutomatedRssDownloader::updateEpisodeFilterValidity);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||
connect(m_ui->checkRegex, &QCheckBox::checkStateChanged, this, &AutomatedRssDownloader::handleRuleDefinitionChanged);
|
||||
connect(m_ui->checkRegex, &QCheckBox::checkStateChanged, this, &AutomatedRssDownloader::updateMustLineValidity);
|
||||
connect(m_ui->checkRegex, &QCheckBox::checkStateChanged, this, &AutomatedRssDownloader::updateMustNotLineValidity);
|
||||
connect(m_ui->checkSmart, &QCheckBox::checkStateChanged, this, &AutomatedRssDownloader::handleRuleDefinitionChanged);
|
||||
#else
|
||||
connect(m_ui->checkRegex, &QCheckBox::stateChanged, this, &AutomatedRssDownloader::handleRuleDefinitionChanged);
|
||||
connect(m_ui->checkRegex, &QCheckBox::stateChanged, this, &AutomatedRssDownloader::updateMustLineValidity);
|
||||
connect(m_ui->checkRegex, &QCheckBox::stateChanged, this, &AutomatedRssDownloader::updateMustNotLineValidity);
|
||||
connect(m_ui->checkSmart, &QCheckBox::stateChanged, this, &AutomatedRssDownloader::handleRuleDefinitionChanged);
|
||||
#endif
|
||||
connect(m_ui->spinIgnorePeriod, qOverload<int>(&QSpinBox::valueChanged)
|
||||
, this, &AutomatedRssDownloader::handleRuleDefinitionChanged);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user