Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 7e578ddc authored by Alexander Volkov's avatar Alexander Volkov

Use QOverload to select overloaded functions

Reviewers: jgrulich

Reviewed By: jgrulich

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15297
parent 250e7ac7
......@@ -51,7 +51,7 @@ Notification::Notification(QObject *parent) :
addActiveConnection(ac);
}
connect(NetworkManager::notifier(), &NetworkManager::Notifier::activeConnectionAdded, this, static_cast<void (Notification::*)(const QString&)>(&Notification::addActiveConnection));
connect(NetworkManager::notifier(), &NetworkManager::Notifier::activeConnectionAdded, this, QOverload<const QString&>::of(&Notification::addActiveConnection));
QDBusConnection::systemBus().connect(QStringLiteral("org.freedesktop.login1"),
QStringLiteral("/org/freedesktop/login1"),
......
......@@ -71,7 +71,7 @@ NetworkStatus::NetworkStatus(QObject* parent)
: QObject(parent)
{
connect(NetworkManager::notifier(), &NetworkManager::Notifier::statusChanged, this, &NetworkStatus::statusChanged);
connect(NetworkManager::notifier(), &NetworkManager::Notifier::activeConnectionsChanged, this, static_cast<void (NetworkStatus::*)(void)>(&NetworkStatus::activeConnectionsChanged));
connect(NetworkManager::notifier(), &NetworkManager::Notifier::activeConnectionsChanged, this, QOverload<>::of(&NetworkStatus::activeConnectionsChanged));
activeConnectionsChanged();
statusChanged(NetworkManager::status());
......
......@@ -203,7 +203,7 @@ void ConnectionEditorBase::initialize()
m_connection->setting(NetworkManager::Setting::Security8021x).staticCast<NetworkManager::Security8021xSetting>(),
this);
addSettingWidget(wifiSecurity, i18n("Wi-Fi Security"));
connect(wifiWidget, static_cast<void (WifiConnectionWidget::*)(const QString &)>(&WifiConnectionWidget::ssidChanged), wifiSecurity, &WifiSecurity::onSsidChanged);
connect(wifiWidget, QOverload<const QString &>::of(&WifiConnectionWidget::ssidChanged), wifiSecurity, &WifiSecurity::onSsidChanged);
} else if (type == NetworkManager::ConnectionSettings::Pppoe) { // DSL
PppoeWidget *pppoeWidget = new PppoeWidget(m_connection->setting(NetworkManager::Setting::Pppoe), this);
addSettingWidget(pppoeWidget, i18n("DSL"));
......
......@@ -75,7 +75,7 @@ BondWidget::BondWidget(const QString & masterUuid, const NetworkManager::Setting
connect(m_ui->ifaceName, &KLineEdit::textChanged, this, &BondWidget::slotWidgetChanged);
connect(m_ui->arpTargets, &KLineEdit::textChanged, this, &BondWidget::slotWidgetChanged);
connect(m_ui->linkMonitoring, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &BondWidget::slotWidgetChanged);
connect(m_ui->linkMonitoring, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &BondWidget::slotWidgetChanged);
// Connect for setting check
watchChangedSetting();
......
......@@ -78,11 +78,11 @@ 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);
connect(m_widget->firewallZone, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ConnectionWidget::settingChanged);
connect(m_widget->firewallZone, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ConnectionWidget::settingChanged);
connect(m_widget->firewallZone, &QComboBox::currentTextChanged, this, &ConnectionWidget::settingChanged);
connect(m_widget->vpnCombobox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ConnectionWidget::settingChanged);
connect(m_widget->vpnCombobox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ConnectionWidget::settingChanged);
connect(m_widget->vpnCombobox, &QComboBox::currentTextChanged, this, &ConnectionWidget::settingChanged);
connect(m_widget->prioritySpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &ConnectionWidget::settingChanged);
connect(m_widget->prioritySpin, QOverload<int>::of(&QSpinBox::valueChanged), this, &ConnectionWidget::settingChanged);
connect(m_widget->pushButtonPermissions, &QPushButton::clicked, this, &ConnectionWidget::openAdvancedPermissions);
}
......
......@@ -104,7 +104,7 @@ IPv4Widget::IPv4Widget(const NetworkManager::Setting::Ptr &setting, QWidget* par
loadConfig(setting);
}
connect(m_ui->method, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &IPv4Widget::slotModeComboChanged);
connect(m_ui->method, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &IPv4Widget::slotModeComboChanged);
slotModeComboChanged(m_ui->method->currentIndex());
connect(m_ui->btnRoutes, &QPushButton::clicked, this, &IPv4Widget::slotRoutesDialog);
......@@ -114,7 +114,7 @@ IPv4Widget::IPv4Widget(const NetworkManager::Setting::Ptr &setting, QWidget* par
// Connect for validity check
connect(m_ui->dns, &KLineEdit::textChanged, this, &IPv4Widget::slotWidgetChanged);
connect(m_ui->method, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &IPv4Widget::slotWidgetChanged);
connect(m_ui->method, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &IPv4Widget::slotWidgetChanged);
connect(&d->model, &QStandardItemModel::dataChanged, this, &IPv4Widget::slotWidgetChanged);
connect(&d->model, &QStandardItemModel::rowsRemoved, this, &IPv4Widget::slotWidgetChanged);
......
......@@ -93,7 +93,7 @@ IPv6Widget::IPv6Widget(const NetworkManager::Setting::Ptr &setting, QWidget* par
loadConfig(setting);
}
connect(m_ui->method, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &IPv6Widget::slotModeComboChanged);
connect(m_ui->method, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &IPv6Widget::slotModeComboChanged);
slotModeComboChanged(m_ui->method->currentIndex());
connect(m_ui->btnRoutes, &QPushButton::clicked, this, &IPv6Widget::slotRoutesDialog);
......@@ -103,7 +103,7 @@ IPv6Widget::IPv6Widget(const NetworkManager::Setting::Ptr &setting, QWidget* par
// Connect for validity check
connect(m_ui->dns, &KLineEdit::textChanged, this, &IPv6Widget::slotWidgetChanged);
connect(m_ui->method, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &IPv6Widget::slotWidgetChanged);
connect(m_ui->method, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &IPv6Widget::slotWidgetChanged);
connect(&d->model, &QStandardItemModel::dataChanged, this, &IPv6Widget::slotWidgetChanged);
connect(&d->model, &QStandardItemModel::rowsRemoved, this, &IPv6Widget::slotWidgetChanged);
......
......@@ -76,7 +76,7 @@ Security8021x::Security8021x(const NetworkManager::Setting::Ptr &setting, bool w
watchChangedSetting();
// Connect for validity check
connect(m_ui->auth, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &Security8021x::slotWidgetChanged);
connect(m_ui->auth, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &Security8021x::slotWidgetChanged);
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,7 +34,7 @@ VlanWidget::VlanWidget(const NetworkManager::Setting::Ptr &setting, QWidget* par
fillConnections();
connect(m_ui->ifaceName, &KLineEdit::textChanged, this, &VlanWidget::slotWidgetChanged);
connect(m_ui->parent, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &VlanWidget::slotWidgetChanged);
connect(m_ui->parent, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &VlanWidget::slotWidgetChanged);
connect(m_ui->parent->lineEdit(), &QLineEdit::textChanged, this, &VlanWidget::slotWidgetChanged);
// Connect for setting check
......
......@@ -36,9 +36,9 @@ WifiConnectionWidget::WifiConnectionWidget(const NetworkManager::Setting::Ptr &s
m_ui->setupUi(this);
connect(m_ui->btnRandomMacAddr, &QPushButton::clicked, this, &WifiConnectionWidget::generateRandomClonedMac);
connect(m_ui->SSIDCombo, &SsidComboBox::ssidChanged, this, static_cast<void (WifiConnectionWidget::*)()>(&WifiConnectionWidget::ssidChanged));
connect(m_ui->modeComboBox, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &WifiConnectionWidget::modeChanged);
connect(m_ui->band, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &WifiConnectionWidget::bandChanged);
connect(m_ui->SSIDCombo, &SsidComboBox::ssidChanged, this, QOverload<>::of(&WifiConnectionWidget::ssidChanged));
connect(m_ui->modeComboBox, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &WifiConnectionWidget::modeChanged);
connect(m_ui->band, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &WifiConnectionWidget::bandChanged);
// Connect for setting check
watchChangedSetting();
......
......@@ -44,8 +44,8 @@ WifiSecurity::WifiSecurity(const NetworkManager::Setting::Ptr &setting, const Ne
m_ui->stackedWidget->insertWidget(3, m_8021xWidget);
m_ui->stackedWidget->insertWidget(5, m_WPA2Widget);
connect(m_ui->securityCombo, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &WifiSecurity::securityChanged);
connect(m_ui->wepIndex, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &WifiSecurity::setWepKey);
connect(m_ui->securityCombo, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &WifiSecurity::securityChanged);
connect(m_ui->wepIndex, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &WifiSecurity::setWepKey);
// Connect for setting check
watchChangedSetting();
......@@ -58,8 +58,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);
connect(m_ui->wepIndex, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &WifiSecurity::slotWidgetChanged);
connect(m_ui->securityCombo, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &WifiSecurity::slotWidgetChanged);
connect(m_ui->wepIndex, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &WifiSecurity::slotWidgetChanged);
connect(m_ui->securityCombo, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &WifiSecurity::slotWidgetChanged);
connect(m_8021xWidget, &Security8021x::validChanged, this, &WifiSecurity::slotWidgetChanged);
connect(m_WPA2Widget, &Security8021x::validChanged, this, &WifiSecurity::slotWidgetChanged);
......
......@@ -46,7 +46,7 @@ WiredConnectionWidget::WiredConnectionWidget(const NetworkManager::Setting::Ptr
connect(m_widget->autonegotiate, &QCheckBox::stateChanged, this, &WiredConnectionWidget::slotWidgetChanged);
connect(m_widget->clonedMacAddress, &KLineEdit::textChanged, this, &WiredConnectionWidget::slotWidgetChanged);
connect(m_widget->macAddress, &HwAddrComboBox::hwAddressChanged, this, &WiredConnectionWidget::slotWidgetChanged);
connect(m_widget->speed, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &WiredConnectionWidget::slotWidgetChanged);
connect(m_widget->speed, QOverload<int>::of(&QSpinBox::valueChanged), this, &WiredConnectionWidget::slotWidgetChanged);
KAcceleratorManager::manage(this);
......
......@@ -38,7 +38,7 @@ BssidComboBox::BssidComboBox(QWidget *parent) :
setInsertPolicy(QComboBox::NoInsert);
connect(this, &BssidComboBox::editTextChanged, this, &BssidComboBox::slotEditTextChanged);
connect(this, static_cast<void (BssidComboBox::*)(int)>(&BssidComboBox::activated), this, &BssidComboBox::slotCurrentIndexChanged);
connect(this, QOverload<int>::of(&BssidComboBox::activated), this, &BssidComboBox::slotCurrentIndexChanged);
}
QString BssidComboBox::bssid() const
......
......@@ -38,7 +38,7 @@ HwAddrComboBox::HwAddrComboBox(QWidget *parent) :
setInsertPolicy(QComboBox::NoInsert);
connect(this, &HwAddrComboBox::editTextChanged, this, &HwAddrComboBox::slotEditTextChanged);
connect(this, static_cast<void (HwAddrComboBox::*)(int)>(&HwAddrComboBox::currentIndexChanged), this, &HwAddrComboBox::slotCurrentIndexChanged);
connect(this, QOverload<int>::of(&HwAddrComboBox::currentIndexChanged), this, &HwAddrComboBox::slotCurrentIndexChanged);
}
bool HwAddrComboBox::isValid() const
......
......@@ -141,7 +141,7 @@ void MobileConnectionWizard::initializePage(int id)
break;
case 3: // Plans Page
disconnect(mPlanComboBox, static_cast<void (KComboBox::*)(const QString &)>(&KComboBox::currentIndexChanged), this, &MobileConnectionWizard::slotEnablePlanEditBox);
disconnect(mPlanComboBox, QOverload<const QString &>::of(&KComboBox::currentIndexChanged), this, &MobileConnectionWizard::slotEnablePlanEditBox);
mPlanComboBox->clear();
if (type() != NetworkManager::ConnectionSettings::Gsm) {
goto OUT_3;
......@@ -170,7 +170,7 @@ void MobileConnectionWizard::initializePage(int id)
mPlanComboBox->setCurrentIndex(0);
slotEnablePlanEditBox(mPlanComboBox->currentText());
OUT_3:
connect(mPlanComboBox, static_cast<void (KComboBox::*)(const QString &)>(&KComboBox::currentIndexChanged), this, &MobileConnectionWizard::slotEnablePlanEditBox);
connect(mPlanComboBox, QOverload<const QString &>::of(&KComboBox::currentIndexChanged), this, &MobileConnectionWizard::slotEnablePlanEditBox);
break;
case 4: // Confirm Page
......
......@@ -65,7 +65,7 @@ PasswordField::PasswordField(QWidget *parent, Qt::WindowFlags f)
m_currentPasswordOption = StoreForAllUsers;
}
connect(m_passwordOptionsMenu, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &PasswordField::changePasswordOption);
connect(m_passwordOptionsMenu, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PasswordField::changePasswordOption);
// Disable by default
m_passwordOptionsMenu->setVisible(false);
......
......@@ -69,7 +69,7 @@ void SettingWidget::watchChangedSetting()
// Connect all QComboBox widgets
QList<QComboBox *> comboboxes = findChildren<QComboBox *>();
Q_FOREACH (QComboBox *combobox, comboboxes) {
connect(combobox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &SettingWidget::settingChanged);
connect(combobox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SettingWidget::settingChanged);
connect(combobox, &QComboBox::currentTextChanged, this, &SettingWidget::settingChanged);
}
......@@ -88,7 +88,7 @@ void SettingWidget::watchChangedSetting()
// Connect all QSpinBox widgets
QList<QSpinBox *> spinboxes = findChildren<QSpinBox *>();
Q_FOREACH (QSpinBox *spinbox, spinboxes) {
connect(spinbox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &SettingWidget::settingChanged);
connect(spinbox, QOverload<int>::of(&QSpinBox::valueChanged), this, &SettingWidget::settingChanged);
}
// Connect all KUrlRequester widgets
......
......@@ -39,7 +39,7 @@ SsidComboBox::SsidComboBox(QWidget *parent) :
setInsertPolicy(QComboBox::NoInsert);
connect(this, &SsidComboBox::editTextChanged, this, &SsidComboBox::slotEditTextChanged);
connect(this, static_cast<void (SsidComboBox::*)(int)>(&SsidComboBox::activated), this, &SsidComboBox::slotCurrentIndexChanged);
connect(this, QOverload<int>::of(&SsidComboBox::activated), this, &SsidComboBox::slotCurrentIndexChanged);
}
QString SsidComboBox::ssid() const
......
......@@ -103,7 +103,7 @@ OpenconnectAuthWidget::OpenconnectAuthWidget(const NetworkManager::VpnSetting::P
d->cancelPipes[1] = -1;
}
connect(d->ui.cmbLogLevel, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &OpenconnectAuthWidget::logLevelChanged);
connect(d->ui.cmbLogLevel, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OpenconnectAuthWidget::logLevelChanged);
connect(d->ui.viewServerLog, &QCheckBox::toggled, this, &OpenconnectAuthWidget::viewServerLogToggled);
connect(d->ui.btnConnect, &QPushButton::clicked, this, &OpenconnectAuthWidget::connectHost);
......@@ -117,17 +117,17 @@ OpenconnectAuthWidget::OpenconnectAuthWidget(const NetworkManager::VpnSetting::P
// and which needs to be populated with settings we get from NM, like host, certificate or private key
d->vpninfo = d->worker->getOpenconnectInfo();
connect(d->worker, static_cast<void (OpenconnectAuthWorkerThread::*)(const QString &, const QString &, const QString &, bool*)>(&OpenconnectAuthWorkerThread::validatePeerCert), this, &OpenconnectAuthWidget::validatePeerCert);
connect(d->worker, QOverload<const QString &, const QString &, const QString &, bool*>::of(&OpenconnectAuthWorkerThread::validatePeerCert), this, &OpenconnectAuthWidget::validatePeerCert);
connect(d->worker, &OpenconnectAuthWorkerThread::processAuthForm, this, &OpenconnectAuthWidget::processAuthForm);
connect(d->worker, &OpenconnectAuthWorkerThread::updateLog, this, &OpenconnectAuthWidget::updateLog);
connect(d->worker, static_cast<void (OpenconnectAuthWorkerThread::*)(const QString&)>(&OpenconnectAuthWorkerThread::writeNewConfig), this, &OpenconnectAuthWidget::writeNewConfig);
connect(d->worker, QOverload<const QString&>::of(&OpenconnectAuthWorkerThread::writeNewConfig), this, &OpenconnectAuthWidget::writeNewConfig);
connect(d->worker, &OpenconnectAuthWorkerThread::cookieObtained, this, &OpenconnectAuthWidget::workerFinished);
readConfig();
readSecrets();
// This might be set by readSecrets() so don't connect it until now
connect(d->ui.cmbHosts, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &OpenconnectAuthWidget::connectHost);
connect(d->ui.cmbHosts, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OpenconnectAuthWidget::connectHost);
KAcceleratorManager::manage(this);
}
......@@ -475,7 +475,7 @@ void OpenconnectAuthWidget::processAuthForm(struct oc_auth_form *form)
}
}
if (sopt == AUTHGROUP_OPT(form)) {
connect(cmb, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &OpenconnectAuthWidget::formGroupChanged);
connect(cmb, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OpenconnectAuthWidget::formGroupChanged);
}
widget = qobject_cast<QWidget*>(cmb);
}
......
......@@ -72,9 +72,9 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P
m_ui->proxyPassword->setPasswordOptionsEnabled(true);
m_ui->proxyPassword->setPasswordNotRequiredEnabled(true);
connect(m_ui->cbCertCheck, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &OpenVpnAdvancedWidget::certCheckTypeChanged);
connect(m_ui->cmbProxyType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &OpenVpnAdvancedWidget::proxyTypeChanged);
connect(m_ui->cboTLSMode, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [this] (int index) {
connect(m_ui->cbCertCheck, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OpenVpnAdvancedWidget::certCheckTypeChanged);
connect(m_ui->cmbProxyType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OpenVpnAdvancedWidget::proxyTypeChanged);
connect(m_ui->cboTLSMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this] (int index) {
if (index == 0) {
m_ui->kurlTlsAuthKey->setDisabled(true);
m_ui->cboDirection->setDisabled(true);
......@@ -95,17 +95,17 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P
d->openvpnCipherProcess = new KProcess(this);
d->openvpnCipherProcess->setOutputChannelMode(KProcess::OnlyStdoutChannel);
d->openvpnCipherProcess->setReadChannel(QProcess::StandardOutput);
connect(d->openvpnCipherProcess, static_cast<void (KProcess::*)(QProcess::ProcessError)>(&KProcess::error), this, &OpenVpnAdvancedWidget::openVpnCipherError);
connect(d->openvpnCipherProcess, QOverload<QProcess::ProcessError>::of(&KProcess::error), this, &OpenVpnAdvancedWidget::openVpnCipherError);
connect(d->openvpnCipherProcess, &KProcess::readyReadStandardOutput, this, &OpenVpnAdvancedWidget::gotOpenVpnCipherOutput);
connect(d->openvpnCipherProcess, static_cast<void (KProcess::*)(int, QProcess::ExitStatus)>(&KProcess::finished), this, &OpenVpnAdvancedWidget::openVpnCipherFinished);
connect(d->openvpnCipherProcess, QOverload<int, QProcess::ExitStatus>::of(&KProcess::finished), this, &OpenVpnAdvancedWidget::openVpnCipherFinished);
d->openvpnCipherProcess->setProgram(openVpnBinary, ciphersArgs);
d->openvpnVersionProcess = new KProcess(this);
d->openvpnVersionProcess->setOutputChannelMode(KProcess::OnlyStdoutChannel);
d->openvpnVersionProcess->setReadChannel(QProcess::StandardOutput);
connect(d->openvpnVersionProcess, static_cast<void (KProcess::*)(QProcess::ProcessError)>(&KProcess::error), this, &OpenVpnAdvancedWidget::openVpnVersionError);
connect(d->openvpnVersionProcess, QOverload<QProcess::ProcessError>::of(&KProcess::error), this, &OpenVpnAdvancedWidget::openVpnVersionError);
connect(d->openvpnVersionProcess, &KProcess::readyReadStandardOutput, this, &OpenVpnAdvancedWidget::gotOpenVpnVersionOutput);
connect(d->openvpnVersionProcess, static_cast<void (KProcess::*)(int, QProcess::ExitStatus)>(&KProcess::finished), this, &OpenVpnAdvancedWidget::openVpnVersionFinished);
connect(d->openvpnVersionProcess, QOverload<int, QProcess::ExitStatus>::of(&KProcess::finished), this, &OpenVpnAdvancedWidget::openVpnVersionFinished);
d->openvpnVersionProcess->setProgram(openVpnBinary, versionArgs);
connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, &OpenVpnAdvancedWidget::accept);
......
......@@ -53,7 +53,7 @@ SshSettingWidget::SshSettingWidget(const NetworkManager::VpnSetting::Ptr &settin
d->ui.le_password->setPasswordOptionsEnabled(true);
connect(d->ui.cmb_authType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &SshSettingWidget::authTypeChanged);
connect(d->ui.cmb_authType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SshSettingWidget::authTypeChanged);
connect(d->ui.btn_advancedOption, &QPushButton::clicked, this, &SshSettingWidget::doAdvancedDialog);
d->advancedDlg = new QDialog(this);
......
......@@ -161,8 +161,8 @@ NMVariantMapMap VpncUiPlugin::importConnectionSettings(const QString &fileName)
decrPlugin->ciscoDecrypt = new KProcess(decrPlugin);
decrPlugin->ciscoDecrypt->setOutputChannelMode(KProcess::OnlyStdoutChannel);
decrPlugin->ciscoDecrypt->setReadChannel(QProcess::StandardOutput);
connect(decrPlugin->ciscoDecrypt, static_cast<void (KProcess::*)(QProcess::ProcessError)>(&KProcess::error), decrPlugin, &VpncUiPluginPrivate::ciscoDecryptError);
connect(decrPlugin->ciscoDecrypt, static_cast<void (KProcess::*)(int, QProcess::ExitStatus)>(&KProcess::finished), decrPlugin, &VpncUiPluginPrivate::ciscoDecryptFinished);
connect(decrPlugin->ciscoDecrypt, QOverload<QProcess::ProcessError>::of(&KProcess::error), decrPlugin, &VpncUiPluginPrivate::ciscoDecryptError);
connect(decrPlugin->ciscoDecrypt, QOverload<int, QProcess::ExitStatus>::of(&KProcess::finished), decrPlugin, &VpncUiPluginPrivate::ciscoDecryptFinished);
connect(decrPlugin->ciscoDecrypt, &KProcess::readyReadStandardOutput, decrPlugin, &VpncUiPluginPrivate::gotCiscoDecryptOutput);
NMStringMap data;
......
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