Hello community, here is the log from the commit of package kdeconnect-kde for openSUSE:Factory checked in at 2018-11-15 12:42:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdeconnect-kde (Old) and /work/SRC/openSUSE:Factory/.kdeconnect-kde.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdeconnect-kde" Thu Nov 15 12:42:01 2018 rev:13 rq:649176 version:1.3.3 Changes: -------- --- /work/SRC/openSUSE:Factory/kdeconnect-kde/kdeconnect-kde.changes 2018-11-09 07:54:24.723711644 +0100 +++ /work/SRC/openSUSE:Factory/.kdeconnect-kde.new/kdeconnect-kde.changes 2018-11-15 12:42:03.330140359 +0100 @@ -1,0 +2,6 @@ +Wed Nov 14 22:10:19 UTC 2018 - [email protected] + +- Add 0001-Fix-build-on-Leap-42.3.patch to make it build on Leap + 42.3 + +------------------------------------------------------------------- New: ---- 0001-Fix-build-on-Leap-42.3.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdeconnect-kde.spec ++++++ --- /var/tmp/diff_new_pack.sHdW5k/_old 2018-11-15 12:42:03.786139841 +0100 +++ /var/tmp/diff_new_pack.sHdW5k/_new 2018-11-15 12:42:03.786139841 +0100 @@ -27,8 +27,10 @@ Source1: https://download.kde.org/stable/kdeconnect/%{version}/src/%{name}-%{version}.tar.xz.sig Source100: kdeconnect-kde.SuSEfirewall Source101: kdeconnect-kde-firewalld.xml +# PATCH-FIX-OPENSUSE +Patch: 0001-Fix-build-on-Leap-42.3.patch BuildRequires: cmake >= 3.0 -BuildRequires: extra-cmake-modules >= 5.42.0 +BuildRequires: extra-cmake-modules BuildRequires: kf5-filesystem BuildRequires: update-desktop-files BuildRequires: cmake(KF5ConfigWidgets) @@ -38,12 +40,12 @@ BuildRequires: cmake(KF5I18n) BuildRequires: cmake(KF5IconThemes) BuildRequires: cmake(KF5KCMUtils) -BuildRequires: cmake(KF5KIO) >= 5.42.0 +BuildRequires: cmake(KF5KIO) BuildRequires: cmake(KF5Notifications) BuildRequires: cmake(KF5Wayland) BuildRequires: cmake(Qca-qt5) -BuildRequires: cmake(Qt5Quick) >= 5.7.0 -BuildRequires: cmake(Qt5X11Extras) >= 5.7.0 +BuildRequires: cmake(Qt5Quick) +BuildRequires: cmake(Qt5X11Extras) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(libfakekey) BuildRequires: pkgconfig(x11) @@ -72,6 +74,9 @@ %{lang_package} %prep %setup -q -n %{name}-%{version} +%if 0%{?suse_version} < 1500 +%patch -p1 +%endif %build %cmake_kf5 -d build ++++++ 0001-Fix-build-on-Leap-42.3.patch ++++++ >From ef8d129f2ff48d04f5919dfe3ebed3630ae307ef Mon Sep 17 00:00:00 2001 From: Wolfgang Bauer <[email protected]> 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 3) 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
