diff --git a/keyboard_layout.cpp b/keyboard_layout.cpp index 5a2edc8d19..1a22c54c07 100644 --- a/keyboard_layout.cpp +++ b/keyboard_layout.cpp @@ -269,13 +269,11 @@ void KeyboardLayout::reinitNotifierMenu() p->setProcessEnvironment(kwinApp()->processStartupEnvironment()); p->setProgram(QStringLiteral("kcmshell5")); connect(p, static_cast(&QProcess::finished), p, &QProcess::deleteLater); - connect(p, static_cast(&QProcess::error), this, - [] (QProcess::ProcessError e) { - if (e == QProcess::FailedToStart) { - qCDebug(KWIN_CORE) << "Failed to start kcmshell5"; - } + connect(p, &QProcess::errorOccurred, this, [](QProcess::ProcessError e) { + if (e == QProcess::FailedToStart) { + qCDebug(KWIN_CORE) << "Failed to start kcmshell5"; } - ); + }); p->start(); } ); diff --git a/rules.cpp b/rules.cpp index 843dd40ee9..e610eb11c8 100644 --- a/rules.cpp +++ b/rules.cpp @@ -1051,13 +1051,11 @@ void RuleBook::edit(AbstractClient* c, bool whole_app) p->setProgram(buildDirBinary.exists() ? buildDirBinary.absoluteFilePath() : QStringLiteral(KWIN_RULES_DIALOG_BIN)); p->setProcessChannelMode(QProcess::MergedChannels); connect(p, static_cast(&QProcess::finished), p, &QProcess::deleteLater); - connect(p, static_cast(&QProcess::error), this, - [p] (QProcess::ProcessError e) { - if (e == QProcess::FailedToStart) { - qCDebug(KWIN_CORE) << "Failed to start" << p->program(); - } + connect(p, &QProcess::errorOccurred, this, [p](QProcess::ProcessError e) { + if (e == QProcess::FailedToStart) { + qCDebug(KWIN_CORE) << "Failed to start" << p->program(); } - ); + }); p->start(); } diff --git a/useractions.cpp b/useractions.cpp index 54f4827c04..cdae431175 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -327,13 +327,11 @@ void UserActionsMenu::init() p->setProcessEnvironment(kwinApp()->processStartupEnvironment()); p->setProgram(QStringLiteral("kcmshell5")); connect(p, static_cast(&QProcess::finished), p, &QProcess::deleteLater); - connect(p, static_cast(&QProcess::error), this, - [p] (QProcess::ProcessError e) { - if (e == QProcess::FailedToStart) { - qCDebug(KWIN_CORE) << "Failed to start kcmshell5"; - } + connect(p, &QProcess::errorOccurred, this, [p](QProcess::ProcessError e) { + if (e == QProcess::FailedToStart) { + qCDebug(KWIN_CORE) << "Failed to start kcmshell5"; } - ); + }); p->start(); } ); diff --git a/xwl/xwayland.cpp b/xwl/xwayland.cpp index 5f17d3923c..276a102378 100644 --- a/xwl/xwayland.cpp +++ b/xwl/xwayland.cpp @@ -155,7 +155,7 @@ void Xwayland::init() QStringLiteral("-rootless"), QStringLiteral("-wm"), QString::number(fd)}); - m_xwaylandFailConnection = connect(m_xwaylandProcess, static_cast(&QProcess::error), this, + m_xwaylandFailConnection = connect(m_xwaylandProcess, &QProcess::errorOccurred, this, [this] (QProcess::ProcessError error) { if (error == QProcess::FailedToStart) { std::cerr << "FATAL ERROR: failed to start Xwayland" << std::endl;