diff options
Diffstat (limited to 'tests/dbus/account-channel-dispatcher.cpp')
-rw-r--r-- | tests/dbus/account-channel-dispatcher.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/dbus/account-channel-dispatcher.cpp b/tests/dbus/account-channel-dispatcher.cpp index 8f7f6347..edd89b17 100644 --- a/tests/dbus/account-channel-dispatcher.cpp +++ b/tests/dbus/account-channel-dispatcher.cpp @@ -351,11 +351,25 @@ private: channelHandlerPath, this); ChannelDetails channelDetails = { QDBusObjectPath(mChanPath), mChanProps }; + + + ObjectImmutablePropertiesMap channelRequestProperties; + QVariantMap currentChannelRequestProperties; + currentChannelRequestProperties.insert(TP_QT_IFACE_CHANNEL_REQUEST + QLatin1String(".Account"), QVariant::fromValue(mCurRequest->Account())); + currentChannelRequestProperties.insert(TP_QT_IFACE_CHANNEL_REQUEST + QLatin1String(".UserActionTime"), mCurRequest->UserActionTime()); + currentChannelRequestProperties.insert(TP_QT_IFACE_CHANNEL_REQUEST + QLatin1String(".PreferredHandler"), mCurRequest->PreferredHandler()); + currentChannelRequestProperties.insert(TP_QT_IFACE_CHANNEL_REQUEST + QLatin1String(".Requests"), QVariant::fromValue(mCurRequest->Requests())); + currentChannelRequestProperties.insert(TP_QT_IFACE_CHANNEL_REQUEST + QLatin1String(".Interfaces"), QVariant::fromValue(mCurRequest->Interfaces())); + channelRequestProperties[QDBusObjectPath(mCurRequestPath)] = currentChannelRequestProperties; + + QVariantMap handlerInfo; + handlerInfo.insert(QLatin1String("request-properties"), QVariant::fromValue(channelRequestProperties)); + clientHandlerInterface->HandleChannels(mCurRequest->Account(), QDBusObjectPath(mConnPath), ChannelDetailsList() << channelDetails, ObjectPathList() << QDBusObjectPath(mCurRequestPath), - userActionTime, QVariantMap()); + userActionTime, handlerInfo); } QDBusConnection mBus; @@ -1078,7 +1092,11 @@ void TestAccountChannelDispatcher::testCreateAndHandleChannelHandledAgain() SLOT(onChannelHandledAgain(QDateTime,Tp::ChannelRequestHints))); QDateTime timestamp(QDate::currentDate()); +#if QT_VERSION < QT_VERSION_CHECK(5, 8, 0) mChannelDispatcherAdaptor->invokeHandler(timestamp.toTime_t()); +#else + mChannelDispatcherAdaptor->invokeHandler(timestamp.toSecsSinceEpoch()); +#endif QCOMPARE(mLoop->exec(), 0); QCOMPARE(mChannelHandledAgainActionTime, timestamp); |