diff --git a/applets/kicker/plugin/kastatsfavoritesmodel.cpp b/applets/kicker/plugin/kastatsfavoritesmodel.cpp index cdc4554e4..156f6e778 100644 --- a/applets/kicker/plugin/kastatsfavoritesmodel.cpp +++ b/applets/kicker/plugin/kastatsfavoritesmodel.cpp @@ -546,7 +546,7 @@ void KAStatsFavoritesModel::portOldFavorites(const QStringList &ids) qCDebug(KICKER_DEBUG) << "Save ordering (from portOldFavorites) -->"; Private::saveOrdering(ids, clientId, m_activities->currentActivity()); - QTimer::singleShot(500, std::bind(&KAStatsFavoritesModel::initForClient, this, clientId)); + QTimer::singleShot(500, this, std::bind(&KAStatsFavoritesModel::initForClient, this, clientId)); } void KAStatsFavoritesModel::addFavorite(const QString &id, int index) diff --git a/applets/notifications/filemenu.cpp b/applets/notifications/filemenu.cpp index a459a471c..c287cbc19 100644 --- a/applets/notifications/filemenu.cpp +++ b/applets/notifications/filemenu.cpp @@ -138,7 +138,7 @@ void FileMenu::open(int x, int y) // KStandardAction? But then the Ctrl+C shortcut makes no sense in this context QAction *copyAction = menu->addAction(QIcon::fromTheme(QStringLiteral("edit-copy")), i18n("&Copy")); - connect(copyAction, &QAction::triggered, [fileItem] { + connect(copyAction, &QAction::triggered, this, [fileItem] { // inspired by KDirModel::mimeData() QMimeData *data = new QMimeData(); // who cleans it up? KUrlMimeData::setUrls({fileItem.url()}, {fileItem.mostLocalUrl()}, data); @@ -146,7 +146,7 @@ void FileMenu::open(int x, int y) }); QAction *copyPathAction = menu->addAction(QIcon::fromTheme(QStringLiteral("edit-copy")), i18nc("@action:incontextmenu", "Copy Location")); - connect(copyPathAction, &QAction::triggered, [fileItem] { + connect(copyPathAction, &QAction::triggered, this, [fileItem] { QString path = fileItem.localPath(); if (path.isEmpty()) { path = fileItem.url().toDisplayString(); diff --git a/libtaskmanager/startuptasksmodel.cpp b/libtaskmanager/startuptasksmodel.cpp index ec82e6200..f042809a3 100644 --- a/libtaskmanager/startuptasksmodel.cpp +++ b/libtaskmanager/startuptasksmodel.cpp @@ -122,7 +122,7 @@ void StartupTasksModel::Private::loadConfig() // windows appear is not reliable. Add some grace time to make // an overlap more likely, giving a proxy some time to arbitrate // between the two. - QTimer::singleShot(500, [this, id]() { + QTimer::singleShot(500, q, [this, id]() { const int row = startups.indexOf(id); if (row != -1) { diff --git a/shell/alternativeshelper.cpp b/shell/alternativeshelper.cpp index af3047062..c97b27b47 100644 --- a/shell/alternativeshelper.cpp +++ b/shell/alternativeshelper.cpp @@ -75,7 +75,7 @@ void AlternativesHelper::loadAlternative(const QString &plugin) m_applet->destroy(); - connect(m_applet, &QObject::destroyed, [=]() { + connect(m_applet, &QObject::destroyed, contItem, [=]() { Plasma::Applet *newApplet = nullptr; QMetaObject::invokeMethod(contItem, "createApplet",