Commit 13b79a10 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Drop now unneeded QOverload statements

By defining the KF_DISABLE_DEPRECATED_BEFORE_AND_AT and QT_DISABLE_DEPRECATED_BEFOREvalues,
the deprecated overloads are hidden. This way we only have the un-deprecated one visible.

Task: https://phabricator.kde.org/T14370
parent 51910056
Pipeline #116156 failed with stage
in 1 minute and 53 seconds
......@@ -116,7 +116,7 @@ int FileSelectDlg::execute(bt::TorrentInterface *tc, bool *start, bool *skip_che
int idx = encodings.indexOf(tc->getTextCodec()->mibEnum());
Out(SYS_GEN | LOG_DEBUG) << "Codec: " << QString::fromLatin1(tc->getTextCodec()->name()) << " " << idx << endl;
m_encoding->setCurrentIndex(idx);
connect(m_encoding, qOverload<int>(&KComboBox::currentIndexChanged), this, &FileSelectDlg::onCodecChanged);
connect(m_encoding, &KComboBox::currentIndexChanged, this, &FileSelectDlg::onCodecChanged);
for (Uint32 i = 0; i < tc->getNumFiles(); i++) {
bt::TorrentFileInterface &file = tc->getTorrentFile(i);
......@@ -410,7 +410,7 @@ void FileSelectDlg::loadGroups()
}
m_cmbGroups->addItems(grps);
connect(m_cmbGroups, qOverload<int>(&QComboBox::activated), this, &FileSelectDlg::groupActivated);
connect(m_cmbGroups, &QComboBox::activated, this, &FileSelectDlg::groupActivated);
if (selected > 0 && initial_group) {
m_cmbGroups->setCurrentIndex(selected);
......
......@@ -56,8 +56,8 @@ SpeedLimitsDlg::SpeedLimitsDlg(bt::TorrentInterface *current, Core *core, QWidge
m_upload_rate->setValue(Settings::maxUploadRate());
m_download_rate->setValue(Settings::maxDownloadRate());
connect(m_upload_rate, qOverload<int>(&QSpinBox::valueChanged), this, &SpeedLimitsDlg::spinBoxValueChanged);
connect(m_download_rate, qOverload<int>(&QSpinBox::valueChanged), this, &SpeedLimitsDlg::spinBoxValueChanged);
connect(m_upload_rate, &QSpinBox::valueChanged, this, &SpeedLimitsDlg::spinBoxValueChanged);
connect(m_download_rate, &QSpinBox::valueChanged, this, &SpeedLimitsDlg::spinBoxValueChanged);
connect(m_filter, &QLineEdit::textChanged, pm, &QSortFilterProxyModel::setFilterFixedString);
loadState();
......
......@@ -30,8 +30,8 @@ RecommendedSettingsDlg::RecommendedSettingsDlg(QWidget *parent)
connect(m_chk_avg_speed_slot, &QCheckBox::toggled, this, &RecommendedSettingsDlg::avgSpeedSlotToggled);
connect(m_chk_sim_torrents, &QCheckBox::toggled, this, &RecommendedSettingsDlg::simTorrentsToggled);
connect(m_chk_slots, &QCheckBox::toggled, this, &RecommendedSettingsDlg::slotsToggled);
connect(m_upload_bw, qOverload<int>(&QSpinBox::valueChanged), this, &RecommendedSettingsDlg::uploadBWChanged);
connect(m_download_bw, qOverload<int>(&QSpinBox::valueChanged), this, &RecommendedSettingsDlg::downloadBWChanged);
connect(m_upload_bw, &QSpinBox::valueChanged, this, &RecommendedSettingsDlg::uploadBWChanged);
connect(m_download_bw, &QSpinBox::valueChanged, this, &RecommendedSettingsDlg::downloadBWChanged);
m_avg_speed_slot->setEnabled(false);
m_slots->setEnabled(false);
......
......@@ -61,8 +61,8 @@ EditItemDlg::EditItemDlg(kt::Schedule *schedule, ScheduleItem *item, bool new_it
connect(m_from, &QTimeEdit::timeChanged, this, &EditItemDlg::fromChanged);
connect(m_to, &QTimeEdit::timeChanged, this, &EditItemDlg::toChanged);
connect(m_start_day, qOverload<int>(&QComboBox::activated), this, &EditItemDlg::startDayChanged);
connect(m_end_day, qOverload<int>(&QComboBox::activated), this, &EditItemDlg::endDayChanged);
connect(m_start_day, &QComboBox::activated, this, &EditItemDlg::startDayChanged);
connect(m_end_day, &QComboBox::activated, this, &EditItemDlg::endDayChanged);
setWindowTitle(new_item ? i18n("Add an item") : i18n("Edit an item"));
}
......
......@@ -46,7 +46,7 @@ StatusTab::StatusTab(QWidget *parent)
ratio_limit->setMaximum(100.0f);
ratio_limit->setSingleStep(0.1f);
ratio_limit->setKeyboardTracking(false);
connect(ratio_limit, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &StatusTab::maxRatioChanged);
connect(ratio_limit, &QDoubleSpinBox::valueChanged, this, &StatusTab::maxRatioChanged);
connect(use_ratio_limit, &QCheckBox::toggled, this, &StatusTab::useRatioLimitToggled);
time_limit->setMinimum(0.0f);
......@@ -55,7 +55,7 @@ StatusTab::StatusTab(QWidget *parent)
time_limit->setSpecialValueText(i18n("No limit"));
time_limit->setKeyboardTracking(false);
connect(use_time_limit, &QCheckBox::toggled, this, &StatusTab::useTimeLimitToggled);
connect(time_limit, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &StatusTab::maxTimeChanged);
connect(time_limit, &QDoubleSpinBox::valueChanged, this, &StatusTab::maxTimeChanged);
int h = (int)ceil(fontMetrics().height() * 1.25);
downloaded_bar->setFixedHeight(h);
......
......@@ -23,7 +23,7 @@ IPBlockingPrefPage::IPBlockingPrefPage(IPFilterPlugin *p)
connect(kcfg_useLevel1, &QCheckBox::toggled, this, &IPBlockingPrefPage::checkUseLevel1Toggled);
connect(m_download, &QPushButton::clicked, this, &IPBlockingPrefPage::downloadClicked);
connect(kcfg_autoUpdate, &QCheckBox::toggled, this, &IPBlockingPrefPage::autoUpdateToggled);
connect(kcfg_autoUpdateInterval, qOverload<int>(&KPluralHandlingSpinBox::valueChanged), this, &IPBlockingPrefPage::autoUpdateIntervalChanged);
connect(kcfg_autoUpdateInterval, &KPluralHandlingSpinBox::valueChanged, this, &IPBlockingPrefPage::autoUpdateIntervalChanged);
kcfg_autoUpdateInterval->setSuffix(ki18np(" day", " days"));
m_job = nullptr;
m_verbose = true;
......
......@@ -25,7 +25,7 @@ ScanFolderPrefPage::ScanFolderPrefPage(ScanFolderPlugin *plugin, QWidget *parent
connect(m_add, &QPushButton::clicked, this, &ScanFolderPrefPage::addPressed);
connect(m_remove, &QPushButton::clicked, this, &ScanFolderPrefPage::removePressed);
connect(m_folders, &QListWidget::itemSelectionChanged, this, &ScanFolderPrefPage::selectionChanged);
connect(m_group, qOverload<int>(&QComboBox::currentIndexChanged), this, &ScanFolderPrefPage::currentGroupChanged);
connect(m_group, &QComboBox::currentIndexChanged, this, &ScanFolderPrefPage::currentGroupChanged);
}
ScanFolderPrefPage::~ScanFolderPrefPage()
......
......@@ -69,7 +69,7 @@ SearchToolBar::SearchToolBar(KActionCollection *ac, kt::SearchEngineList *sl, QO
m_search_engine = new QComboBox(nullptr);
search_engine_action->setDefaultWidget(m_search_engine);
ac->addAction(QLatin1String("search_engine"), search_engine_action);
connect(m_search_engine, qOverload<int>(&QComboBox::currentIndexChanged), this, &SearchToolBar::selectedEngineChanged);
connect(m_search_engine, &QComboBox::currentIndexChanged, this, &SearchToolBar::selectedEngineChanged);
QWidgetAction *search_engine_label_action = new QWidgetAction(this);
search_engine_label_action->setText(i18n("Search Engine Label"));
......
......@@ -12,7 +12,7 @@ SettingsPage::SettingsPage(QWidget* p) :
PrefPageInterface(StatsPluginSettings::self(), i18nc("@title:window", "Statistics"), QStringLiteral("view-statistics"), p)
{
setupUi(this);
connect(kcfg_UpdateEveryGuiUpdates, qOverload<int>(&QSpinBox::valueChanged), this, &SettingsPage::UpdGuiUpdatesToMs);
connect(kcfg_UpdateEveryGuiUpdates, &QSpinBox::valueChanged, this, &SettingsPage::UpdGuiUpdatesToMs);
UpdGuiUpdatesToMs(0);
}
......
......@@ -49,7 +49,7 @@ FeedWidget::FeedWidget(FilterList *filters, SyndicationActivity *act, QWidget *p
connect(m_download, &QPushButton::clicked, this, &FeedWidget::downloadClicked);
connect(m_refresh, &QPushButton::clicked, this, &FeedWidget::refreshClicked);
connect(m_filters, &QPushButton::clicked, this, &FeedWidget::filtersClicked);
connect(m_refresh_rate, qOverload<int>(&QSpinBox::valueChanged), this, &FeedWidget::refreshRateChanged);
connect(m_refresh_rate, &QSpinBox::valueChanged, this, &FeedWidget::refreshRateChanged);
connect(m_cookies, &QPushButton::clicked, this, &FeedWidget::cookiesClicked);
m_refresh->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment