From 7b5f8936a7d859223b9bb0159c61a2f5a8a0ce24c2b9c49596b334a4cfe26b3c Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Sun, 6 Mar 2016 22:38:44 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/discover?expand=0&rev=17 --- discover.spec | 3 +++ fix_for_gcc4.diff | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 fix_for_gcc4.diff diff --git a/discover.spec b/discover.spec index 706170e..a4afd0f 100644 --- a/discover.spec +++ b/discover.spec @@ -25,6 +25,8 @@ License: GPL-2.0 Group: System/GUI/KDE Url: https://quickgit.kde.org/?p=discover.git Source0: %{name}-%{version}.tar.xz +#PATCH-FIX-UPSTREAM fix_for_gcc4.diff -- adjust the connect call so that it also builds with gcc48 +Patch1: fix_for_gcc4.diff BuildRequires: PackageKit-Qt5-devel BuildRequires: cmake >= 2.8.12 BuildRequires: extra-cmake-modules @@ -70,6 +72,7 @@ This is the systray plasmoid to notify the user that updates are available %prep %setup -q +%patch1 -p1 %build %cmake_kf5 -d build diff --git a/fix_for_gcc4.diff b/fix_for_gcc4.diff new file mode 100644 index 0000000..47d63e7 --- /dev/null +++ b/fix_for_gcc4.diff @@ -0,0 +1,34 @@ +diff --git a/libdiscover/backends/PackageKitBackend/PKTransaction.cpp b/libdiscover/backends/PackageKitBackend/PKTransaction.cpp +index 9afa28a..ca35c66 100644 +--- a/libdiscover/backends/PackageKitBackend/PKTransaction.cpp ++++ b/libdiscover/backends/PackageKitBackend/PKTransaction.cpp +@@ -64,13 +64,13 @@ void PKTransaction::start() + }; + Q_ASSERT(m_trans); + +- connect(m_trans, &PackageKit::Transaction::finished, this, &PKTransaction::cleanup); +- connect(m_trans, &PackageKit::Transaction::errorCode, this, &PKTransaction::errorFound); +- connect(m_trans, &PackageKit::Transaction::mediaChangeRequired, this, &PKTransaction::mediaChange); +- connect(m_trans, &PackageKit::Transaction::requireRestart, this, &PKTransaction::requireRestart); +- connect(m_trans, &PackageKit::Transaction::itemProgress, this, &PKTransaction::progressChanged); +- connect(m_trans, &PackageKit::Transaction::eulaRequired, this, &PKTransaction::eulaRequired); +- connect(m_trans, &PackageKit::Transaction::allowCancelChanged, this, &PKTransaction::cancellableChanged); ++ connect(m_trans.data(), &PackageKit::Transaction::finished, this, &PKTransaction::cleanup); ++ connect(m_trans.data(), &PackageKit::Transaction::errorCode, this, &PKTransaction::errorFound); ++ connect(m_trans.data(), &PackageKit::Transaction::mediaChangeRequired, this, &PKTransaction::mediaChange); ++ connect(m_trans.data(), &PackageKit::Transaction::requireRestart, this, &PKTransaction::requireRestart); ++ connect(m_trans.data(), &PackageKit::Transaction::itemProgress, this, &PKTransaction::progressChanged); ++ connect(m_trans.data(), &PackageKit::Transaction::eulaRequired, this, &PKTransaction::eulaRequired); ++ connect(m_trans.data(), &PackageKit::Transaction::allowCancelChanged, this, &PKTransaction::cancellableChanged); + + setCancellable(m_trans->allowCancel()); + } +@@ -106,7 +106,7 @@ void PKTransaction::cleanup(PackageKit::Transaction::Exit exit, uint runtime) + cancel = true; + } + +- disconnect(m_trans, nullptr, this, nullptr); ++ disconnect(m_trans.data(), nullptr, this, nullptr); + m_trans = nullptr; + + PackageKit::Transaction* t = PackageKit::Daemon::resolve(resource()->packageName(), PackageKit::Transaction::FilterArch);