Future proof the code for C++20
warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20
This commit is contained in:
parent
186ef5e588
commit
19694fb046
5 changed files with 6 additions and 6 deletions
|
@ -108,7 +108,7 @@ void Deleted::copyToDeleted(Window *window)
|
|||
m_caption = window->caption();
|
||||
|
||||
for (auto vd : qAsConst(m_desktops)) {
|
||||
connect(vd, &QObject::destroyed, this, [=] {
|
||||
connect(vd, &QObject::destroyed, this, [=, this] {
|
||||
m_desktops.removeOne(vd);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -456,7 +456,7 @@ QVariantMap ScreenShotDBusInterface2::CaptureInteractive(uint kind,
|
|||
const QDBusMessage replyMessage = message();
|
||||
|
||||
if (kind == 0) {
|
||||
effects->startInteractiveWindowSelection([=](EffectWindow *window) {
|
||||
effects->startInteractiveWindowSelection([=, this](EffectWindow *window) {
|
||||
effects->hideOnScreenMessage(EffectsHandler::OnScreenMessageHideFlag::SkipsCloseAnimation);
|
||||
|
||||
if (!window) {
|
||||
|
@ -473,7 +473,7 @@ QVariantMap ScreenShotDBusInterface2::CaptureInteractive(uint kind,
|
|||
"Escape or right click to cancel."),
|
||||
QStringLiteral("spectacle"));
|
||||
} else {
|
||||
effects->startInteractivePositionSelection([=](const QPoint &point) {
|
||||
effects->startInteractivePositionSelection([=, this](const QPoint &point) {
|
||||
effects->hideOnScreenMessage(EffectsHandler::OnScreenMessageHideFlag::SkipsCloseAnimation);
|
||||
|
||||
if (point == QPoint(-1, -1)) {
|
||||
|
|
|
@ -449,7 +449,7 @@ void EffectsModel::load(LoadOptions options)
|
|||
const int serial = ++m_lastSerial;
|
||||
|
||||
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(interface.areEffectsSupported(effectNames), this);
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, [=](QDBusPendingCallWatcher *self) {
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, [=, this](QDBusPendingCallWatcher *self) {
|
||||
self->deleteLater();
|
||||
|
||||
if (m_lastSerial != serial) {
|
||||
|
|
|
@ -70,7 +70,7 @@ KCMKWinDecoration::KCMKWinDecoration(QObject *parent, const QVariantList &argume
|
|||
connect(this, &KCMKWinDecoration::borderSizeChanged, this, &KCMKWinDecoration::borderIndexChanged);
|
||||
connect(this, &KCMKWinDecoration::themeChanged, this, &KCMKWinDecoration::borderIndexChanged);
|
||||
|
||||
connect(this, &KCMKWinDecoration::themeChanged, this, [=]() {
|
||||
connect(this, &KCMKWinDecoration::themeChanged, this, [this]() {
|
||||
if (m_data->settings()->borderSizeAuto()) {
|
||||
setBorderSize(recommendedBorderSize());
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ void AppMenuManagerInterfacePrivate::org_kde_kwin_appmenu_manager_create(Resourc
|
|||
auto appmenu = new AppMenuInterface(s, appmenu_resource);
|
||||
|
||||
appmenus.append(appmenu);
|
||||
QObject::connect(appmenu, &QObject::destroyed, q, [=]() {
|
||||
QObject::connect(appmenu, &QObject::destroyed, q, [=, this]() {
|
||||
appmenus.removeOne(appmenu);
|
||||
});
|
||||
Q_EMIT q->appMenuCreated(appmenu);
|
||||
|
|
Loading…
Reference in a new issue