Commit 0d7c504c authored by Nicolas Fella's avatar Nicolas Fella

Rename DbusHelper => DBusHelper

parent c6405813
Pipeline #6612 failed with stage
in 6 minutes and 6 seconds
......@@ -167,7 +167,7 @@ int main(int argc, char** argv)
}
} else if(parser.isSet(QStringLiteral("refresh"))) {
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect"), QStringLiteral("org.kde.kdeconnect.daemon"), QStringLiteral("forceOnNetworkChange"));
blockOnReply(DbusHelper::sessionBus().asyncCall(msg));
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
} else {
QString device = parser.value(QStringLiteral("device"));
......@@ -200,7 +200,7 @@ int main(int argc, char** argv)
QStringLiteral("org.kde.kdeconnect.device.share"), QStringLiteral("shareUrls"));
msg.setArguments(QVariantList() << QVariant(urls));
blockOnReply(DbusHelper::sessionBus().asyncCall(msg));
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
for (const QString& url : qAsConst(urls)) {
QTextStream(stdout) << i18n("Shared %1", url) << endl;
......@@ -208,7 +208,7 @@ int main(int argc, char** argv)
} else if (parser.isSet(QStringLiteral("share-text"))) {
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/share"), QStringLiteral("org.kde.kdeconnect.device.share"), QStringLiteral("shareText"));
msg.setArguments(QVariantList() << parser.value(QStringLiteral("share-text")));
blockOnReply(DbusHelper::sessionBus().asyncCall(msg));
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
QTextStream(stdout) << i18n("Shared text: %1", parser.value(QStringLiteral("share-text"))) << endl;
} else if(parser.isSet(QStringLiteral("pair"))) {
DeviceDbusInterface dev(device);
......@@ -251,22 +251,22 @@ int main(int argc, char** argv)
QString message = parser.value(QStringLiteral("ping-msg"));
msg.setArguments(QVariantList() << message);
}
blockOnReply(DbusHelper::sessionBus().asyncCall(msg));
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
} else if(parser.isSet(QStringLiteral("send-sms"))) {
if (parser.isSet(QStringLiteral("destination"))) {
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/sms"), QStringLiteral("org.kde.kdeconnect.device.sms"), QStringLiteral("sendSms"));
msg.setArguments({ parser.value(QStringLiteral("destination")), parser.value(QStringLiteral("send-sms"))});
blockOnReply(DbusHelper::sessionBus().asyncCall(msg));
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
} else {
QTextStream(stderr) << i18n("error: should specify the SMS's recipient by passing --destination <phone number>");
return 1;
}
} else if(parser.isSet(QStringLiteral("ring"))) {
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/findmyphone"), QStringLiteral("org.kde.kdeconnect.device.findmyphone"), QStringLiteral("ring"));
blockOnReply(DbusHelper::sessionBus().asyncCall(msg));
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
} else if(parser.isSet(QStringLiteral("photo"))) {
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/photo"), QStringLiteral("org.kde.kdeconnect.device.photo"), QStringLiteral("requestPhoto"));
blockOnReply(DbusHelper::sessionBus().asyncCall(msg));
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
} else if(parser.isSet(QStringLiteral("send-keys"))) {
QString seq = parser.value(QStringLiteral("send-keys"));
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/remotekeyboard"), QStringLiteral("org.kde.kdeconnect.device.remotekeyboard"), QStringLiteral("sendKeyPress"));
......@@ -277,13 +277,13 @@ int main(int argc, char** argv)
while (!in.atEnd()) {
QByteArray line = in.readLine(); // sanitize to ASCII-codes > 31?
msg.setArguments({QString::fromLatin1(line), -1, false, false, false});
blockOnReply(DbusHelper::sessionBus().asyncCall(msg));
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
}
in.close();
}
} else {
msg.setArguments({seq, -1, false, false, false});
blockOnReply(DbusHelper::sessionBus().asyncCall(msg));
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
}
} else if(parser.isSet(QStringLiteral("list-notifications"))) {
NotificationsModel notifications;
......
......@@ -108,8 +108,8 @@ void Daemon::init()
//Register on DBus
qDBusRegisterMetaType< QMap<QString,QString> >();
DbusHelper::sessionBus().registerService(QStringLiteral("org.kde.kdeconnect"));
DbusHelper::sessionBus().registerObject(QStringLiteral("/modules/kdeconnect"), this, QDBusConnection::ExportScriptableContents);
DBusHelper::sessionBus().registerService(QStringLiteral("org.kde.kdeconnect"));
DBusHelper::sessionBus().registerObject(QStringLiteral("/modules/kdeconnect"), this, QDBusConnection::ExportScriptableContents);
NotificationServerInfo::instance().init();
......
......@@ -36,7 +36,7 @@
#include <QRegularExpressionMatch>
#endif
namespace DbusHelper {
namespace DBusHelper {
#ifdef USE_PRIVATE_DBUS
class DBusInstancePrivate
......
......@@ -30,7 +30,7 @@
#define KDECONNECT_SESSION_DBUS_LAUNCHD_ENV "DBUS_LAUNCHD_SESSION_BUS_SOCKET"
namespace DbusHelper {
namespace DBusHelper {
void KDECONNECTCORE_EXPORT filterNonExportableCharacters(QString& s);
#ifdef USE_PRIVATE_DBUS
......
......@@ -87,7 +87,7 @@ Device::Device(QObject* parent, const QString& id)
d->m_deviceType = str2type(info.deviceType);
//Register in bus
DbusHelper::sessionBus().registerObject(dbusPath(), this, QDBusConnection::ExportScriptableContents | QDBusConnection::ExportAdaptors);
DBusHelper::sessionBus().registerObject(dbusPath(), this, QDBusConnection::ExportScriptableContents | QDBusConnection::ExportAdaptors);
//Assume every plugin is supported until addLink is called and we can get the actual list
d->m_allPlugins = PluginLoader::instance()->getPluginList().toSet();
......@@ -106,7 +106,7 @@ Device::Device(QObject* parent, const NetworkPacket& identityPacket, DeviceLink*
addLink(identityPacket, dl);
//Register in bus
DbusHelper::sessionBus().registerObject(dbusPath(), this, QDBusConnection::ExportScriptableContents | QDBusConnection::ExportAdaptors);
DBusHelper::sessionBus().registerObject(dbusPath(), this, QDBusConnection::ExportScriptableContents | QDBusConnection::ExportAdaptors);
connect(this, &Device::pairingError, this, &warn);
......@@ -199,7 +199,7 @@ void Device::reloadPlugins()
d->m_plugins = newPluginMap;
d->m_pluginsByIncomingCapability = newPluginsByIncomingCapability;
QDBusConnection bus = DbusHelper::sessionBus();
QDBusConnection bus = DBusHelper::sessionBus();
for (KdeConnectPlugin* plugin : qAsConst(d->m_plugins)) {
//TODO: see how it works in Android (only done once, when created)
plugin->connected();
......
......@@ -295,7 +295,7 @@ void KdeConnectConfig::generateCertificate(const QString& certPath)
bool error = false;
QString uuid = QUuid::createUuid().toString();
DbusHelper::filterNonExportableCharacters(uuid);
DBusHelper::filterNonExportableCharacters(uuid);
qCDebug(KDECONNECT_CORE) << "My id:" << uuid;
// FIXME: We only use QCA here to generate the cert and key, would be nice to get rid of it completely.
......
......@@ -43,7 +43,7 @@ KdeConnectPluginConfig::KdeConnectPluginConfig(const QString& deviceId, const QS
d->m_config = new QSettings(d->m_configDir.absoluteFilePath(QStringLiteral("config")), QSettings::IniFormat);
d->m_signal = QDBusMessage::createSignal(QStringLiteral("/kdeconnect/") + deviceId + QStringLiteral("/") + pluginName, QStringLiteral("org.kde.kdeconnect.config"), QStringLiteral("configChanged"));
DbusHelper::sessionBus().connect(QLatin1String(""), QStringLiteral("/kdeconnect/") + deviceId + QStringLiteral("/") + pluginName, QStringLiteral("org.kde.kdeconnect.config"), QStringLiteral("configChanged"), this, SLOT(slotConfigChanged()));
DBusHelper::sessionBus().connect(QLatin1String(""), QStringLiteral("/kdeconnect/") + deviceId + QStringLiteral("/") + pluginName, QStringLiteral("org.kde.kdeconnect.config"), QStringLiteral("configChanged"), this, SLOT(slotConfigChanged()));
}
KdeConnectPluginConfig::~KdeConnectPluginConfig()
......@@ -79,7 +79,7 @@ void KdeConnectPluginConfig::set(const QString& key, const QVariant& value)
{
d->m_config->setValue(key, value);
d->m_config->sync();
DbusHelper::sessionBus().send(d->m_signal);
DBusHelper::sessionBus().send(d->m_signal);
}
void KdeConnectPluginConfig::setList(const QString& key, const QVariantList& list)
......@@ -91,7 +91,7 @@ void KdeConnectPluginConfig::setList(const QString& key, const QVariantList& lis
}
d->m_config->endArray();
d->m_config->sync();
DbusHelper::sessionBus().send(d->m_signal);
DBusHelper::sessionBus().send(d->m_signal);
}
void KdeConnectPluginConfig::slotConfigChanged()
......
......@@ -157,7 +157,7 @@ bool NetworkPacket::unserialize(const QByteArray& a, NetworkPacket* np)
if (np->m_body.contains(QStringLiteral("deviceId")))
{
QString deviceId = np->get<QString>(QStringLiteral("deviceId"));
DbusHelper::filterNonExportableCharacters(deviceId);
DBusHelper::filterNonExportableCharacters(deviceId);
np->set(QStringLiteral("deviceId"), deviceId);
}
......
......@@ -38,7 +38,7 @@ void NotificationServerInfo::init()
{
QDBusMessage query = QDBusMessage::createMethodCall(QStringLiteral("org.freedesktop.Notifications"), QStringLiteral("/org/freedesktop/Notifications"), QStringLiteral("org.freedesktop.Notifications"), QStringLiteral("GetCapabilities"));
QDBusPendingReply<QStringList> reply = DbusHelper::sessionBus().asyncCall(query);
QDBusPendingReply<QStringList> reply = DBusHelper::sessionBus().asyncCall(query);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, reply, watcher] {
watcher->deleteLater();
......
......@@ -139,7 +139,7 @@ int main(int argc, char* argv[])
app.setQuitOnLastWindowClosed(false);
#ifdef USE_PRIVATE_DBUS
DbusHelper::launchDBusDaemon();
DBusHelper::launchDBusDaemon();
#endif
QCommandLineParser parser;
......@@ -154,7 +154,7 @@ int main(int argc, char* argv[])
QStringLiteral("/MainApplication"),
QStringLiteral("org.qtproject.Qt.QCoreApplication"),
QStringLiteral("quit"));
DbusHelper::sessionBus().call(message); //deliberately block until it's done, so we register the name after the app quits
DBusHelper::sessionBus().call(message); //deliberately block until it's done, so we register the name after the app quits
}
KDBusService dbusService(KDBusService::Unique);
......
......@@ -94,7 +94,7 @@ void SendFileItemAction::sendFile()
for (const QUrl& url : urls) {
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/share"), QStringLiteral("org.kde.kdeconnect.device.share"), QStringLiteral("shareUrl"));
msg.setArguments(QVariantList() << url.toString());
DbusHelper::sessionBus().call(msg);
DBusHelper::sessionBus().call(msg);
}
}
......
......@@ -108,7 +108,7 @@ DeviceIndicator::DeviceIndicator(DeviceDbusInterface* device)
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device->id() + QStringLiteral("/share"), QStringLiteral("org.kde.kdeconnect.device.share"), QStringLiteral("shareUrl"));
msg.setArguments(QVariantList() << url.toString());
DbusHelper::sessionBus().call(msg);
DBusHelper::sessionBus().call(msg);
});
setWhenAvailable(device->hasPlugin(QStringLiteral("kdeconnect_share")), [sendFile](bool available) { sendFile->setVisible(available); }, this);
......
......@@ -59,7 +59,7 @@ int main(int argc, char** argv)
#ifdef Q_OS_MAC
// Unset launchctl env, avoid block
DbusHelper::macosUnsetLaunchctlEnv();
DBusHelper::macosUnsetLaunchctlEnv();
// Start kdeconnectd
QProcess kdeconnectdProcess;
......@@ -151,7 +151,7 @@ int main(int argc, char** argv)
QStringLiteral("/MainApplication"),
QStringLiteral("org.qtproject.Qt.QCoreApplication"),
QStringLiteral("quit"));
DbusHelper::sessionBus().call(message);
DBusHelper::sessionBus().call(message);
QCoreApplication::quit(); // Close this application
});
#endif
......
This diff is collapsed.
......@@ -60,7 +60,7 @@ DevicesModel::DevicesModel(QObject* parent)
this, &DevicesModel::deviceRemoved);
QDBusServiceWatcher* watcher = new QDBusServiceWatcher(DaemonDbusInterface::activatedService(),
DbusHelper::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
DBusHelper::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
connect(watcher, &QDBusServiceWatcher::serviceRegistered, this, &DevicesModel::refreshDeviceList);
connect(watcher, &QDBusServiceWatcher::serviceUnregistered, this, &DevicesModel::clearDevices);
......
......@@ -51,7 +51,7 @@ NotificationsModel::NotificationsModel(QObject* parent)
this, &NotificationsModel::anyDismissableChanged);
QDBusServiceWatcher* watcher = new QDBusServiceWatcher(DaemonDbusInterface::activatedService(),
DbusHelper::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
DBusHelper::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
connect(watcher, &QDBusServiceWatcher::serviceRegistered, this, &NotificationsModel::refreshNotificationList);
connect(watcher, &QDBusServiceWatcher::serviceUnregistered, this, &NotificationsModel::clearNotifications);
}
......
......@@ -37,7 +37,7 @@ RemoteCommandsModel::RemoteCommandsModel(QObject* parent)
this, &RemoteCommandsModel::rowsChanged);
QDBusServiceWatcher* watcher = new QDBusServiceWatcher(DaemonDbusInterface::activatedService(),
DbusHelper::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
DBusHelper::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
connect(watcher, &QDBusServiceWatcher::serviceRegistered, this, &RemoteCommandsModel::refreshCommandList);
connect(watcher, &QDBusServiceWatcher::serviceUnregistered, this, &RemoteCommandsModel::clearCommands);
}
......
......@@ -37,7 +37,7 @@ RemoteSinksModel::RemoteSinksModel(QObject* parent)
this, &RemoteSinksModel::rowsChanged);
QDBusServiceWatcher* watcher = new QDBusServiceWatcher(DaemonDbusInterface::activatedService(),
DbusHelper::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
DBusHelper::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
connect(watcher, &QDBusServiceWatcher::serviceRegistered, this, &RemoteSinksModel::refreshSinkList);
connect(watcher, &QDBusServiceWatcher::serviceUnregistered, this, &RemoteSinksModel::refreshSinkList);
}
......
......@@ -82,7 +82,7 @@ bool LockDevicePlugin::receivePacket(const NetworkPacket & np)
OrgFreedesktopScreenSaverInterface* LockDevicePlugin::iface()
{
if (!m_iface) {
m_iface = new OrgFreedesktopScreenSaverInterface(QStringLiteral("org.freedesktop.ScreenSaver"), QStringLiteral("/org/freedesktop/ScreenSaver"), DbusHelper::sessionBus());
m_iface = new OrgFreedesktopScreenSaverInterface(QStringLiteral("org.freedesktop.ScreenSaver"), QStringLiteral("/org/freedesktop/ScreenSaver"), DBusHelper::sessionBus());
if(!m_iface->isValid())
qCWarning(KDECONNECT_PLUGIN_LOCKREMOTE) << "Couldn't connect to the ScreenSaver interface";
}
......
......@@ -52,13 +52,13 @@ MprisControlPlugin::MprisControlPlugin(QObject* parent, const QVariantList& args
: KdeConnectPlugin(parent, args)
, prevVolume(-1)
{
m_watcher = new QDBusServiceWatcher(QString(), DbusHelper::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
m_watcher = new QDBusServiceWatcher(QString(), DBusHelper::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
// TODO: QDBusConnectionInterface::serviceOwnerChanged is deprecated, maybe query org.freedesktop.DBus directly?
connect(DbusHelper::sessionBus().interface(), &QDBusConnectionInterface::serviceOwnerChanged, this, &MprisControlPlugin::serviceOwnerChanged);
connect(DBusHelper::sessionBus().interface(), &QDBusConnectionInterface::serviceOwnerChanged, this, &MprisControlPlugin::serviceOwnerChanged);
//Add existing interfaces
const QStringList services = DbusHelper::sessionBus().interface()->registeredServiceNames().value();
const QStringList services = DBusHelper::sessionBus().interface()->registeredServiceNames().value();
for (const QString& service : services) {
// The string doesn't matter, it just needs to be empty/non-empty
serviceOwnerChanged(service, QLatin1String(""), QStringLiteral("1"));
......@@ -100,7 +100,7 @@ void MprisControlPlugin::addPlayer(const QString& service)
uniqueName = identity + QLatin1String(" [") + QString::number(i) + QLatin1Char(']');
}
MprisPlayer player(service, mediaPlayerObjectPath, DbusHelper::sessionBus());
MprisPlayer player(service, mediaPlayerObjectPath, DBusHelper::sessionBus());
playerList.insert(uniqueName, player);
......
......@@ -118,7 +118,7 @@ void NotificationsDbusInterface::addNotification(Notification* noti)
m_notifications[publicId] = noti;
m_internalIdToPublicId[internalId] = publicId;
DbusHelper::sessionBus().registerObject(m_device->dbusPath() + QStringLiteral("/notifications/") + publicId, noti, QDBusConnection::ExportScriptableContents);
DBusHelper::sessionBus().registerObject(m_device->dbusPath() + QStringLiteral("/notifications/") + publicId, noti, QDBusConnection::ExportScriptableContents);
Q_EMIT notificationPosted(publicId);
}
......@@ -140,7 +140,7 @@ void NotificationsDbusInterface::removeNotification(const QString& internalId)
}
//Deleting the notification will unregister it automatically
//DbusHelper::sessionBus().unregisterObject(mDevice->dbusPath()+"/notifications/"+publicId);
//DBusHelper::sessionBus().unregisterObject(mDevice->dbusPath()+"/notifications/"+publicId);
noti->deleteLater();
Q_EMIT notificationRemoved(publicId);
......
......@@ -77,7 +77,7 @@ bool PauseMusicPlugin::receivePacket(const NetworkPacket& np)
if (pause) {
//Search for interfaces currently playing
const QStringList interfaces = DbusHelper::sessionBus().interface()->registeredServiceNames().value();
const QStringList interfaces = DBusHelper::sessionBus().interface()->registeredServiceNames().value();
for (const QString& iface : interfaces) {
if (iface.startsWith(QLatin1String("org.mpris.MediaPlayer2"))) {
QDBusInterface mprisInterface(iface, QStringLiteral("/org/mpris/MediaPlayer2"), QStringLiteral("org.mpris.MediaPlayer2.Player"));
......
......@@ -132,7 +132,7 @@ void RunCommandConfig::save()
if (key.isEmpty()) {
key = QUuid::createUuid().toString();
DbusHelper::filterNonExportableCharacters(key);
DBusHelper::filterNonExportableCharacters(key);
}
QJsonObject entry;
entry[QStringLiteral("name")] = name;
......
......@@ -48,7 +48,7 @@ NotificationsListener::NotificationsListener(KdeConnectPlugin* aPlugin)
{
qRegisterMetaTypeStreamOperators<NotifyingApplication>("NotifyingApplication");
bool ret = DbusHelper::sessionBus()
bool ret = DBusHelper::sessionBus()
.registerObject(QStringLiteral("/org/freedesktop/Notifications"),
this,
QDBusConnection::ExportScriptableContents);
......@@ -56,7 +56,7 @@ NotificationsListener::NotificationsListener(KdeConnectPlugin* aPlugin)
qCWarning(KDECONNECT_PLUGIN_SENDNOTIFICATION)
<< "Error registering notifications listener for device"
<< m_plugin->device()->name() << ":"
<< DbusHelper::sessionBus().lastError();
<< DBusHelper::sessionBus().lastError();
else
qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATION)
<< "Registered notifications listener for device"
......@@ -80,7 +80,7 @@ NotificationsListener::~NotificationsListener()
QStringLiteral("org.freedesktop.DBus"));
QDBusMessage res = iface.call(QStringLiteral("RemoveMatch"),
QStringLiteral("interface='org.freedesktop.Notifications',member='Notify',type='method_call',eavesdrop='true'"));
DbusHelper::sessionBus().unregisterObject(QStringLiteral("/org/freedesktop/Notifications"));
DBusHelper::sessionBus().unregisterObject(QStringLiteral("/org/freedesktop/Notifications"));
}
void NotificationsListener::setTranslatedAppName()
......
......@@ -34,12 +34,12 @@ class PrivateDBusTest : public QObject
public:
PrivateDBusTest()
{
DbusHelper::launchDBusDaemon();
DBusHelper::launchDBusDaemon();
}
~PrivateDBusTest()
{
DbusHelper::closeDBusDaemon();
DBusHelper::closeDBusDaemon();
}
private Q_SLOTS:
......@@ -53,7 +53,7 @@ private Q_SLOTS:
*/
void PrivateDBusTest::testConnectionWithPrivateDBus()
{
QDBusConnection conn = DbusHelper::sessionBus();
QDBusConnection conn = DBusHelper::sessionBus();
QVERIFY2(conn.isConnected(), "Connection not established");
QVERIFY2(conn.name() == QStringLiteral(KDECONNECT_PRIVATE_DBUS_NAME),
......@@ -65,7 +65,7 @@ void PrivateDBusTest::testConnectionWithPrivateDBus()
*/
void PrivateDBusTest::testServiceRegistrationWithPrivateDBus()
{
QDBusConnection conn = DbusHelper::sessionBus();
QDBusConnection conn = DBusHelper::sessionBus();
QVERIFY2(conn.isConnected(), "DBus not connected");
QDBusConnectionInterface *bus = conn.interface();
......@@ -82,7 +82,7 @@ void PrivateDBusTest::testServiceRegistrationWithPrivateDBus()
*/
void PrivateDBusTest::testMethodCallWithPrivateDBus()
{
QDBusConnection conn = DbusHelper::sessionBus();
QDBusConnection conn = DBusHelper::sessionBus();
QVERIFY2(conn.isConnected(), "DBus not connected");
/*
......
......@@ -110,7 +110,7 @@ int main(int argc, char** argv)
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/share"), QStringLiteral("org.kde.kdeconnect.device.share"), action);
msg.setArguments({ url.toString() });
blockOnReply(DbusHelper::sessionBus().asyncCall(msg));
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
return 0;
} else {
QTextStream(stderr) << (i18n("Couldn't share %1", url.toString())) << endl;
......
Markdown is supported
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