Prevent detaching temporary objects
For more info see: https://blogs.kde.org/2015/05/13/simple-qt-container-optimization-you-should-do-your-code
This commit is contained in:
parent
c6a157e50a
commit
a8a8080248
2 changed files with 3 additions and 3 deletions
|
@ -49,7 +49,7 @@ QVariant DBusResponseWaiter::waitForReply(QVariant variant) const
|
|||
|
||||
if (reply.arguments().count() > 0)
|
||||
{
|
||||
return reply.arguments().first();
|
||||
return reply.arguments().at(0);
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
|
@ -95,7 +95,7 @@ void DBusAsyncResponse::onCallFinished(QDBusPendingCallWatcher* watcher)
|
|||
|
||||
if (reply.arguments().count() > 0)
|
||||
{
|
||||
Q_EMIT success(reply.arguments().first());
|
||||
Q_EMIT success(reply.arguments().at(0));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -51,7 +51,7 @@ ScreensaverInhibitPlugin::ScreensaverInhibitPlugin(QObject* parent, const QVaria
|
|||
inhibitCookie = 0;
|
||||
} else {
|
||||
// Store the cookie we receive, this will be sent back when sending the uninhibit call.
|
||||
inhibitCookie = reply.arguments().first().toUInt();
|
||||
inhibitCookie = reply.arguments().at(0).toUInt();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue