2019-08-05 08:41:42 +00:00
committed by Git OBS Bridge
parent d599cb1062
commit d6af60abcb
8 changed files with 49 additions and 259 deletions

View File

@@ -1,196 +0,0 @@
From ef8d129f2ff48d04f5919dfe3ebed3630ae307ef Mon Sep 17 00:00:00 2001
From: Wolfgang Bauer <wbauer@tmo.at>
Date: Wed, 14 Nov 2018 23:01:12 +0100
Subject: [PATCH] Fix build on Leap 42.3
The KF5 requirements are just for getting additional
bugfixes/improvements.
Building against Qt < 5.7.0 required these changes:
- QAction(): the "parent" argument is only optional since Qt 5.7.0.
Fixed by passing a nullptr explicitly (which is the default value)
- qAsConst is only available in Qt 5.7.0 either, so define it where it
is used when building against lower versions.
---
CMakeLists.txt | 4 ++--
core/daemon.cpp | 9 +++++++++
core/device.cpp | 9 +++++++++
core/pluginloader.cpp | 9 +++++++++
interfaces/notificationsmodel.cpp | 9 +++++++++
plasmoid/declarativeplugin/responsewaiter.cpp | 9 +++++++++
plugins/pausemusic/pausemusicplugin.cpp | 9 +++++++++
plugins/runcommand/runcommand_config.cpp | 2 +-
plugins/sendnotifications/notificationslistener.cpp | 9 +++++++++
9 files changed, 66 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c759d11..52d13d66 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,8 +7,8 @@ set(KDECONNECT_VERSION_MINOR 3)
set(KDECONNECT_VERSION_PATCH 4)
set(KDECONNECT_VERSION "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}.${KDECONNECT_VERSION_PATCH}")
-set(QT_MIN_VERSION "5.7.0")
-set(KF5_MIN_VERSION "5.42.0")
+set(QT_MIN_VERSION "5.6.0")
+set(KF5_MIN_VERSION "5.32.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake)
diff --git a/core/daemon.cpp b/core/daemon.cpp
index de98076c..1c818e52 100644
--- a/core/daemon.cpp
+++ b/core/daemon.cpp
@@ -40,6 +40,15 @@
#include "backends/devicelink.h"
#include "backends/linkprovider.h"
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+// this adds const to non-const objects (like std::as_const)
+template <typename T>
+Q_DECL_CONSTEXPR typename std::add_const<T>::type &qAsConst(T &t) Q_DECL_NOTHROW { return t; }
+// prevent rvalue arguments:
+template <typename T>
+void qAsConst(const T &&) Q_DECL_EQ_DELETE;
+#endif
+
static Daemon* s_instance = nullptr;
struct DaemonPrivate
diff --git a/core/device.cpp b/core/device.cpp
index fa600213..dfa6979d 100644
--- a/core/device.cpp
+++ b/core/device.cpp
@@ -37,6 +37,15 @@
#include "kdeconnectconfig.h"
#include "daemon.h"
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+// this adds const to non-const objects (like std::as_const)
+template <typename T>
+Q_DECL_CONSTEXPR typename std::add_const<T>::type &qAsConst(T &t) Q_DECL_NOTHROW { return t; }
+// prevent rvalue arguments:
+template <typename T>
+void qAsConst(const T &&) Q_DECL_EQ_DELETE;
+#endif
+
static void warn(const QString& info)
{
qWarning() << "Device pairing error" << info;
diff --git a/core/pluginloader.cpp b/core/pluginloader.cpp
index 41fd09be..62797413 100644
--- a/core/pluginloader.cpp
+++ b/core/pluginloader.cpp
@@ -28,6 +28,15 @@
#include "device.h"
#include "kdeconnectplugin.h"
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+// this adds const to non-const objects (like std::as_const)
+template <typename T>
+Q_DECL_CONSTEXPR typename std::add_const<T>::type &qAsConst(T &t) Q_DECL_NOTHROW { return t; }
+// prevent rvalue arguments:
+template <typename T>
+void qAsConst(const T &&) Q_DECL_EQ_DELETE;
+#endif
+
PluginLoader* PluginLoader::instance()
{
static PluginLoader* instance = new PluginLoader();
diff --git a/interfaces/notificationsmodel.cpp b/interfaces/notificationsmodel.cpp
index 5b884c56..07b02007 100644
--- a/interfaces/notificationsmodel.cpp
+++ b/interfaces/notificationsmodel.cpp
@@ -29,6 +29,15 @@
//#include "modeltest.h"
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+// this adds const to non-const objects (like std::as_const)
+template <typename T>
+Q_DECL_CONSTEXPR typename std::add_const<T>::type &qAsConst(T &t) Q_DECL_NOTHROW { return t; }
+// prevent rvalue arguments:
+template <typename T>
+void qAsConst(const T &&) Q_DECL_EQ_DELETE;
+#endif
+
NotificationsModel::NotificationsModel(QObject* parent)
: QAbstractListModel(parent)
, m_dbusInterface(nullptr)
diff --git a/plasmoid/declarativeplugin/responsewaiter.cpp b/plasmoid/declarativeplugin/responsewaiter.cpp
index 6288e782..aa05e17f 100644
--- a/plasmoid/declarativeplugin/responsewaiter.cpp
+++ b/plasmoid/declarativeplugin/responsewaiter.cpp
@@ -5,6 +5,15 @@
#include <QDebug>
#include <QCoreApplication>
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+// this adds const to non-const objects (like std::as_const)
+template <typename T>
+Q_DECL_CONSTEXPR typename std::add_const<T>::type &qAsConst(T &t) Q_DECL_NOTHROW { return t; }
+// prevent rvalue arguments:
+template <typename T>
+void qAsConst(const T &&) Q_DECL_EQ_DELETE;
+#endif
+
Q_DECLARE_METATYPE(QDBusPendingReply<>)
Q_DECLARE_METATYPE(QDBusPendingReply<QVariant>)
Q_DECLARE_METATYPE(QDBusPendingReply<bool>)
diff --git a/plugins/pausemusic/pausemusicplugin.cpp b/plugins/pausemusic/pausemusicplugin.cpp
index 3e68bcf0..99dc58f9 100644
--- a/plugins/pausemusic/pausemusicplugin.cpp
+++ b/plugins/pausemusic/pausemusicplugin.cpp
@@ -30,6 +30,15 @@
#include <KPluginFactory>
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+// this adds const to non-const objects (like std::as_const)
+template <typename T>
+Q_DECL_CONSTEXPR typename std::add_const<T>::type &qAsConst(T &t) Q_DECL_NOTHROW { return t; }
+// prevent rvalue arguments:
+template <typename T>
+void qAsConst(const T &&) Q_DECL_EQ_DELETE;
+#endif
+
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_pausemusic.json", registerPlugin< PauseMusicPlugin >(); )
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PAUSEMUSIC, "kdeconnect.plugin.pausemusic")
diff --git a/plugins/runcommand/runcommand_config.cpp b/plugins/runcommand/runcommand_config.cpp
index 8a3c7f17..cba247cc 100644
--- a/plugins/runcommand/runcommand_config.cpp
+++ b/plugins/runcommand/runcommand_config.cpp
@@ -69,7 +69,7 @@ RunCommandConfig::~RunCommandConfig()
void RunCommandConfig::addSuggestedCommand(QMenu* menu, const QString &name, const QString &command)
{
- auto action = new QAction(name);
+ auto action = new QAction(name, nullptr);
connect(action, &QAction::triggered, action, [this, name, command]() {
insertRow(0, name, command);
Q_EMIT changed(true);
diff --git a/plugins/sendnotifications/notificationslistener.cpp b/plugins/sendnotifications/notificationslistener.cpp
index c69c20ca..597640b3 100644
--- a/plugins/sendnotifications/notificationslistener.cpp
+++ b/plugins/sendnotifications/notificationslistener.cpp
@@ -39,6 +39,15 @@
#include "sendnotification_debug.h"
#include "notifyingapplication.h"
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+// this adds const to non-const objects (like std::as_const)
+template <typename T>
+Q_DECL_CONSTEXPR typename std::add_const<T>::type &qAsConst(T &t) Q_DECL_NOTHROW { return t; }
+// prevent rvalue arguments:
+template <typename T>
+void qAsConst(const T &&) Q_DECL_EQ_DELETE;
+#endif
+
NotificationsListener::NotificationsListener(KdeConnectPlugin* aPlugin)
: QDBusAbstractAdaptor(aPlugin),
m_plugin(aPlugin)
--
2.16.4

View File

@@ -1,38 +0,0 @@
From 902474c5d99403194ca613fb853483e81356c658 Mon Sep 17 00:00:00 2001
From: Wolfgang Bauer <wbauer@tmo.at>
Date: Mon, 25 Mar 2019 21:34:00 +0100
Subject: [PATCH] Revert "Retry the network packet if it failed to unserialize"
It requires at least Qt 5.7.0, but Leap 42.3 only has 5.6.2.
This reverts commit a2c6f0a8064f4426129018daa15cb82c6d33b69c.
---
core/backends/lan/lanlinkprovider.cpp | 3 ---
1 file changed, 3 deletions(-)
diff --git a/core/backends/lan/lanlinkprovider.cpp b/core/backends/lan/lanlinkprovider.cpp
index 77a50d3d..a6dda376 100644
--- a/core/backends/lan/lanlinkprovider.cpp
+++ b/core/backends/lan/lanlinkprovider.cpp
@@ -350,7 +350,6 @@ void LanLinkProvider::newConnection()
void LanLinkProvider::dataReceived()
{
QSslSocket* socket = qobject_cast<QSslSocket*>(sender());
- socket->startTransaction();
const QByteArray data = socket->readLine();
@@ -361,10 +360,8 @@ void LanLinkProvider::dataReceived()
if (!success) {
delete np;
- socket->rollbackTransaction();
return;
}
- socket->commitTransaction();
if (np->type() != PACKET_TYPE_IDENTITY) {
qCWarning(KDECONNECT_CORE) << "LanLinkProvider/newConnection: Expected identity, received " << np->type();
--
2.16.4

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:501057b752c3ec9791ca83f8fe592d8fd706d880fdfaf75a40d3546ed0dd328a
size 286724

View File

@@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEE9TIj8zN2ZcLM6hIuhzrDRZu89cAFAlyYo0AACgkQhzrDRZu8
9cDd8Af+PHrF+2C42riNWU46izSKDyc18rAEQA6ZAWE9NGkkkieFJkTNguZKjs+L
Lebs4QhX7ltueITFIOlf1v8gqBZkk4lXGoppwjvCGdCmyR9mdHwkqKleOoZONkwm
3S6TCUA5/gJGAKRqhwZGPp+H8VXOcLPJeDLjcvsy0x0nonPr94oGSRmIPQtotrLJ
qKhm181szFs5MGC25Jm2+e7UoL6N85eOA6l3pFiAP32nQ1jUz99Ejq5RUoyNueEF
gLK+XBNSlT17y5mvFRC3LpvzgkzoEvUWnOE6qa7HDBCwf4ED0j6eFoWYB9zHPCYY
2Ue9cSM80YTa50arDrjMj/ShIoIE+w==
=3Wmd
-----END PGP SIGNATURE-----

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e5ce7084427a831e6506494b656af9c1dd7bf29b7458c2546baf0a5d7a1f990a
size 292248

View File

@@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEE9TIj8zN2ZcLM6hIuhzrDRZu89cAFAl0/VnQACgkQhzrDRZu8
9cCagAgAtSEtEOWBldRmKztSI60WrgQ9gPwd9kxP8clO2i4CizKifgVFG+pNbiDS
g8G05CPii5bN8ObIPc+KXVIq0JTXc9VWxor+OL4DhrlUUktLC57v6gfUu6xtACRT
ttkXsGJlj5gLHBdnmcPlZO96CCHRy+mwe6GMHfD6MX0EmqqOKsY23VSZ+Xyjhk4h
gjo5kY6isOujl3VB6yBUehxqDENSp0CeXlNzeKmZeXHt5O+5CFE6sKrUiJiE5yx8
zVCGraxv4euYXDqMiqE/rWNKiYY6wHGHqnTs0011+Z7QUb6bIHZSE/f/oltwHWEg
fg022D05d4jSBATKHD3PgI+McVvE/g==
=WDoB
-----END PGP SIGNATURE-----

View File

@@ -1,3 +1,30 @@
-------------------------------------------------------------------
Tue Jul 30 19:59:33 UTC 2019 - wbauer@tmo.at
- Update to 1.3.5
* Add detectPlatform to always use wayland in a wayland session
* i18n: fix extraction of nautilus extension
* Don't update new notifications
* Install desktop file for kdeconnectd
* [sftp] Fix error message wording
* Change plugin name
* [sftp] Give better error messages for common errors
* [sftp] Improve error reporting
* Use KAboutData to set information about the daemon
* Disable session management
* Print socket error when connection fails
* [kio] Mount device during stat if necessary
* [backends/lan] Don't fail silently when a UDP packet could not
be unserialized
* Fix crash in daemon
* Fix crash in notifications plugin (kde#400010)
* Don't show multiple windows when replying to a notification
- Drop Leap 42.3 specific patches, it's no longer supported:
* 0001-Fix-build-on-Leap-42.3.patch
* 0001-Revert-Retry-the-network-packet-if-it-failed-to-unse.patch
- Don't install SuSEfirewall2 file on Tumbleweed anymore, Sf2 has
been dropped
-------------------------------------------------------------------
Mon Apr 1 22:28:14 UTC 2019 - Jan Engelhardt <jengelh@inai.de>

View File

@@ -17,7 +17,7 @@
Name: kdeconnect-kde
Version: 1.3.4
Version: 1.3.5
Release: 0
Summary: Integration of Android with Linux desktops
License: GPL-2.0-or-later
@@ -27,10 +27,6 @@ Source: https://download.kde.org/stable/kdeconnect/%{version}/%{name}-%{
Source1: https://download.kde.org/stable/kdeconnect/%{version}/%{name}-%{version}.tar.xz.sig
Source100: kdeconnect-kde.SuSEfirewall
Source101: kdeconnect-kde-firewalld.xml
# PATCH-FIX-OPENSUSE
Patch0: 0001-Fix-build-on-Leap-42.3.patch
# PATCH-FIX-OPENSUSE
Patch1: 0001-Revert-Retry-the-network-packet-if-it-failed-to-unse.patch
BuildRequires: cmake >= 3.0
BuildRequires: extra-cmake-modules
BuildRequires: kf5-filesystem
@@ -75,10 +71,6 @@ https://f-droid.org/en/packages/org.kde.kdeconnect_tp/
%prep
%setup -q
%if 0%{?suse_version} < 1500
%patch0 -p1
%patch1 -p1
%endif
%build
%cmake_kf5 -d build
@@ -87,13 +79,16 @@ https://f-droid.org/en/packages/org.kde.kdeconnect_tp/
%install
%kf5_makeinstall -C build
for translation_file in kdeconnect-{cli,core,kcm,kded,kio,plugins,urlhandler} plasma_applet_org.kde.kdeconnect; do
for translation_file in kdeconnect-{cli,core,fileitemaction,kcm,kded,kio,nautilus-extension,plugins,urlhandler} plasma_applet_org.kde.kdeconnect; do
%find_lang $translation_file %{name}.lang
done
%if %{suse_version} < 1550
# susefirewall config file
install -D -m 0644 %{SOURCE100} \
%{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
%endif
# firewalld config file
install -D -m 0644 %{SOURCE101} \
%{buildroot}%{_libexecdir}/firewalld/services/%{name}.xml
@@ -105,7 +100,9 @@ install -D -m 0644 %{SOURCE101} \
%files
%license COPYING
%doc README*
%if %{suse_version} < 1550
%config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
%endif
%dir %{_datadir}/nautilus-python
%dir %{_libexecdir}/firewalld
%dir %{_libexecdir}/firewalld/services
@@ -127,7 +124,7 @@ install -D -m 0644 %{SOURCE101} \
%{_kf5_bindir}/kdeconnect-handler
%{_kf5_bindir}/kdeconnect-indicator
%{_kf5_sharedir}/dbus-1/services/org.kde.kdeconnect.service
%{_kf5_configdir}/autostart/kdeconnectd.desktop
%{_kf5_configdir}/autostart/org.kde.kdeconnect.daemon.desktop
%{_kf5_iconsdir}/hicolor/*/status/*
%{_kf5_htmldir}/en/kdeconnect/
%dir %{_kf5_appstreamdir}