...
 
Commits (2)
......@@ -27,7 +27,7 @@
#include "batterydbusinterface.h"
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_battery.json", registerPlugin< BatteryPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(BatteryPlugin, "kdeconnect_battery.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_BATTERY, "kdeconnect.plugin.battery")
......
......@@ -24,7 +24,7 @@
#include <KPluginFactory>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_clipboard.json", registerPlugin< ClipboardPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(ClipboardPlugin, "kdeconnect_clipboard.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_CLIPBOARD, "kdeconnect.plugin.clipboard")
......
......@@ -31,8 +31,7 @@
#include <core/device.h>
K_PLUGIN_FACTORY_WITH_JSON(KdeConnectPluginFactory, "kdeconnect_contacts.json",
registerPlugin<ContactsPlugin>(); )
K_PLUGIN_CLASS_WITH_JSON(ContactsPlugin, "kdeconnect_contacts.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_CONTACTS, "kdeconnect.plugin.contacts")
......
......@@ -26,7 +26,7 @@
#include <KPluginFactory>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_findmyphone.json", registerPlugin< FindMyPhonePlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(FindMyPhonePlugin, "kdeconnect_findmyphone.json")
FindMyPhonePlugin::FindMyPhonePlugin(QObject* parent, const QVariantList& args) : KdeConnectPlugin(parent, args)
{
......
......@@ -34,8 +34,7 @@
#include <QUrl>
#include <QMediaPlayer>
K_PLUGIN_FACTORY_WITH_JSON(KdeConnectPluginFactory, "kdeconnect_findthisdevice.json",
registerPlugin<FindThisDevicePlugin>();)
K_PLUGIN_CLASS_WITH_JSON(FindThisDevicePlugin, "kdeconnect_findthisdevice.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_FINDTHISDEVICE, "kdeconnect.plugin.findthisdevice")
......@@ -64,7 +63,7 @@ bool FindThisDevicePlugin::receivePacket(const NetworkPacket& np)
soundURL = QUrl::fromUserInput(soundFilename,
winDirPath,
QUrl::AssumeLocalFile);
}
}
else {
qCWarning(KDECONNECT_PLUGIN_FINDTHISDEVICE) << "Not playing sounds, system doesn't know WINDIR : " << soundFilename;
}
......
......@@ -30,7 +30,7 @@
#include <core/device.h>
#include <dbushelper.h>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectLockPluginFactory, "kdeconnect_lockdevice.json", registerPlugin<LockDevicePlugin>(); )
K_PLUGIN_CLASS_WITH_JSON(LockDevicePlugin, "kdeconnect_lockdevice.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_LOCKREMOTE, "kdeconnect.plugin.lock")
......
......@@ -37,7 +37,7 @@
#endif
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_mousepad.json", registerPlugin< MousepadPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(MousepadPlugin, "kdeconnect_mousepad.json")
MousepadPlugin::MousepadPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args)
......
......@@ -5,7 +5,7 @@
#include <Windows.h>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_mpriscontrol.json", registerPlugin< MprisControlPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(MprisControlPlugin, "kdeconnect_mpriscontrol.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MPRIS, "kdeconnect.plugin.mpris")
......@@ -65,14 +65,14 @@ bool MprisControlPlugin::receivePacket(const NetworkPacket &np)
::SendInput(1,&input,sizeof(INPUT));
}
}
}
NetworkPacket answer(PACKET_TYPE_MPRIS);
bool somethingToSend = false;
if (np.get<bool>(QStringLiteral("requestNowPlaying"))) {
answer.set(QStringLiteral("pos"), 0);
answer.set(QStringLiteral("isPlaying"), false);
answer.set(QStringLiteral("canPause"), false);
......@@ -96,4 +96,4 @@ bool MprisControlPlugin::receivePacket(const NetworkPacket &np)
return true;
}
#include "mpriscontrolplugin-win.moc"
\ No newline at end of file
#include "mpriscontrolplugin-win.moc"
......@@ -34,7 +34,7 @@
#include "mprisdbusinterface.h"
#include "propertiesdbusinterface.h"
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_mpriscontrol.json", registerPlugin< MprisControlPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(MprisControlPlugin, "kdeconnect_mpriscontrol.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MPRIS, "kdeconnect.plugin.mpris")
......
......@@ -27,7 +27,7 @@
#include <core/device.h>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_mprisremote.json", registerPlugin< MprisRemotePlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(MprisRemotePlugin, "kdeconnect_mprisremote.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MPRISREMOTE, "kdeconnect.plugin.mprisremote")
......
......@@ -25,7 +25,7 @@
#include <KPluginFactory>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_notifications.json", registerPlugin< NotificationsPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(NotificationsPlugin, "kdeconnect_notifications.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_NOTIFICATION, "kdeconnect.plugin.notification")
......
......@@ -34,7 +34,7 @@
//In older Qt released, qAsConst isnt available
#include "qtcompat_p.h"
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_pausemusic.json", registerPlugin< PauseMusicPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(PauseMusicPlugin, "kdeconnect_pausemusic.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PAUSEMUSIC, "kdeconnect.plugin.pausemusic")
......
......@@ -27,7 +27,7 @@
#include <core/filetransferjob.h>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_photo.json", registerPlugin< PhotoPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(PhotoPlugin, "kdeconnect_photo.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PHOTO, "kdeconnect.plugin.photo")
......
......@@ -30,7 +30,7 @@
#include <core/device.h>
#include <core/daemon.h>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_ping.json", registerPlugin< PingPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(PingPlugin, "kdeconnect_ping.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PING, "kdeconnect.plugin.ping")
......
......@@ -29,7 +29,7 @@
#define PACKET_TYPE_RUNCOMMAND_REQUEST QLatin1String("kdeconnect.runcommand.request")
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_remotecommands.json", registerPlugin< RemoteCommandsPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(RemoteCommandsPlugin, "kdeconnect_remotecommands.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_REMOTECOMMANDS, "kdeconnect.plugin.remotecommands")
......
......@@ -30,7 +30,7 @@
#include <core/device.h>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_remotecontrol.json", registerPlugin< RemoteControlPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(RemoteControlPlugin, "kdeconnect_remotecontrol.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_REMOTECONTROL, "kdeconnect.plugin.remotecontrol")
......
......@@ -24,7 +24,7 @@
#include <QString>
#include <QVariantMap>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_remotekeyboard.json", registerPlugin< RemoteKeyboardPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(RemoteKeyboardPlugin, "kdeconnect_remotekeyboard.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_REMOTEKEYBOARD, "kdeconnect.plugin.remotekeyboard");
......
......@@ -32,7 +32,7 @@
#include <core/device.h>
#include <core/daemon.h>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_remotesystemvolume.json", registerPlugin< RemoteSystemVolumePlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(RemoteSystemVolumePlugin, "kdeconnect_remotesystemvolume.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PING, "kdeconnect.plugin.remotesystemvolume")
......
......@@ -46,7 +46,7 @@
#endif
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_runcommand.json", registerPlugin< RunCommandPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(RunCommandPlugin, "kdeconnect_runcommand.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_RUNCOMMAND, "kdeconnect.plugin.runcommand")
......
......@@ -26,7 +26,7 @@
#include <QDBusConnection>
#include <QDBusInterface>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_screensaver_inhibit.json", registerPlugin< ScreensaverInhibitPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(ScreensaverInhibitPlugin, "kdeconnect_screensaver_inhibit.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SCREENSAVERINHIBIT, "kdeconnect.plugin.screensaverinhibit")
......
......@@ -25,7 +25,7 @@
#include <KPluginFactory>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_sendnotifications.json", registerPlugin< SendNotificationsPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(SendNotificationsPlugin, "kdeconnect_sendnotifications.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SENDNOTIFICATION, "kdeconnect.plugin.sendnotification")
......
......@@ -34,7 +34,7 @@
#include "mounter.h"
#include "sftp_debug.h"
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_sftp.json", registerPlugin< SftpPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(SftpPlugin, "kdeconnect_sftp.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SFTP, "kdeconnect.plugin.sftp")
......@@ -43,7 +43,7 @@ static const QSet<QString> fields_c = QSet<QString>() << QStringLiteral("ip") <<
struct SftpPlugin::Pimpl
{
Pimpl() : m_mounter(nullptr) {}
//Add KIO entry to Dolphin's Places
KFilePlacesModel m_placesModel;
Mounter* m_mounter;
......@@ -52,7 +52,7 @@ struct SftpPlugin::Pimpl
SftpPlugin::SftpPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args)
, d(new Pimpl())
{
{
deviceId = device()->id();
addToDolphin();
qCDebug(KDECONNECT_PLUGIN_SFTP) << "Created device:" << device()->name();
......@@ -60,14 +60,14 @@ SftpPlugin::SftpPlugin(QObject* parent, const QVariantList& args)
SftpPlugin::~SftpPlugin()
{
removeFromDolphin();
removeFromDolphin();
unmount();
}
void SftpPlugin::addToDolphin()
{
removeFromDolphin();
QUrl kioUrl(QStringLiteral("kdeconnect://") + deviceId + QStringLiteral("/"));
d->m_placesModel.addPlace(device()->name(), kioUrl, QStringLiteral("kdeconnect"));
qCDebug(KDECONNECT_PLUGIN_SFTP) << "add to dolphin";
......@@ -117,7 +117,7 @@ bool SftpPlugin::isMounted() const
}
QString SftpPlugin::getMountError()
{
{
if (!mountError.isEmpty()) {
return mountError;
}
......@@ -140,7 +140,7 @@ bool SftpPlugin::receivePacket(const NetworkPacket& np)
// packet is invalid
return false;
}
Q_EMIT packetReceived(np);
remoteDirectories.clear();
......@@ -179,7 +179,7 @@ void SftpPlugin::onUnmounted()
qCDebug(KDECONNECT_PLUGIN_SFTP) << device()->name() << "Remote filesystem unmounted";
unmount();
Q_EMIT unmounted();
}
......
......@@ -37,7 +37,7 @@
#include "core/filetransferjob.h"
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_share.json", registerPlugin< SharePlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(SharePlugin, "kdeconnect_share.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SHARE, "kdeconnect.plugin.share")
......
......@@ -33,7 +33,7 @@
#include "sendreplydialog.h"
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_sms.json", registerPlugin< SmsPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(SmsPlugin, "kdeconnect_sms.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SMS, "kdeconnect.plugin.sms")
......
......@@ -34,7 +34,7 @@
#include <PulseAudioQt/Sink>
#include <PulseAudioQt/Context>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_systemvolume.json", registerPlugin< SystemvolumePlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(SystemvolumePlugin, "kdeconnect_systemvolume.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SYSTEMVOLUME, "kdeconnect.plugin.systemvolume")
......
......@@ -32,7 +32,7 @@
#include <core/device.h>
K_PLUGIN_FACTORY_WITH_JSON(KdeConnectPluginFactory, "kdeconnect_systemvolume.json", registerPlugin<SystemvolumePlugin>();)
K_PLUGIN_CLASS_WITH_JSON(SystemvolumePlugin, "kdeconnect_systemvolume.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SYSTEMVOLUME, "kdeconnect.plugin.systemvolume")
......
......@@ -28,7 +28,7 @@
#include <KPluginFactory>
#include <KNotification>
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_telephony.json", registerPlugin< TelephonyPlugin >(); )
K_PLUGIN_CLASS_WITH_JSON(TelephonyPlugin, "kdeconnect_telephony.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_TELEPHONY, "kdeconnect.plugin.telephony")
......