Also use QLatin1String::arg in remaining places
This is more readable, slightly faster at runtime and results in a slightly smaller binary size
This commit is contained in:
parent
88d89e7211
commit
cfde9ced77
6 changed files with 29 additions and 29 deletions
|
@ -205,7 +205,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/share"),
|
QLatin1String("/modules/kdeconnect/devices/%1/share").arg(device),
|
||||||
QStringLiteral("org.kde.kdeconnect.device.share"),
|
QStringLiteral("org.kde.kdeconnect.device.share"),
|
||||||
QStringLiteral("shareUrls"));
|
QStringLiteral("shareUrls"));
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
} else if (parser.isSet(QStringLiteral("share-text"))) {
|
} else if (parser.isSet(QStringLiteral("share-text"))) {
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/share"),
|
QLatin1String("/modules/kdeconnect/devices/%1/share").arg(device),
|
||||||
QStringLiteral("org.kde.kdeconnect.device.share"),
|
QStringLiteral("org.kde.kdeconnect.device.share"),
|
||||||
QStringLiteral("shareText"));
|
QStringLiteral("shareText"));
|
||||||
msg.setArguments(QVariantList{parser.value(QStringLiteral("share-text"))});
|
msg.setArguments(QVariantList{parser.value(QStringLiteral("share-text"))});
|
||||||
|
@ -268,13 +268,13 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
} else if (parser.isSet(QStringLiteral("send-clipboard"))) {
|
} else if (parser.isSet(QStringLiteral("send-clipboard"))) {
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/clipboard"),
|
QLatin1String("/modules/kdeconnect/devices/%1/clipboard").arg(device),
|
||||||
QStringLiteral("org.kde.kdeconnect.device.clipboard"),
|
QStringLiteral("org.kde.kdeconnect.device.clipboard"),
|
||||||
QStringLiteral("sendClipboard"));
|
QStringLiteral("sendClipboard"));
|
||||||
blockOnReply(QDBusConnection::sessionBus().asyncCall(msg));
|
blockOnReply(QDBusConnection::sessionBus().asyncCall(msg));
|
||||||
} else if (parser.isSet(QStringLiteral("ping")) || parser.isSet(QStringLiteral("ping-msg"))) {
|
} else if (parser.isSet(QStringLiteral("ping")) || parser.isSet(QStringLiteral("ping-msg"))) {
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/ping"),
|
QLatin1String("/modules/kdeconnect/devices/%1/ping").arg(device),
|
||||||
QStringLiteral("org.kde.kdeconnect.device.ping"),
|
QStringLiteral("org.kde.kdeconnect.device.ping"),
|
||||||
QStringLiteral("sendPing"));
|
QStringLiteral("sendPing"));
|
||||||
if (parser.isSet(QStringLiteral("ping-msg"))) {
|
if (parser.isSet(QStringLiteral("ping-msg"))) {
|
||||||
|
@ -314,7 +314,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
} else if (parser.isSet(QStringLiteral("ring"))) {
|
} else if (parser.isSet(QStringLiteral("ring"))) {
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/findmyphone"),
|
QLatin1String("/modules/kdeconnect/devices/%1/findmyphone").arg(device),
|
||||||
QStringLiteral("org.kde.kdeconnect.device.findmyphone"),
|
QStringLiteral("org.kde.kdeconnect.device.findmyphone"),
|
||||||
QStringLiteral("ring"));
|
QStringLiteral("ring"));
|
||||||
blockOnReply(QDBusConnection::sessionBus().asyncCall(msg));
|
blockOnReply(QDBusConnection::sessionBus().asyncCall(msg));
|
||||||
|
@ -322,7 +322,7 @@ int main(int argc, char **argv)
|
||||||
const QString fileName = parser.value(QStringLiteral("photo"));
|
const QString fileName = parser.value(QStringLiteral("photo"));
|
||||||
if (!fileName.isEmpty()) {
|
if (!fileName.isEmpty()) {
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/photo"),
|
QLatin1String("/modules/kdeconnect/devices/%1/photo").arg(device),
|
||||||
QStringLiteral("org.kde.kdeconnect.device.photo"),
|
QStringLiteral("org.kde.kdeconnect.device.photo"),
|
||||||
QStringLiteral("requestPhoto"));
|
QStringLiteral("requestPhoto"));
|
||||||
msg.setArguments({QUrl::fromLocalFile(fileName).toString()});
|
msg.setArguments({QUrl::fromLocalFile(fileName).toString()});
|
||||||
|
@ -333,7 +333,7 @@ int main(int argc, char **argv)
|
||||||
} else if (parser.isSet(QStringLiteral("send-keys"))) {
|
} else if (parser.isSet(QStringLiteral("send-keys"))) {
|
||||||
QString seq = parser.value(QStringLiteral("send-keys"));
|
QString seq = parser.value(QStringLiteral("send-keys"));
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/remotekeyboard"),
|
QLatin1String("/modules/kdeconnect/devices/%1/remotekeyboard").arg(device),
|
||||||
QStringLiteral("org.kde.kdeconnect.device.remotekeyboard"),
|
QStringLiteral("org.kde.kdeconnect.device.remotekeyboard"),
|
||||||
QStringLiteral("sendKeyPress"));
|
QStringLiteral("sendKeyPress"));
|
||||||
if (seq.trimmed() == QLatin1String("-")) {
|
if (seq.trimmed() == QLatin1String("-")) {
|
||||||
|
|
|
@ -58,7 +58,7 @@ QList<QAction *> SendFileItemAction::actions(const KFileItemListProperties &file
|
||||||
connect(action, &QAction::triggered, this, [id, urls]() {
|
connect(action, &QAction::triggered, this, [id, urls]() {
|
||||||
for (const QUrl &url : urls) {
|
for (const QUrl &url : urls) {
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/share"),
|
QLatin1String("/modules/kdeconnect/devices/%1/share").arg(id),
|
||||||
QStringLiteral("org.kde.kdeconnect.device.share"),
|
QStringLiteral("org.kde.kdeconnect.device.share"),
|
||||||
QStringLiteral("shareUrl"));
|
QStringLiteral("shareUrl"));
|
||||||
msg.setArguments(QVariantList{url.toString()});
|
msg.setArguments(QVariantList{url.toString()});
|
||||||
|
|
|
@ -52,7 +52,7 @@ void DeviceDbusInterface::pluginCall(const QString &plugin, const QString &metho
|
||||||
|
|
||||||
BatteryDbusInterface::BatteryDbusInterface(const QString &id, QObject *parent)
|
BatteryDbusInterface::BatteryDbusInterface(const QString &id, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceBatteryInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceBatteryInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/battery"),
|
QLatin1String("/modules/kdeconnect/devices/%1/battery").arg(id),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ BatteryDbusInterface::BatteryDbusInterface(const QString &id, QObject *parent)
|
||||||
|
|
||||||
ConnectivityReportDbusInterface::ConnectivityReportDbusInterface(const QString &id, QObject *parent)
|
ConnectivityReportDbusInterface::ConnectivityReportDbusInterface(const QString &id, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceConnectivity_reportInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceConnectivity_reportInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/connectivity_report"),
|
QLatin1String("/modules/kdeconnect/devices/%1/connectivity_report").arg(id),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,7 @@ ConnectivityReportDbusInterface::ConnectivityReportDbusInterface(const QString &
|
||||||
|
|
||||||
DeviceNotificationsDbusInterface::DeviceNotificationsDbusInterface(const QString &id, QObject *parent)
|
DeviceNotificationsDbusInterface::DeviceNotificationsDbusInterface(const QString &id, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceNotificationsInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceNotificationsInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/notifications"),
|
QLatin1String("/modules/kdeconnect/devices/%1/notifications").arg(id),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -78,7 +78,7 @@ DeviceNotificationsDbusInterface::DeviceNotificationsDbusInterface(const QString
|
||||||
|
|
||||||
NotificationDbusInterface::NotificationDbusInterface(const QString &deviceId, const QString ¬ificationId, QObject *parent)
|
NotificationDbusInterface::NotificationDbusInterface(const QString &deviceId, const QString ¬ificationId, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceNotificationsNotificationInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceNotificationsNotificationInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/notifications/")
|
QLatin1String("/modules/kdeconnect/devices/%1/notifications/").arg(deviceId)
|
||||||
+ notificationId,
|
+ notificationId,
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
|
@ -96,7 +96,7 @@ DeviceConversationsDbusInterface::DeviceConversationsDbusInterface(const QString
|
||||||
|
|
||||||
SftpDbusInterface::SftpDbusInterface(const QString &id, QObject *parent)
|
SftpDbusInterface::SftpDbusInterface(const QString &id, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceSftpInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceSftpInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/sftp"),
|
QLatin1String("/modules/kdeconnect/devices/%1/sftp").arg(id),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -104,7 +104,7 @@ SftpDbusInterface::SftpDbusInterface(const QString &id, QObject *parent)
|
||||||
|
|
||||||
MprisDbusInterface::MprisDbusInterface(const QString &id, QObject *parent)
|
MprisDbusInterface::MprisDbusInterface(const QString &id, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceMprisremoteInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceMprisremoteInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/mprisremote"),
|
QLatin1String("/modules/kdeconnect/devices/%1/mprisremote").arg(id),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -113,7 +113,7 @@ MprisDbusInterface::MprisDbusInterface(const QString &id, QObject *parent)
|
||||||
|
|
||||||
RemoteControlDbusInterface::RemoteControlDbusInterface(const QString &id, QObject *parent)
|
RemoteControlDbusInterface::RemoteControlDbusInterface(const QString &id, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceRemotecontrolInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceRemotecontrolInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/remotecontrol"),
|
QLatin1String("/modules/kdeconnect/devices/%1/remotecontrol").arg(id),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -121,7 +121,7 @@ RemoteControlDbusInterface::RemoteControlDbusInterface(const QString &id, QObjec
|
||||||
|
|
||||||
LockDeviceDbusInterface::LockDeviceDbusInterface(const QString &id, QObject *parent)
|
LockDeviceDbusInterface::LockDeviceDbusInterface(const QString &id, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceLockdeviceInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceLockdeviceInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/lockdevice"),
|
QLatin1String("/modules/kdeconnect/devices/%1/lockdevice").arg(id),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -131,7 +131,7 @@ LockDeviceDbusInterface::LockDeviceDbusInterface(const QString &id, QObject *par
|
||||||
|
|
||||||
FindMyPhoneDeviceDbusInterface::FindMyPhoneDeviceDbusInterface(const QString &deviceId, QObject *parent)
|
FindMyPhoneDeviceDbusInterface::FindMyPhoneDeviceDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceFindmyphoneInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceFindmyphoneInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/findmyphone"),
|
QLatin1String("/modules/kdeconnect/devices/%1/findmyphone").arg(deviceId),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,7 @@ FindMyPhoneDeviceDbusInterface::FindMyPhoneDeviceDbusInterface(const QString &de
|
||||||
|
|
||||||
RemoteCommandsDbusInterface::RemoteCommandsDbusInterface(const QString &deviceId, QObject *parent)
|
RemoteCommandsDbusInterface::RemoteCommandsDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceRemotecommandsInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceRemotecommandsInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/remotecommands"),
|
QLatin1String("/modules/kdeconnect/devices/%1/remotecommands").arg(deviceId),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -147,7 +147,7 @@ RemoteCommandsDbusInterface::RemoteCommandsDbusInterface(const QString &deviceId
|
||||||
|
|
||||||
RemoteKeyboardDbusInterface::RemoteKeyboardDbusInterface(const QString &deviceId, QObject *parent)
|
RemoteKeyboardDbusInterface::RemoteKeyboardDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceRemotekeyboardInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceRemotekeyboardInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/remotekeyboard"),
|
QLatin1String("/modules/kdeconnect/devices/%1/remotekeyboard").arg(deviceId),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -156,7 +156,7 @@ RemoteKeyboardDbusInterface::RemoteKeyboardDbusInterface(const QString &deviceId
|
||||||
|
|
||||||
SmsDbusInterface::SmsDbusInterface(const QString &deviceId, QObject *parent)
|
SmsDbusInterface::SmsDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceSmsInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceSmsInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/sms"),
|
QLatin1String("/modules/kdeconnect/devices/%1/sms").arg(deviceId),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -164,7 +164,7 @@ SmsDbusInterface::SmsDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
|
|
||||||
ShareDbusInterface::ShareDbusInterface(const QString &deviceId, QObject *parent)
|
ShareDbusInterface::ShareDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceShareInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceShareInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/share"),
|
QLatin1String("/modules/kdeconnect/devices/%1/share").arg(deviceId),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -172,7 +172,7 @@ ShareDbusInterface::ShareDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
|
|
||||||
PhotoDbusInterface::PhotoDbusInterface(const QString &deviceId, QObject *parent)
|
PhotoDbusInterface::PhotoDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
: OrgKdeKdeconnectDevicePhotoInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDevicePhotoInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/photo"),
|
QLatin1String("/modules/kdeconnect/devices/%1/photo").arg(deviceId),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -180,7 +180,7 @@ PhotoDbusInterface::PhotoDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
|
|
||||||
RemoteSystemVolumeDbusInterface::RemoteSystemVolumeDbusInterface(const QString &deviceId, QObject *parent)
|
RemoteSystemVolumeDbusInterface::RemoteSystemVolumeDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceRemotesystemvolumeInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceRemotesystemvolumeInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/remotesystemvolume"),
|
QLatin1String("/modules/kdeconnect/devices/%1/remotesystemvolume").arg(deviceId),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@ RemoteSystemVolumeDbusInterface::RemoteSystemVolumeDbusInterface(const QString &
|
||||||
|
|
||||||
BigscreenDbusInterface::BigscreenDbusInterface(const QString &deviceId, QObject *parent)
|
BigscreenDbusInterface::BigscreenDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceBigscreenInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceBigscreenInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/bigscreen"),
|
QLatin1String("/modules/kdeconnect/devices/%1/bigscreen").arg(deviceId),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -196,7 +196,7 @@ BigscreenDbusInterface::BigscreenDbusInterface(const QString &deviceId, QObject
|
||||||
|
|
||||||
VirtualmonitorDbusInterface::VirtualmonitorDbusInterface(const QString &deviceId, QObject *parent)
|
VirtualmonitorDbusInterface::VirtualmonitorDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceVirtualmonitorInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceVirtualmonitorInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/virtualmonitor"),
|
QLatin1String("/modules/kdeconnect/devices/%1/virtualmonitor").arg(deviceId),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
@ -204,7 +204,7 @@ VirtualmonitorDbusInterface::VirtualmonitorDbusInterface(const QString &deviceId
|
||||||
|
|
||||||
ClipboardDbusInterface::ClipboardDbusInterface(const QString &deviceId, QObject *parent)
|
ClipboardDbusInterface::ClipboardDbusInterface(const QString &deviceId, QObject *parent)
|
||||||
: OrgKdeKdeconnectDeviceClipboardInterface(DaemonDbusInterface::activatedService(),
|
: OrgKdeKdeconnectDeviceClipboardInterface(DaemonDbusInterface::activatedService(),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/clipboard"),
|
QLatin1String("/modules/kdeconnect/devices/%1/clipboard").arg(deviceId),
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
parent)
|
parent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
void receivePacket(const NetworkPacket &np) override;
|
void receivePacket(const NetworkPacket &np) override;
|
||||||
QString dbusPath() const override
|
QString dbusPath() const override
|
||||||
{
|
{
|
||||||
return QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/sftp");
|
return QLatin1String("/modules/kdeconnect/devices/%1/sftp").arg(deviceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
void receivePacket(const NetworkPacket &np) override;
|
void receivePacket(const NetworkPacket &np) override;
|
||||||
QString dbusPath() const override
|
QString dbusPath() const override
|
||||||
{
|
{
|
||||||
return QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/sftp");
|
return QLatin1String("/modules/kdeconnect/devices/%1/sftp").arg(deviceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_SCRIPTABLE bool startBrowsing();
|
Q_SCRIPTABLE bool startBrowsing();
|
||||||
|
|
|
@ -163,7 +163,7 @@ int main(int argc, char **argv)
|
||||||
const QString action = open && url.isLocalFile() ? QStringLiteral("openFile") : QStringLiteral("shareUrl");
|
const QString action = open && url.isLocalFile() ? QStringLiteral("openFile") : QStringLiteral("shareUrl");
|
||||||
|
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"),
|
||||||
QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/share"),
|
QLatin1String("/modules/kdeconnect/devices/%1/share").arg(device),
|
||||||
QStringLiteral("org.kde.kdeconnect.device.share"),
|
QStringLiteral("org.kde.kdeconnect.device.share"),
|
||||||
action);
|
action);
|
||||||
msg.setArguments({url.toString()});
|
msg.setArguments({url.toString()});
|
||||||
|
|
Loading…
Reference in a new issue