Commit cfa9ee29 authored by David Redondo's avatar David Redondo 🏎
Browse files

Port from deprecated QProcess signals

parent 6db931f0
......@@ -123,7 +123,7 @@ void KSolidNotify::connectSignals(Solid::Device *device)
void KSolidNotify::queryBlockingApps(const QString &devicePath)
{
QProcess *p = new QProcess;
connect(p, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), [=](QProcess::ProcessError) {
connect(p, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::errorOccurred), [=](QProcess::ProcessError) {
emit blockingAppsReady({});
p->deleteLater();
});
......
......@@ -66,7 +66,7 @@ Feedback::Feedback(QObject *parent, const QVariantList &args)
p->setProgram(exec);
p->setArguments({QStringLiteral("--feedback")});
p->start();
connect(p, QOverload<int>::of(&QProcess::finished), this, &Feedback::programFinished);
connect(p, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &Feedback::programFinished);
processes << p;
}
}
......
......@@ -93,7 +93,7 @@ int main(int argc, char *argv[])
arguments << QString::number(pipeFds[1]);
p.setArguments(arguments);
QObject::connect(&p, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), &app,
QObject::connect(&p, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::errorOccurred), &app,
[] {
QCoreApplication::exit(1);
}
......
......@@ -361,7 +361,7 @@ void StartupPhase2::runUserAutostart()
auto p = new KProcess; //deleted in onFinished lambda
p->setProgram(fullPath);
p->start();
connect(p, static_cast<void (QProcess::*)(int)>(&QProcess::finished), [p](int exitCode) {
connect(p, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [p](int exitCode) {
qCInfo(PLASMA_SESSION) << "autostart script" << p->program() << "finished with exit code " << exitCode;
p->deleteLater();
});
......@@ -486,7 +486,7 @@ StartProcessJob::StartProcessJob(const QString &process, const QStringList &args
env.insert(additionalEnv);
m_process->setProcessEnvironment(env);
connect(m_process, static_cast<void (QProcess::*)(int)>(&QProcess::finished), [this](int exitCode) {
connect(m_process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [this](int exitCode) {
qCInfo(PLASMA_SESSION) << "process job " << m_process->program() << "finished with exit code " << exitCode;
emitResult();
});
......
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