[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:29:25 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=a45e48c
The following commit has been merged in the master branch:
commit a45e48ca7af331ffe9a5465f35f2c2e6fdf2553e
Author: Aleix Pol <aleixpol at kde.org>
Date: Sun Dec 6 00:08:02 2015 +0100
Fix tests build
Daemon::requestPairing changed into ::askPairingConfirmation.
---
tests/CMakeLists.txt | 5 ++-
tests/pluginloadtest.cpp | 33 +--------------
tests/sendfiletest.cpp | 33 +--------------
.../remotecontrolplugin.h => tests/testdaemon.h | 49 ++++++++++++----------
4 files changed, 33 insertions(+), 87 deletions(-)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index f82e85d..a2db3bb 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -29,12 +29,13 @@ set(testsslsocketlinereader_sources
ecm_add_test(testsslsocketlinereader.cpp ${testsslsocketlinereader_sources} TEST_NAME testsslsocketlinereader LINK_LIBRARIES ${kdeconnect_libraries})
set(kdeconnectconfigtest_sources
+ ../core/backends/devicelink.cpp
../core/backends/pairinghandler.cpp
../core/dbushelper.cpp
../core/device.cpp
../core/pluginloader.cpp
)
-ecm_add_test(kdeconnectconfigtest.cpp ${kdeconnectconfigtest_sources} TEST_NAME kdeconnectconfgtest LINK_LIBRARIES ${kdeconnect_libraries})
+ecm_add_test(kdeconnectconfigtest.cpp ${kdeconnectconfigtest_sources} TEST_NAME kdeconnectconfigtest LINK_LIBRARIES ${kdeconnect_libraries})
set(lanlinkprovidertest_sources
../core/backends/devicelink.cpp
@@ -54,4 +55,4 @@ ecm_add_test(lanlinkprovidertest.cpp ${lanlinkprovidertest_sources} TEST_NAME
ecm_add_test(devicetest.cpp ${lanlinkprovidertest_sources} TEST_NAME devicetest LINK_LIBRARIES ${kdeconnect_libraries})
-ecm_add_test(downloadjobtest.cpp ../core/backends/lan/downloadjob.cpp TEST_NAME downloadjobtest LINK_LIBRARIES ${kdeconnect_libraries})
\ No newline at end of file
+ecm_add_test(downloadjobtest.cpp ../core/backends/lan/downloadjob.cpp TEST_NAME downloadjobtest LINK_LIBRARIES ${kdeconnect_libraries})
diff --git a/tests/pluginloadtest.cpp b/tests/pluginloadtest.cpp
index b70eea2..dfa04ac 100644
--- a/tests/pluginloadtest.cpp
+++ b/tests/pluginloadtest.cpp
@@ -33,38 +33,7 @@
#include "core/kdeconnectplugin.h"
#include <backends/pairinghandler.h>
#include "kdeconnect-version.h"
-
-class TestDaemon : public Daemon
-{
-Q_OBJECT
-public:
- TestDaemon(QObject* parent = Q_NULLPTR)
- : Daemon(parent, true)
- , m_nam(Q_NULLPTR)
- {
- }
-
- void requestPairing(PairingHandler* d) Q_DECL_OVERRIDE
- {
- d->acceptPairing();
- }
-
- void reportError(const QString & title, const QString & description) Q_DECL_OVERRIDE
- {
- qWarning() << "error:" << title << description;
- }
-
- QNetworkAccessManager* networkAccessManager() Q_DECL_OVERRIDE
- {
- if (!m_nam) {
- m_nam = new KIO::AccessManager(this);
- }
- return m_nam;
- }
-
-private:
- QNetworkAccessManager* m_nam;
-};
+#include "testdaemon.h"
class PluginLoadTest : public QObject
{
diff --git a/tests/sendfiletest.cpp b/tests/sendfiletest.cpp
index 3402fe0..28f207d 100644
--- a/tests/sendfiletest.cpp
+++ b/tests/sendfiletest.cpp
@@ -33,38 +33,7 @@
#include "core/kdeconnectplugin.h"
#include <backends/pairinghandler.h>
#include "kdeconnect-version.h"
-
-class TestDaemon : public Daemon
-{
-Q_OBJECT
-public:
- TestDaemon(QObject* parent = Q_NULLPTR)
- : Daemon(parent, true)
- , m_nam(Q_NULLPTR)
- {
- }
-
- void requestPairing(PairingHandler* d) Q_DECL_OVERRIDE
- {
- d->acceptPairing();
- }
-
- void reportError(const QString & title, const QString & description) Q_DECL_OVERRIDE
- {
- qWarning() << "error:" << title << description;
- }
-
- QNetworkAccessManager* networkAccessManager() Q_DECL_OVERRIDE
- {
- if (!m_nam) {
- m_nam = new KIO::AccessManager(this);
- }
- return m_nam;
- }
-
-private:
- QNetworkAccessManager* m_nam;
-};
+#include "testdaemon.h"
class TestSendFile : public QObject
{
diff --git a/plugins/remotecontrol/remotecontrolplugin.h b/tests/testdaemon.h
similarity index 56%
copy from plugins/remotecontrol/remotecontrolplugin.h
copy to tests/testdaemon.h
index 96d0269..809dfbf 100644
--- a/plugins/remotecontrol/remotecontrolplugin.h
+++ b/tests/testdaemon.h
@@ -18,33 +18,40 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef REMOTECONTROLPLUGIN_H
-#define REMOTECONTROLPLUGIN_H
+#ifndef TESTDAEMON_H
+#define TESTDAEMON_H
-#include <QObject>
+#include <core/daemon.h>
+#include <core/backends/pairinghandler.h>
-#include <core/kdeconnectplugin.h>
-
-#define PACKAGE_TYPE_MOUSEPAD QLatin1String("kdeconnect.mousepad")
-
-class Q_DECL_EXPORT RemoteControlPlugin
- : public KdeConnectPlugin
+class TestDaemon : public Daemon
{
- Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "org.kde.kdeconnect.device.remotecontrol")
-
public:
- explicit RemoteControlPlugin(QObject *parent, const QVariantList &args);
- ~RemoteControlPlugin() override;
-
- bool receivePackage(const NetworkPackage& /*np*/) override { return false; }
- void connected() override;
-
- Q_INVOKABLE void moveCursor(const QPoint &p);
- Q_INVOKABLE void sendCommand(const QString &name, bool val);
+ TestDaemon(QObject* parent = Q_NULLPTR)
+ : Daemon(parent, true)
+ , m_nam(Q_NULLPTR)
+ {
+ }
+
+ void reportError(const QString & title, const QString & description) Q_DECL_OVERRIDE
+ {
+ qWarning() << "error:" << title << description;
+ }
+
+ void askPairingConfirmation(PairingHandler * d) override {
+ d->acceptPairing();
+ }
+
+ QNetworkAccessManager* networkAccessManager() Q_DECL_OVERRIDE
+ {
+ if (!m_nam) {
+ m_nam = new KIO::AccessManager(this);
+ }
+ return m_nam;
+ }
private:
- QString dbusPath() const;
+ QNetworkAccessManager* m_nam;
};
#endif
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list