Changeset View
Changeset View
Standalone View
Standalone View
tabsrunner/tabsrunner.cpp
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | 94 | QDBusMessage message = | |||
---|---|---|---|---|---|
95 | QDBusMessage::createMethodCall(service, | 95 | QDBusMessage::createMethodCall(service, | ||
96 | QStringLiteral("/TabsRunner"), | 96 | QStringLiteral("/TabsRunner"), | ||
97 | QStringLiteral("org.kde.plasma.browser_integration.TabsRunner"), | 97 | QStringLiteral("org.kde.plasma.browser_integration.TabsRunner"), | ||
98 | QStringLiteral("GetTabs") | 98 | QStringLiteral("GetTabs") | ||
99 | ); | 99 | ); | ||
100 | 100 | | |||
101 | QDBusMessage reply = QDBusConnection::sessionBus().call(message); | 101 | QDBusMessage reply = QDBusConnection::sessionBus().call(message); | ||
102 | 102 | | |||
103 | // By the time the reply came in, the context might have already been invalidated | ||||
104 | if (!context.isValid()) { | ||||
105 | return; | ||||
106 | } | ||||
107 | | ||||
103 | if (reply.type() != QDBusMessage::ReplyMessage || reply.arguments().length() != 1) { | 108 | if (reply.type() != QDBusMessage::ReplyMessage || reply.arguments().length() != 1) { | ||
104 | continue; | 109 | continue; | ||
105 | } | 110 | } | ||
106 | 111 | | |||
107 | QList<Plasma::QueryMatch> matches; | 112 | QList<Plasma::QueryMatch> matches; | ||
108 | 113 | | |||
109 | auto arg = reply.arguments().at(0).value<QDBusArgument>(); | 114 | auto arg = reply.arguments().at(0).value<QDBusArgument>(); | ||
110 | auto tabvs = qdbus_cast<QList<QVariant>>(arg); | 115 | auto tabvs = qdbus_cast<QList<QVariant>>(arg); | ||
▲ Show 20 Lines • Show All 190 Lines • Show Last 20 Lines |