Commit d0974fdc authored by Harald Sitter's avatar Harald Sitter 🚔

don't connect to lambdas and call slots when you can just call the slots

the lambdas were really unnecessary. both deleteLater and restart
are losts, and arg-less ones at that, so instead of using a lambda we can
just connect to the slots directly.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 282b2cba
......@@ -46,9 +46,7 @@ StatusNotifier::StatusNotifier(QObject *parent)
connect(m_autoCloseTimer, &QTimer::timeout, this, &StatusNotifier::expired);
connect(this, &StatusNotifier::activated, this, [this] {
connect(this, &StatusNotifier::activated, this, &StatusNotifier::deleteLater);
KService::Ptr service = KService::serviceByStorageId(crashedApp->fakeExecutableBaseName());
if (service) {
......@@ -75,9 +73,7 @@ StatusNotifier::StatusNotifier(QObject *parent)
if (canBeRestarted(crashedApp)) {
action = new QAction(QIcon::fromTheme(QStringLiteral("system-reboot")),
i18n("&Restart Application"), nullptr);
connect(action, &QAction::triggered, this, [crashedApp] {
connect(action, &QAction::triggered, crashedApp, &CrashedApplication::restart);
// once restarted successfully, disable restart option
connect(crashedApp, &CrashedApplication::restarted, action, [action](bool success) {
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