diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-06-19 23:01:15 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-08-07 20:09:17 +0000 |
commit | 80179e3b7e91bbe4d129b95eab8c6350e26f5569 (patch) | |
tree | 3e44b8b7d3a8033c8dd03585e21f5e27d8ebc71f /src/platformsupport/themes/genericunix/dbustray | |
parent | 5f1f0fe0b71c19be041ec85a9449584649c9fc18 (diff) |
Port users of QDBusAbstractInterface::(async)callWithArgumentList() to new variadic (async)Call()
Except in the auto-generated files.
Required to add a cast operator from QDBusObjectPath to QVariant, as the
variadic call() uses QVariant(arg) instead of QVariant::fromValue(arg).
[ChangeLog][QtDBus][QDBusObjectPath] Added explicit cast operator to QVariant.
Change-Id: I3f3004f7b9300a6340d27488f5b97981cbab3c24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/platformsupport/themes/genericunix/dbustray')
-rw-r--r-- | src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h b/src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h index ab99ea65dd..2194a787eb 100644 --- a/src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h +++ b/src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h @@ -95,26 +95,21 @@ public: public Q_SLOTS: // METHODS inline QDBusPendingReply<> closeNotification(uint id) { - QList<QVariant> argumentList; - argumentList << QVariant::fromValue(id); - return asyncCallWithArgumentList(QStringLiteral("CloseNotification"), argumentList); + return asyncCall(QStringLiteral("CloseNotification"), id); } inline QDBusPendingReply<QStringList> getCapabilities() { - QList<QVariant> argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetCapabilities"), argumentList); + return asyncCall(QStringLiteral("GetCapabilities")); } inline QDBusPendingReply<QString, QString, QString, QString> getServerInformation() { - QList<QVariant> argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetServerInformation"), argumentList); + return asyncCall(QStringLiteral("GetServerInformation")); } inline QDBusReply<QString> getServerInformation(QString &vendor, QString &version, QString &specVersion) { - QList<QVariant> argumentList; - QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetServerInformation"), argumentList); + QDBusMessage reply = call(QDBus::Block, QStringLiteral("GetServerInformation")); if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 4) { vendor = qdbus_cast<QString>(reply.arguments().at(1)); version = qdbus_cast<QString>(reply.arguments().at(2)); @@ -129,12 +124,7 @@ public Q_SLOTS: // METHODS const QVariantMap &hints, int timeout) { qCDebug(qLcTray) << appName << replacesId << appIcon << summary << body << actions << hints << timeout; - QList<QVariant> argumentList; - argumentList << QVariant::fromValue(appName) << QVariant::fromValue(replacesId) << - QVariant::fromValue(appIcon) << QVariant::fromValue(summary) << - QVariant::fromValue(body) << QVariant::fromValue(actions) << - QVariant::fromValue(hints) << QVariant::fromValue(timeout); - return asyncCallWithArgumentList(QStringLiteral("Notify"), argumentList); + return asyncCall(QStringLiteral("Notify"), appName, replacesId, appIcon, summary, body, actions, hints, timeout); } Q_SIGNALS: |