Fix warnings
Don't pass objects to lambdas that get unused. Don't connect to lambdas without specifying the target object, if an object reference is passed to the lambda.
This commit is contained in:
parent
39d1db6e49
commit
756a21a6ff
@ -187,7 +187,7 @@ void AppletPrivate::init(const QString &_packagePath, const QVariantList &args)
|
||||
QAction *a = new QAction(QIcon::fromTheme(QStringLiteral("widget-alternatives")), i18n("Show Alternatives..."), q);
|
||||
a->setVisible(false);
|
||||
q->actions()->addAction(QStringLiteral("alternatives"), a);
|
||||
QObject::connect(a, &QAction::triggered, [this] {
|
||||
QObject::connect(a, &QAction::triggered, q, [this] {
|
||||
if (q->containment()) {
|
||||
emit q->containment()->appletAlternativesRequested(q);
|
||||
}
|
||||
@ -287,7 +287,7 @@ void AppletPrivate::askDestroy()
|
||||
|
||||
actions.append(i18n("Undo"));
|
||||
deleteNotification->setActions(actions);
|
||||
QObject::connect(deleteNotification.data(), &KNotification::action1Activated,
|
||||
QObject::connect(deleteNotification.data(), &KNotification::action1Activated, q,
|
||||
[=]() {
|
||||
setDestroyed(false);
|
||||
if (!q->isContainment() && q->containment()) {
|
||||
|
@ -171,7 +171,7 @@ void AppletInterface::init()
|
||||
|
||||
applet()->updateConstraints(Plasma::Types::UiReadyConstraint);
|
||||
|
||||
connect(applet(), &Plasma::Applet::activated,
|
||||
connect(applet(), &Plasma::Applet::activated, this,
|
||||
[ = ]() {
|
||||
// in case the applet doesn't want to get shrinked on reactivation,
|
||||
// we always expand it again (only in order to conform with legacy behaviour)
|
||||
|
@ -150,7 +150,7 @@ void ContainmentInterface::init()
|
||||
|
||||
connect(m_containment.data(), &Plasma::Containment::activityChanged,
|
||||
this, &ContainmentInterface::activityChanged);
|
||||
connect(m_containment.data(), &Plasma::Containment::activityChanged,
|
||||
connect(m_containment.data(), &Plasma::Containment::activityChanged, this,
|
||||
[ = ]() {
|
||||
delete m_activityInfo;
|
||||
m_activityInfo = new KActivities::Info(m_containment->activity(), this);
|
||||
@ -656,7 +656,7 @@ void ContainmentInterface::mimeTypeRetrieved(KIO::Job *job, const QString &mimet
|
||||
|
||||
KJob *installJob = package.update(packagePath);
|
||||
connect(installJob, &KJob::result, this, [this, packagePath, structure, posi](KJob *job) {
|
||||
auto fail = [job](const QString &text) {
|
||||
auto fail = [](const QString &text) {
|
||||
KNotification::event(QStringLiteral("plasmoidInstallationFailed"), i18n("Package Installation Failed"),
|
||||
text, QStringLiteral("dialog-error"), nullptr, KNotification::CloseOnTimeout, QStringLiteral("plasma_workspace"));
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user