Commit 285b5593 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Revert "Port some deprecated signal (qt5.15)"

This reverts commit beff45c6.
parent d72ff6e1
......@@ -77,11 +77,7 @@ BondWidget::BondWidget(const QString & masterUuid, const QString &masterId,
connect(m_ui->ifaceName, &KLineEdit::textChanged, this, &BondWidget::slotWidgetChanged);
connect(m_ui->arpTargets, &KLineEdit::textChanged, this, &BondWidget::slotWidgetChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->linkMonitoring, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &BondWidget::slotWidgetChanged);
#else
connect(m_ui->linkMonitoring, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &BondWidget::slotWidgetChanged);
#endif
// Connect for setting check
watchChangedSetting();
......
......@@ -70,24 +70,12 @@ ConnectionWidget::ConnectionWidget(const NetworkManager::ConnectionSettings::Ptr
connect(m_widget->allUsers, &QCheckBox::stateChanged, this, &ConnectionWidget::settingChanged);
connect(m_widget->autoconnectVpn, &QCheckBox::stateChanged, this, &ConnectionWidget::settingChanged);
connect(m_widget->pushButtonPermissions, &QPushButton::clicked, this, &ConnectionWidget::settingChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_widget->firewallZone, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ConnectionWidget::settingChanged);
#else
connect(m_widget->firewallZone, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &ConnectionWidget::settingChanged);
#endif
connect(m_widget->firewallZone, &QComboBox::currentTextChanged, this, &ConnectionWidget::settingChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_widget->vpnCombobox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ConnectionWidget::settingChanged);
#else
connect(m_widget->vpnCombobox, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &ConnectionWidget::settingChanged);
#endif
connect(m_widget->vpnCombobox, &QComboBox::currentTextChanged, this, &ConnectionWidget::settingChanged);
connect(m_widget->prioritySpin, QOverload<int>::of(&QSpinBox::valueChanged), this, &ConnectionWidget::settingChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_widget->metered, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ConnectionWidget::settingChanged);
#else
connect(m_widget->metered, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &ConnectionWidget::settingChanged);
#endif
connect(m_widget->pushButtonPermissions, &QPushButton::clicked, this, &ConnectionWidget::openAdvancedPermissions);
}
......
......@@ -107,11 +107,7 @@ IPv4Widget::IPv4Widget(const NetworkManager::Setting::Ptr &setting, QWidget* par
loadConfig(setting);
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->method, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &IPv4Widget::slotModeComboChanged);
#else
connect(m_ui->method, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &IPv4Widget::slotModeComboChanged);
#endif
slotModeComboChanged(m_ui->method->currentIndex());
connect(m_ui->btnRoutes, &QPushButton::clicked, this, &IPv4Widget::slotRoutesDialog);
......@@ -122,11 +118,7 @@ IPv4Widget::IPv4Widget(const NetworkManager::Setting::Ptr &setting, QWidget* par
// Connect for validity check
connect(m_ui->dns, &KLineEdit::textChanged, this, &IPv4Widget::slotWidgetChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->method, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &IPv4Widget::slotWidgetChanged);
#else
connect(m_ui->method, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &IPv4Widget::slotWidgetChanged);
#endif
connect(&d->model, &QStandardItemModel::dataChanged, this, &IPv4Widget::slotWidgetChanged);
connect(&d->model, &QStandardItemModel::rowsRemoved, this, &IPv4Widget::slotWidgetChanged);
......
......@@ -93,11 +93,7 @@ IPv6Widget::IPv6Widget(const NetworkManager::Setting::Ptr &setting, QWidget* par
loadConfig(setting);
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->method, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &IPv6Widget::slotModeComboChanged);
#else
connect(m_ui->method, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &IPv6Widget::slotModeComboChanged);
#endif
slotModeComboChanged(m_ui->method->currentIndex());
connect(m_ui->btnRoutes, &QPushButton::clicked, this, &IPv6Widget::slotRoutesDialog);
......@@ -107,11 +103,7 @@ IPv6Widget::IPv6Widget(const NetworkManager::Setting::Ptr &setting, QWidget* par
// Connect for validity check
connect(m_ui->dns, &KLineEdit::textChanged, this, &IPv6Widget::slotWidgetChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->method, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &IPv6Widget::slotWidgetChanged);
#else
connect(m_ui->method, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &IPv6Widget::slotWidgetChanged);
#endif
connect(&d->model, &QStandardItemModel::dataChanged, this, &IPv6Widget::slotWidgetChanged);
connect(&d->model, &QStandardItemModel::rowsRemoved, this, &IPv6Widget::slotWidgetChanged);
......
......@@ -76,11 +76,7 @@ Security8021x::Security8021x(const NetworkManager::Setting::Ptr &setting, bool w
watchChangedSetting();
// Connect for validity check
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->auth, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &Security8021x::slotWidgetChanged);
#else
connect(m_ui->auth, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &Security8021x::slotWidgetChanged);
#endif
connect(m_ui->md5UserName, &KLineEdit::textChanged, this, &Security8021x::slotWidgetChanged);
connect(m_ui->md5Password, &PasswordField::textChanged, this, &Security8021x::slotWidgetChanged);
connect(m_ui->md5Password, &PasswordField::passwordOptionChanged, this, &Security8021x::slotWidgetChanged);
......
......@@ -34,11 +34,7 @@ VlanWidget::VlanWidget(const NetworkManager::Setting::Ptr &setting, QWidget* par
fillConnections();
connect(m_ui->ifaceName, &KLineEdit::textChanged, this, &VlanWidget::slotWidgetChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->parent, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &VlanWidget::slotWidgetChanged);
#else
connect(m_ui->parent, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &VlanWidget::slotWidgetChanged);
#endif
connect(m_ui->parent->lineEdit(), &QLineEdit::textChanged, this, &VlanWidget::slotWidgetChanged);
// Connect for setting check
......
......@@ -36,16 +36,8 @@ WifiConnectionWidget::WifiConnectionWidget(const NetworkManager::Setting::Ptr &s
connect(m_ui->btnRandomMacAddr, &QPushButton::clicked, this, &WifiConnectionWidget::generateRandomClonedMac);
connect(m_ui->SSIDCombo, &SsidComboBox::ssidChanged, this, QOverload<>::of(&WifiConnectionWidget::ssidChanged));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->modeComboBox, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &WifiConnectionWidget::modeChanged);
#else
connect(m_ui->modeComboBox, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &WifiConnectionWidget::modeChanged);
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->band, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &WifiConnectionWidget::bandChanged);
#else
connect(m_ui->band, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &WifiConnectionWidget::bandChanged);
#endif
// Connect for setting check
watchChangedSetting();
......
......@@ -49,16 +49,8 @@ WifiSecurity::WifiSecurity(const NetworkManager::Setting::Ptr &setting, const Ne
m_ui->securityCombo->removeItem(7);
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->securityCombo, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &WifiSecurity::securityChanged);
#else
connect(m_ui->securityCombo, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &WifiSecurity::securityChanged);
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->wepIndex, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &WifiSecurity::setWepKey);
#else
connect(m_ui->wepIndex, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &WifiSecurity::setWepKey);
#endif
// Connect for setting check
watchChangedSetting();
......@@ -71,16 +63,8 @@ WifiSecurity::WifiSecurity(const NetworkManager::Setting::Ptr &setting, const Ne
connect(m_ui->leapPassword, &PasswordField::passwordOptionChanged, this, &WifiSecurity::slotWidgetChanged);
connect(m_ui->psk, &PasswordField::textChanged, this, &WifiSecurity::slotWidgetChanged);
connect(m_ui->psk, &PasswordField::passwordOptionChanged, this, &WifiSecurity::slotWidgetChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->wepIndex, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &WifiSecurity::slotWidgetChanged);
#else
connect(m_ui->wepIndex, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &WifiSecurity::slotWidgetChanged);
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->securityCombo, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &WifiSecurity::slotWidgetChanged);
#else
connect(m_ui->securityCombo, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &WifiSecurity::slotWidgetChanged);
#endif
connect(m_8021xWidget, &Security8021x::validChanged, this, &WifiSecurity::slotWidgetChanged);
connect(m_WPA2Widget, &Security8021x::validChanged, this, &WifiSecurity::slotWidgetChanged);
......
......@@ -41,11 +41,7 @@ WiredConnectionWidget::WiredConnectionWidget(const NetworkManager::Setting::Ptr
// Connect for validity check
connect(m_widget->clonedMacAddress, &KLineEdit::textChanged, this, &WiredConnectionWidget::slotWidgetChanged);
connect(m_widget->macAddress, &HwAddrComboBox::hwAddressChanged, this, &WiredConnectionWidget::slotWidgetChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_widget->linkNegotiation, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this] (int index) {
#else
connect(m_widget->linkNegotiation, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, [this] (int index) {
#endif
m_widget->duplex->setEnabled(index == LinkNegotiation::Manual);
m_widget->speed->setEnabled(index == LinkNegotiation::Manual);
});
......
......@@ -65,11 +65,7 @@ PasswordField::PasswordField(QWidget *parent, Qt::WindowFlags f)
m_currentPasswordOption = StoreForAllUsers;
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_passwordOptionsMenu, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PasswordField::changePasswordOption);
#else
connect(m_passwordOptionsMenu, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &PasswordField::changePasswordOption);
#endif
// Disable by default
m_passwordOptionsMenu->setVisible(false);
......
......@@ -70,11 +70,7 @@ void SettingWidget::watchChangedSetting()
// Connect all QComboBox widgets
QList<QComboBox *> comboboxes = findChildren<QComboBox *>();
for (QComboBox *combobox : comboboxes) {
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(combobox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SettingWidget::settingChanged);
#else
connect(combobox, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &SettingWidget::settingChanged);
#endif
connect(combobox, &QComboBox::currentTextChanged, this, &SettingWidget::settingChanged);
}
......
......@@ -122,11 +122,7 @@ OpenconnectAuthWidget::OpenconnectAuthWidget(const NetworkManager::VpnSetting::P
d->cancelPipes[1] = -1;
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(d->ui.cmbLogLevel, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OpenconnectAuthWidget::logLevelChanged);
#else
connect(d->ui.cmbLogLevel, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &OpenconnectAuthWidget::logLevelChanged);
#endif
connect(d->ui.viewServerLog, &QCheckBox::toggled, this, &OpenconnectAuthWidget::viewServerLogToggled);
connect(d->ui.btnConnect, &QPushButton::clicked, this, &OpenconnectAuthWidget::connectHost);
......@@ -155,11 +151,7 @@ OpenconnectAuthWidget::OpenconnectAuthWidget(const NetworkManager::VpnSetting::P
#endif
// This might be set by readSecrets() so don't connect it until now
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(d->ui.cmbHosts, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OpenconnectAuthWidget::connectHost);
#else
connect(d->ui.cmbHosts, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &OpenconnectAuthWidget::connectHost);
#endif
KAcceleratorManager::manage(this);
}
......@@ -576,11 +568,7 @@ void OpenconnectAuthWidget::processAuthForm(struct oc_auth_form *form)
#else
if (sopt == AUTHGROUP_OPT(form)) {
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(cmb, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OpenconnectAuthWidget::formGroupChanged);
#else
connect(cmb, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &OpenconnectAuthWidget::formGroupChanged);
#endif
}
widget = qobject_cast<QWidget*>(cmb);
}
......
......@@ -87,11 +87,7 @@ OpenconnectSettingWidget::OpenconnectSettingWidget(const NetworkManager::VpnSett
connect(d->tokenDlg, &QDialog::rejected, this, &OpenconnectSettingWidget::restoreTokens);
connect(d->tokenDlg, &QDialog::accepted, this, &OpenconnectSettingWidget::saveTokens);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(d->tokenUi.cmbTokenMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, QOverload<int>::of((&OpenconnectSettingWidget::handleTokenSecret)));
#else
connect(d->tokenUi.cmbTokenMode, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, QOverload<int>::of((&OpenconnectSettingWidget::handleTokenSecret)));
#endif
// Connect for setting check
watchChangedSetting();
......
......@@ -72,21 +72,9 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P
m_ui->proxyPassword->setPasswordOptionsEnabled(true);
m_ui->proxyPassword->setPasswordNotRequiredEnabled(true);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->cbCertCheck, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OpenVpnAdvancedWidget::certCheckTypeChanged);
#else
connect(m_ui->cbCertCheck, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &OpenVpnAdvancedWidget::certCheckTypeChanged);
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->cmbProxyType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OpenVpnAdvancedWidget::proxyTypeChanged);
#else
connect(m_ui->cmbProxyType, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &OpenVpnAdvancedWidget::proxyTypeChanged);
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_ui->cboTLSMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this] (int index) {
#else
connect(m_ui->cboTLSMode, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, [this] (int index) {
#endif
if (index == 0) {
m_ui->kurlTlsAuthKey->setDisabled(true);
m_ui->cboDirection->setDisabled(true);
......
......@@ -53,11 +53,7 @@ SshSettingWidget::SshSettingWidget(const NetworkManager::VpnSetting::Ptr &settin
d->ui.le_password->setPasswordOptionsEnabled(true);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(d->ui.cmb_authType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SshSettingWidget::authTypeChanged);
#else
connect(d->ui.cmb_authType, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &SshSettingWidget::authTypeChanged);
#endif
connect(d->ui.btn_advancedOption, &QPushButton::clicked, this, &SshSettingWidget::doAdvancedDialog);
d->advancedDlg = new QDialog(this);
......
Markdown is supported
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