Commit 5259eaed authored by Alexander Volkov's avatar Alexander Volkov
Browse files

Use lambdas instead of std::bind()

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: bruns, davidedmundson, ivan, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16250
parent 0a44f73b
......@@ -103,8 +103,9 @@ void IdleInterface::Private::getIdleTimeoutCallback(wl_client *client, wl_resour
return;
}
p->idleTimeouts << idleTimeout;
QObject::connect(idleTimeout, &IdleTimeoutInterface::aboutToBeUnbound, p->q,
std::bind(&QVector<IdleTimeoutInterface*>::removeOne, p->idleTimeouts, idleTimeout));
QObject::connect(idleTimeout, &IdleTimeoutInterface::aboutToBeUnbound, p->q, [p, idleTimeout]() {
p->idleTimeouts.removeOne(idleTimeout);
});
idleTimeout->d_func()->setup(timeout);
}
......
......@@ -83,7 +83,7 @@ void LockedPointerInterface::Private::commit()
LockedPointerInterface::LockedPointerInterface(Private *p, QObject *parent)
: Resource(p, parent)
{
connect(this, &LockedPointerInterface::unbound, this, std::bind(&LockedPointerInterface::setLocked, this, false));
connect(this, &LockedPointerInterface::unbound, this, [this]() { setLocked(false); });
}
LockedPointerInterface::~LockedPointerInterface() = default;
......@@ -165,7 +165,7 @@ void ConfinedPointerInterface::Private::commit()
ConfinedPointerInterface::ConfinedPointerInterface(Private *p, QObject *parent)
: Resource(p, parent)
{
connect(this, &ConfinedPointerInterface::unbound, this, std::bind(&ConfinedPointerInterface::setConfined, this, false));
connect(this, &ConfinedPointerInterface::unbound, this, [this]() { setConfined(false); });
}
ConfinedPointerInterface::~ConfinedPointerInterface() = default;
......
Supports Markdown
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