Commit 943bd852 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port some deprecated methods

parent 2197320c
......@@ -148,7 +148,7 @@ void ModemMonitor::requestPin(MMModemLock lock)
d->dialog = new PinDialog(modem, PinDialog::ModemNetworkSubsetPuk);
}
if (d->dialog.data()->exec() != QDialog::Accepted) {
if (d->dialog.toStrongRef().data()->exec() != QDialog::Accepted) {
goto OUT;
}
......@@ -167,19 +167,19 @@ void ModemMonitor::requestPin(MMModemLock lock)
QDBusPendingCallWatcher *watcher = nullptr;
PinDialog::Type type = d->dialog.data()->type();
PinDialog::Type type = d->dialog.toStrongRef().data()->type();
if (type == PinDialog::SimPin || type == PinDialog::SimPin2 ||
type == PinDialog::ModemServiceProviderPin || type == PinDialog::ModemNetworkPin ||
type == PinDialog::ModemPin || type == PinDialog::ModemCorporatePin ||
type == PinDialog::ModemPhFsimPin || type == PinDialog::ModemNetworkSubsetPin) {
QDBusPendingCall reply = sim->sendPin(d->dialog.data()->pin());
QDBusPendingCall reply = sim->sendPin(d->dialog.toStrongRef().data()->pin());
watcher = new QDBusPendingCallWatcher(reply, sim.data());
} else if (type == PinDialog::SimPuk ||
type == PinDialog::SimPuk2 || type == PinDialog::ModemServiceProviderPuk ||
type == PinDialog::ModemNetworkPuk || type == PinDialog::ModemCorporatePuk ||
type == PinDialog::ModemPhFsimPuk || type == PinDialog::ModemNetworkSubsetPuk) {
QDBusPendingCall reply = sim->sendPuk(d->dialog.data()->puk(), d->dialog.data()->pin());
QDBusPendingCall reply = sim->sendPuk(d->dialog.toStrongRef().data()->puk(), d->dialog.toStrongRef().data()->pin());
watcher = new QDBusPendingCallWatcher(reply, sim.data());
}
......@@ -188,7 +188,7 @@ void ModemMonitor::requestPin(MMModemLock lock)
OUT:
if(d->dialog) {
d->dialog.data()->deleteLater();
d->dialog.toStrongRef().data()->deleteLater();
}
d->dialog.clear();
}
......
......@@ -95,7 +95,7 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P
d->openvpnCipherProcess = new KProcess(this);
d->openvpnCipherProcess->setOutputChannelMode(KProcess::OnlyStdoutChannel);
d->openvpnCipherProcess->setReadChannel(QProcess::StandardOutput);
connect(d->openvpnCipherProcess, QOverload<QProcess::ProcessError>::of(&KProcess::error), this, &OpenVpnAdvancedWidget::openVpnCipherError);
connect(d->openvpnCipherProcess, &KProcess::errorOccurred, this, &OpenVpnAdvancedWidget::openVpnCipherError);
connect(d->openvpnCipherProcess, &KProcess::readyReadStandardOutput, this, &OpenVpnAdvancedWidget::gotOpenVpnCipherOutput);
connect(d->openvpnCipherProcess, QOverload<int, QProcess::ExitStatus>::of(&KProcess::finished), this, &OpenVpnAdvancedWidget::openVpnCipherFinished);
d->openvpnCipherProcess->setProgram(openVpnBinary, ciphersArgs);
......@@ -103,7 +103,7 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P
d->openvpnVersionProcess = new KProcess(this);
d->openvpnVersionProcess->setOutputChannelMode(KProcess::OnlyStdoutChannel);
d->openvpnVersionProcess->setReadChannel(QProcess::StandardOutput);
connect(d->openvpnVersionProcess, QOverload<QProcess::ProcessError>::of(&KProcess::error), this, &OpenVpnAdvancedWidget::openVpnVersionError);
connect(d->openvpnVersionProcess, &KProcess::errorOccurred, this, &OpenVpnAdvancedWidget::openVpnVersionError);
connect(d->openvpnVersionProcess, &KProcess::readyReadStandardOutput, this, &OpenVpnAdvancedWidget::gotOpenVpnVersionOutput);
connect(d->openvpnVersionProcess, QOverload<int, QProcess::ExitStatus>::of(&KProcess::finished), this, &OpenVpnAdvancedWidget::openVpnVersionFinished);
d->openvpnVersionProcess->setProgram(openVpnBinary, versionArgs);
......
......@@ -161,7 +161,7 @@ NMVariantMapMap VpncUiPlugin::importConnectionSettings(const QString &fileName)
decrPlugin->ciscoDecrypt = new KProcess(decrPlugin);
decrPlugin->ciscoDecrypt->setOutputChannelMode(KProcess::OnlyStdoutChannel);
decrPlugin->ciscoDecrypt->setReadChannel(QProcess::StandardOutput);
connect(decrPlugin->ciscoDecrypt, QOverload<QProcess::ProcessError>::of(&KProcess::error), decrPlugin, &VpncUiPluginPrivate::ciscoDecryptError);
connect(decrPlugin->ciscoDecrypt, &KProcess::errorOccurred, decrPlugin, &VpncUiPluginPrivate::ciscoDecryptError);
connect(decrPlugin->ciscoDecrypt, QOverload<int, QProcess::ExitStatus>::of(&KProcess::finished), decrPlugin, &VpncUiPluginPrivate::ciscoDecryptFinished);
connect(decrPlugin->ciscoDecrypt, &KProcess::readyReadStandardOutput, decrPlugin, &VpncUiPluginPrivate::gotCiscoDecryptOutput);
......
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