diff --git a/0.9.3+16.04.20160218-0ubuntu1.tar.gz b/0.9.3+16.04.20160218-0ubuntu1.tar.gz new file mode 100644 index 0000000..7e438e1 --- /dev/null +++ b/0.9.3+16.04.20160218-0ubuntu1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc2c3960c0c6b520e42e652b6a71b769cff6cb651adece92d2a0bc6bdff37c29 +size 52510 diff --git a/libdbusmenu-qt5.changes b/libdbusmenu-qt5.changes index cd2a732..c3a4700 100644 --- a/libdbusmenu-qt5.changes +++ b/libdbusmenu-qt5.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Sep 9 06:29:29 UTC 2020 - Antonio Larrosa + +- Rework patch trusting the compiler will remove dead code properly + when debug output is disabled (as it is in the spec file): + * noqDebug-qWarnings.patch + +------------------------------------------------------------------- +Fri Sep 4 16:45:22 UTC 2020 - Antonio Larrosa + +- Update to 0.9.3+16.04.20160218: + * Ported tests to Qt5 +- Use a Source url that works + ------------------------------------------------------------------- Thu Jun 25 16:52:13 UTC 2015 - hrvoje.senjan@gmail.com diff --git a/libdbusmenu-qt5.spec b/libdbusmenu-qt5.spec index 0d482d9..d5e1f4d 100644 --- a/libdbusmenu-qt5.spec +++ b/libdbusmenu-qt5.spec @@ -1,7 +1,7 @@ # # spec file for package libdbusmenu-qt5 # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,20 +12,21 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define rname libdbusmenu-qt +%define version_ %(echo %{version} | sed -e "s/+/-/") Name: libdbusmenu-qt5 -Version: 0.9.3+15.10.20150604 +Version: 0.9.3+16.04.20160218 Release: 0 -Url: https://launchpad.net/libdbusmenu-qt/ +URL: https://launchpad.net/libdbusmenu-qt/ Summary: A Qt implementation of the DBusMenu protocol -License: LGPL-2.0+ +License: LGPL-2.0-or-later Group: System/Libraries -Source: http://archive.ubuntu.com/ubuntu/pool/main/libd/%{rname}/%{rname}_%{version}.orig.tar.gz +Source: https://github.com/unity8-team/%{rname}/archive/%{version}-0ubuntu1.tar.gz Source1: baselibs.conf # PATCH-FIX-UPSTREAM noqDebug-qWarnings.patch -- libdbusmenu uses it's own qDebug's and qWarnings, # which are useless, and annoy users, so this patch just disables them in release mode @@ -69,7 +70,7 @@ Requires: pkgconfig(Qt5Core) This package contains development files for libdbusmenu-qt5. %prep -%setup -q -n %{rname}-%{version} +%setup -q -n %{rname}-%{version_}-0ubuntu1 %patch1 -p1 %if 0%{?suse_version} <= 1310 %patch2 -p1 diff --git a/libdbusmenu-qt_0.9.3+15.10.20150604.orig.tar.gz b/libdbusmenu-qt_0.9.3+15.10.20150604.orig.tar.gz deleted file mode 100644 index 717420e..0000000 --- a/libdbusmenu-qt_0.9.3+15.10.20150604.orig.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dd87926003be6455420a077dd8edb29f5dac428b9b299b2bd73a1c29c2126328 -size 46318 diff --git a/noqDebug-qWarnings.patch b/noqDebug-qWarnings.patch index 0fb2b22..b6d43ea 100644 --- a/noqDebug-qWarnings.patch +++ b/noqDebug-qWarnings.patch @@ -1,163 +1,29 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0ee9154..597a7de 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -91,7 +91,7 @@ install(FILES ${CMAKE_BINARY_DIR}/dbusmenu-${QT_SUFFIX}.pc +Index: libdbusmenu-qt-0.9.3-16.04.20160218-0ubuntu1/CMakeLists.txt +=================================================================== +--- libdbusmenu-qt-0.9.3-16.04.20160218-0ubuntu1.orig/CMakeLists.txt ++++ libdbusmenu-qt-0.9.3-16.04.20160218-0ubuntu1/CMakeLists.txt +@@ -107,7 +107,7 @@ install(FILES ${CMAKE_BINARY_DIR}/dbusme + ) add_subdirectory(src) - if (NOT USE_QT5) # TODO port tests to Qt5 -add_subdirectory(tests) +#add_subdirectory(tests) - endif() add_subdirectory(tools) -diff --git a/src/dbusmenuexporter.cpp b/src/dbusmenuexporter.cpp -index f25718d..8868efb 100644 ---- a/src/dbusmenuexporter.cpp -+++ b/src/dbusmenuexporter.cpp -@@ -160,7 +160,9 @@ void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem *item, QMenu *me - Q_FOREACH(QAction *action, menu->actions()) { - int actionId = m_idForAction.value(action, -1); - if (actionId == -1) { + if(WITH_DOC) +Index: libdbusmenu-qt-0.9.3-16.04.20160218-0ubuntu1/src/debug_p.h +=================================================================== +--- libdbusmenu-qt-0.9.3-16.04.20160218-0ubuntu1.orig/src/debug_p.h ++++ libdbusmenu-qt-0.9.3-16.04.20160218-0ubuntu1/src/debug_p.h +@@ -26,7 +26,11 @@ + #define _DMBLUE "\033[34m" + #define _DMRED "\033[31m" + #define _DMRESET "\033[0m" +#ifndef QT_NO_DEBUG - DMWARNING << "No id for action"; + #define _DMTRACE(level, color) (level().nospace() << color << __PRETTY_FUNCTION__ << _DMRESET ":").space() ++#else ++#define _DMTRACE(level, color) QT_NO_QDEBUG_MACRO() +#endif - continue; - } - -@@ -185,7 +187,9 @@ void DBusMenuExporterPrivate::addAction(QAction *action, int parentId) - { - int id = m_idForAction.value(action, -1); - if (id != -1) { -+#ifndef QT_NO_DEBUG - DMWARNING << "Already tracking action" << action->text() << "under id" << id; -+#endif - return; - } - QVariantMap map = propertiesForAction(action); -diff --git a/src/dbusmenuimporter.cpp b/src/dbusmenuimporter.cpp -index 39f5995..d629d69 100644 ---- a/src/dbusmenuimporter.cpp -+++ b/src/dbusmenuimporter.cpp -@@ -94,7 +94,9 @@ public: - QDBusPendingCallWatcher *refresh(int id) - { - #ifdef BENCHMARK -+#ifndef QT_NO_DEBUG - DMDEBUG << "Starting refresh chrono for id" << id; -+#endif - sChrono.start(); - #endif - QDBusPendingCall call = m_interface->asyncCall("GetLayout", id, 1, QStringList()); -@@ -193,7 +195,9 @@ public: - updateActionShortcut(action, value); - } else if (key == "children-display") { - } else { -+#ifndef QT_NO_DEBUG - DMWARNING << "Unhandled property update" << key; -+#endif - } - } - -@@ -241,7 +245,9 @@ public: - action->setProperty(DBUSMENU_PROPERTY_ICON_DATA_HASH, dataHash); - QPixmap pix; - if (!pix.loadFromData(data)) { -+#ifndef QT_NO_DEBUG - DMWARNING << "Failed to decode icon-data property for action" << action->text(); -+#endif - action->setIcon(QIcon()); - return; - } -@@ -312,7 +318,9 @@ public: - } - - if (watcher->isError()) { -+#ifndef QT_NO_DEBUG - DMWARNING << watcher->error().message(); -+#endif - return false; - } - -@@ -437,18 +445,24 @@ void DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher) - - QDBusPendingReply reply = *watcher; - if (!reply.isValid()) { -+#ifndef QT_NO_DEBUG - DMWARNING << reply.error().message(); -+#endif - return; - } - - #ifdef BENCHMARK -+#ifndef QT_NO_DEBUG - DMDEBUG << "- items received:" << sChrono.elapsed() << "ms"; -+#endif - #endif - DBusMenuLayoutItem rootItem = reply.argumentAt<1>(); - - QMenu *menu = d->menuForId(parentId); - if (!menu) { -+#ifndef QT_NO_DEBUG - DMWARNING << "No menu for id" << parentId; -+#endif - return; - } - -@@ -475,7 +489,9 @@ void DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher) - } - } - #ifdef BENCHMARK -+#ifndef QT_NO_DEBUG - DMDEBUG << "- Menu filled:" << sChrono.elapsed() << "ms"; -+#endif - #endif - } - -@@ -514,7 +530,9 @@ void DBusMenuImporter::slotMenuAboutToShow() - QPointer guard(this); - - if (!d->waitForWatcher(watcher, ABOUT_TO_SHOW_TIMEOUT)) { -+#ifndef QT_NO_DEBUG - DMWARNING << "Application did not answer to AboutToShow() before timeout"; -+#endif - } - - #ifdef BENCHMARK -@@ -543,7 +561,9 @@ void DBusMenuImporter::slotAboutToShowDBusCallFinished(QDBusPendingCallWatcher * - - QDBusPendingReply reply = *watcher; - if (reply.isError()) { -+#ifndef QT_NO_DEBUG - DMWARNING << "Call to AboutToShow() failed:" << reply.error().message(); -+#endif - return; - } - bool needRefresh = reply.argumentAt<0>(); -@@ -555,7 +575,9 @@ void DBusMenuImporter::slotAboutToShowDBusCallFinished(QDBusPendingCallWatcher * - d->m_idsRefreshedByAboutToShow << id; - QDBusPendingCallWatcher *watcher2 = d->refresh(id); - if (!d->waitForWatcher(watcher2, REFRESH_TIMEOUT)) { -+#ifndef QT_NO_DEBUG - DMWARNING << "Application did not refresh before timeout"; -+#endif - } - } - } -diff --git a/src/debug_p.h b/src/debug_p.h -index bff37bd..ecdd3a5 100644 ---- a/src/debug_p.h -+++ b/src/debug_p.h -@@ -36,12 +36,10 @@ - #define DMVAR(var) DMDEBUG << #var ":" << var - - #define DMRETURN_IF_FAIL(cond) if (!(cond)) { \ -- DMWARNING << "Condition failed: " #cond; \ - return; \ - } - - #define DMRETURN_VALUE_IF_FAIL(cond, value) if (!(cond)) { \ -- DMWARNING << "Condition failed: " #cond; \ - return (value); \ - } + // Simple macros to get KDebug like support + #define DMDEBUG _DMTRACE(qDebug, _DMBLUE)