[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:29:47 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=3177143
The following commit has been merged in the master branch:
commit 31771434390a0bc8d18149b2991be2bca317019e
Author: Albert Vaca <albertvaka at gmail.com>
Date: Thu Jun 9 02:36:02 2016 +0200
Fixed build on windows
---
core/backends/lan/downloadjob.cpp | 2 ++
core/backends/lan/lanlinkprovider.cpp | 12 ++++-----
core/core_debug.cpp | 6 +++--
tests/CMakeLists.txt | 46 ++++++-----------------------------
tests/networkpackagetests.cpp | 7 ------
5 files changed, 18 insertions(+), 55 deletions(-)
diff --git a/core/backends/lan/downloadjob.cpp b/core/backends/lan/downloadjob.cpp
index 921d0b4..f23eb06 100644
--- a/core/backends/lan/downloadjob.cpp
+++ b/core/backends/lan/downloadjob.cpp
@@ -23,10 +23,12 @@
#include <core/core_debug.h>
+#ifndef Q_OS_WIN
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
+#endif
#include "lanlinkprovider.h"
diff --git a/core/backends/lan/lanlinkprovider.cpp b/core/backends/lan/lanlinkprovider.cpp
index 38afcca..505b73a 100644
--- a/core/backends/lan/lanlinkprovider.cpp
+++ b/core/backends/lan/lanlinkprovider.cpp
@@ -421,10 +421,6 @@ void LanLinkProvider::deviceLinkDestroyed(QObject* destroyedDeviceLink)
void LanLinkProvider::configureSocket(QSslSocket* socket)
{
- int fd = socket->socketDescriptor();
-
- socket->setSocketOption(QAbstractSocket::KeepAliveOption, QVariant(1));
-
// Setting supported ciphers manually
// Top 3 ciphers are for new Android devices, botton two are for old Android devices
// FIXME : These cipher suites should be checked whether they are supported or not on device
@@ -444,22 +440,24 @@ void LanLinkProvider::configureSocket(QSslSocket* socket)
socket->setLocalCertificate(KdeConnectConfig::instance()->certificate());
socket->setPrivateKey(KdeConnectConfig::instance()->privateKeyPath());
+ socket->setSocketOption(QAbstractSocket::KeepAliveOption, QVariant(1));
+
#ifdef TCP_KEEPIDLE
// time to start sending keepalive packets (seconds)
int maxIdle = 10;
- setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &maxIdle, sizeof(maxIdle));
+ setsockopt(socket->socketDescriptor(), IPPROTO_TCP, TCP_KEEPIDLE, &maxIdle, sizeof(maxIdle));
#endif
#ifdef TCP_KEEPINTVL
// interval between keepalive packets after the initial period (seconds)
int interval = 5;
- setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &interval, sizeof(interval));
+ setsockopt(socket->socketDescriptor(), IPPROTO_TCP, TCP_KEEPINTVL, &interval, sizeof(interval));
#endif
#ifdef TCP_KEEPCNT
// number of missed keepalive packets before disconnecting
int count = 3;
- setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &count, sizeof(count));
+ setsockopt(socket->socketDescriptor(), IPPROTO_TCP, TCP_KEEPCNT, &count, sizeof(count));
#endif
}
diff --git a/core/core_debug.cpp b/core/core_debug.cpp
index 6fcf807..7dbdc37 100644
--- a/core/core_debug.cpp
+++ b/core/core_debug.cpp
@@ -20,17 +20,19 @@
#include "core_debug.h"
-#include <execinfo.h>
-#include <stdlib.h>
+#ifdef Q_OS_LINUX
#include <execinfo.h>
#include <stdlib.h>
#include <unistd.h>
+#endif
void logBacktrace()
{
+#ifdef Q_OS_LINUX
void *array[32];
size_t size = backtrace (array, 32);
char **strings = backtrace_symbols (array, size);
backtrace_symbols_fd(array, size, STDERR_FILENO);
free (strings);
+#endif
}
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 6b6e661..7832283 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -7,7 +7,7 @@ include_directories(
)
set(kdeconnect_libraries
- kdeconnectcore
+ kdeconnectcore
KF5::I18n
KF5::KIOWidgets
Qt5::DBus
@@ -19,44 +19,12 @@ set(kdeconnect_libraries
ecm_add_test(pluginloadtest.cpp LINK_LIBRARIES ${kdeconnect_libraries})
ecm_add_test(sendfiletest.cpp LINK_LIBRARIES ${kdeconnect_libraries})
ecm_add_test(networkpackagetests.cpp LINK_LIBRARIES ${kdeconnect_libraries})
-
-ecm_add_test(testsocketlinereader.cpp ../core/backends/lan/socketlinereader.cpp ../core/backends/lan/server.cpp TEST_NAME testsocketlinereader LINK_LIBRARIES ${kdeconnect_libraries})
-
-set(testsslsocketlinereader_sources
- ../core/backends/lan/server.cpp
- ../core/backends/lan/socketlinereader.cpp
-)
-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 kdeconnectconfigtest LINK_LIBRARIES ${kdeconnect_libraries})
-
-set(lanlinkprovidertest_sources
- ../core/backends/devicelink.cpp
- ../core/backends/lan/downloadjob.cpp
- ../core/backends/lan/landevicelink.cpp
- ../core/backends/lan/lanlinkprovider.cpp
- ../core/backends/lan/lanpairinghandler.cpp
- ../core/backends/lan/server.cpp
- ../core/backends/lan/socketlinereader.cpp
- ../core/backends/lan/uploadjob.cpp
- ../core/backends/linkprovider.cpp
- ../core/backends/pairinghandler.cpp
- ../core/device.cpp
- ../core/pluginloader.cpp
- ../core/core_debug.cpp
-)
-ecm_add_test(lanlinkprovidertest.cpp ${lanlinkprovidertest_sources} TEST_NAME lanlinkprovidertest LINK_LIBRARIES ${kdeconnect_libraries})
-
-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})
+ecm_add_test(testsocketlinereader.cpp TEST_NAME testsocketlinereader LINK_LIBRARIES ${kdeconnect_libraries})
+ecm_add_test(testsslsocketlinereader.cpp TEST_NAME testsslsocketlinereader LINK_LIBRARIES ${kdeconnect_libraries})
+ecm_add_test(kdeconnectconfigtest.cpp TEST_NAME kdeconnectconfigtest LINK_LIBRARIES ${kdeconnect_libraries})
+ecm_add_test(lanlinkprovidertest.cpp TEST_NAME lanlinkprovidertest LINK_LIBRARIES ${kdeconnect_libraries})
+ecm_add_test(devicetest.cpp TEST_NAME devicetest LINK_LIBRARIES ${kdeconnect_libraries})
+ecm_add_test(downloadjobtest.cpp TEST_NAME downloadjobtest LINK_LIBRARIES ${kdeconnect_libraries})
ecm_add_test(testnotificationlistener.cpp
../plugins/sendnotifications/sendnotificationsplugin.cpp
../plugins/sendnotifications/notificationslistener.cpp
diff --git a/tests/networkpackagetests.cpp b/tests/networkpackagetests.cpp
index 8f8d283..815080f 100644
--- a/tests/networkpackagetests.cpp
+++ b/tests/networkpackagetests.cpp
@@ -25,13 +25,6 @@
#include <QtTest>
#include <QtCrypto>
-static void initEnv()
-{
- // Force LC_TIME=C to make sure longMonthName returns as en_US.
- setenv("LC_TIME", "C", 1);
-}
-Q_CONSTRUCTOR_FUNCTION(initEnv)
-
QTEST_GUILESS_MAIN(NetworkPackageTests);
void NetworkPackageTests::initTestCase()
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list