From 279dbe5598b4f1caee54efa50471ea8fc3c0ab19 Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Fri, 10 Oct 2014 11:47:35 -0700 Subject: [PATCH] Minor changes --- core/backends/devicelink.cpp | 1 - core/backends/lan/lanlinkprovider.cpp | 1 - core/backends/linkprovider.h | 2 +- core/daemon.cpp | 2 +- core/dbushelper.cpp | 1 - core/filetransferjob.cpp | 2 +- core/networkpackage.cpp | 2 +- kio/kiokdeconnect.cpp | 3 ++- plugins/mousepad/mousepadplugin.cpp | 2 +- plugins/mpriscontrol/mpriscontrolplugin.cpp | 3 +-- plugins/sftp/mounter.cpp | 1 - plugins/share/shareplugin.cpp | 2 +- plugins/telephony/telephonyplugin.cpp | 5 ++++- 13 files changed, 13 insertions(+), 14 deletions(-) diff --git a/core/backends/devicelink.cpp b/core/backends/devicelink.cpp index 1a61a3103..4f90754d8 100644 --- a/core/backends/devicelink.cpp +++ b/core/backends/devicelink.cpp @@ -29,6 +29,5 @@ DeviceLink::DeviceLink(const QString& deviceId, LinkProvider* parent) Q_ASSERT(!deviceId.isEmpty()); setProperty("deviceId", deviceId); - //gcc complains if we don't add something to compile on a class with virtual functions } diff --git a/core/backends/lan/lanlinkprovider.cpp b/core/backends/lan/lanlinkprovider.cpp index 0d71d39c7..39d30370c 100644 --- a/core/backends/lan/lanlinkprovider.cpp +++ b/core/backends/lan/lanlinkprovider.cpp @@ -193,7 +193,6 @@ void LanLinkProvider::connected() bool success = deviceLink->sendPackage(np2); - //TODO: Use reverse connection too to preffer connecting a unstable device (a phone) to a stable device (a computer) if (success) { //kDebug(debugArea()) << "Handshaking done (i'm the existing device)"; diff --git a/core/backends/linkprovider.h b/core/backends/linkprovider.h index 6bcdd939c..bb89d1c42 100644 --- a/core/backends/linkprovider.h +++ b/core/backends/linkprovider.h @@ -36,7 +36,7 @@ class LinkProvider public: - const static int PRIORITY_LOW = 0; //eg: 3g + const static int PRIORITY_LOW = 0; //eg: 3g internet const static int PRIORITY_MEDIUM = 50; //eg: internet const static int PRIORITY_HIGH = 100; //eg: lan diff --git a/core/daemon.cpp b/core/daemon.cpp index e2a8b353c..2ce7378e0 100644 --- a/core/daemon.cpp +++ b/core/daemon.cpp @@ -77,7 +77,7 @@ Daemon::Daemon(QObject *parent) //kDebug(debugArea()) << "QCA supported capabilities:" << QCA::supportedFeatures().join(","); if(!QCA::isSupported("rsa")) { - //TODO: Maybe display this in a more visible way? + //TODO: Display this in a notification or another visible way kWarning(debugArea()) << "Error: KDE Connect could not find support for RSA in your QCA installation, if your distribution provides" << "separate packages for QCA-ossl and QCA-gnupg plugins, make sure you have them installed and try again."; return; diff --git a/core/dbushelper.cpp b/core/dbushelper.cpp index 14f4d351b..e188126d0 100644 --- a/core/dbushelper.cpp +++ b/core/dbushelper.cpp @@ -21,7 +21,6 @@ #include "dbushelper.h" #include -#include namespace DbusHelper { diff --git a/core/filetransferjob.cpp b/core/filetransferjob.cpp index a7db9d058..8d1cb69a8 100644 --- a/core/filetransferjob.cpp +++ b/core/filetransferjob.cpp @@ -190,7 +190,7 @@ void FileTransferJob::sourceFinished() //Make sure we do not enter this function again disconnect(mOrigin.data(), SIGNAL(aboutToClose()),this, SLOT(sourceFinished())); - //TODO: MD5 check the file + //TODO: MD5-check the file if (mSize > -1 && mWritten != mSize) { kDebug(debugArea()) << "Received incomplete file (" << mWritten << " of " << mSize << " bytes)"; setError(1); diff --git a/core/networkpackage.cpp b/core/networkpackage.cpp index 57a5f2ba6..db44658b1 100644 --- a/core/networkpackage.cpp +++ b/core/networkpackage.cpp @@ -58,7 +58,7 @@ void NetworkPackage::createIdentityPackage(NetworkPackage* np) np->mPayloadSize = 0; np->set("deviceId", id); np->set("deviceName", qgetenv("USER") + "@" + QHostInfo::localHostName()); - np->set("protocolType", "desktop"); //TODO: Detect laptop, tablet, phone... + np->set("deviceType", "desktop"); //TODO: Detect laptop, tablet, phone... np->set("protocolVersion", NetworkPackage::ProtocolVersion); np->set("SupportedIncomingInterfaces", PluginLoader::instance()->incomingInterfaces().join(",")); np->set("SupportedOutgoingInterfaces", PluginLoader::instance()->outgoingInterfaces().join(",")); diff --git a/kio/kiokdeconnect.cpp b/kio/kiokdeconnect.cpp index 3b8e84eb1..09acd428b 100644 --- a/kio/kiokdeconnect.cpp +++ b/kio/kiokdeconnect.cpp @@ -92,7 +92,8 @@ void KioKdeconnect::listAllDevices() { infoMessage(i18n("Listing devices...")); - QStringList devices = m_dbusInterface->devices(true, true); //TODO: Change to all devices and show different icons for connected and disconnected? + //TODO: Change to all devices and show different icons for connected and disconnected? + QStringList devices = m_dbusInterface->devices(true, true); totalSize(devices.length()); diff --git a/plugins/mousepad/mousepadplugin.cpp b/plugins/mousepad/mousepadplugin.cpp index 7273c92ae..69fba1a4c 100644 --- a/plugins/mousepad/mousepadplugin.cpp +++ b/plugins/mousepad/mousepadplugin.cpp @@ -78,7 +78,7 @@ MousepadPlugin::~MousepadPlugin() bool MousepadPlugin::receivePackage(const NetworkPackage& np) { - //TODO: Split in several package types to avoid big if statements: mouse move, mouse click and keyboard events + //TODO: Split mouse/keyboard in two different plugins to avoid big if statements float dx = np.get("dx", 0); float dy = np.get("dy", 0); diff --git a/plugins/mpriscontrol/mpriscontrolplugin.cpp b/plugins/mpriscontrol/mpriscontrolplugin.cpp index dba821e8c..2b7564d81 100644 --- a/plugins/mpriscontrol/mpriscontrolplugin.cpp +++ b/plugins/mpriscontrol/mpriscontrolplugin.cpp @@ -20,7 +20,6 @@ #include "mpriscontrolplugin.h" - #include #include #include @@ -158,7 +157,7 @@ bool MprisControlPlugin::receivePackage (const NetworkPackage& np) if (np.has("action")) { const QString& action = np.get("action"); kDebug(debugArea()) << "Calling action" << action << "in" << playerList[player]; - //TODO: Check for valid actions + //TODO: Check for valid actions, currently we trust anything the other end sends us mprisInterface.call(action); } if (np.has("setVolume")) { diff --git a/plugins/sftp/mounter.cpp b/plugins/sftp/mounter.cpp index 5947c24f4..752c3f441 100644 --- a/plugins/sftp/mounter.cpp +++ b/plugins/sftp/mounter.cpp @@ -94,7 +94,6 @@ void Mounter::onPakcageReceived(const NetworkPackage& np) //TODO implement on android side //if (np.get("id") != m_id) return; - //This is the previous code, to access sftp server using KIO. Now we are //using the external binary sshfs, and accessing it as a local filesystem. diff --git a/plugins/share/shareplugin.cpp b/plugins/share/shareplugin.cpp index 214eecff5..ba2559d58 100644 --- a/plugins/share/shareplugin.cpp +++ b/plugins/share/shareplugin.cpp @@ -64,7 +64,7 @@ KUrl SharePlugin::destinationDir() const bool SharePlugin::receivePackage(const NetworkPackage& np) { /* - //TODO: Use this code to write a test + //TODO: Write a test like this if (np.type() == PACKAGE_TYPE_PING) { kDebug(debugArea()) << "sending file" << (QDesktopServices::storageLocation(QDesktopServices::HomeLocation) + "/.bashrc"); diff --git a/plugins/telephony/telephonyplugin.cpp b/plugins/telephony/telephonyplugin.cpp index b708a9890..491c1f79d 100644 --- a/plugins/telephony/telephonyplugin.cpp +++ b/plugins/telephony/telephonyplugin.cpp @@ -60,10 +60,13 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np) } else if (event == "talking") { return NULL; } else { - //TODO: return NULL if !debug +#ifdef NDEBUG + return NULL; +#else type = "unknownEvent"; icon = "pda"; content = i18n("Unknown telephony event: %2", event); +#endif } kDebug(debugArea()) << "Creating notification with type:" << type;