mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Migrate away from deprecated functions in Qt 6.9
Closes #21412. PR #21415.
This commit is contained in:
parent
c30a07702d
commit
7b45566efc
4 changed files with 22 additions and 24 deletions
|
@ -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>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue