Accepting request 833181 from home:alarrosa:branches:KDE:Qt5
- 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 - Update to 0.9.3+16.04.20160218: * Ported tests to Qt5 - Use a Source url that works OBS-URL: https://build.opensuse.org/request/show/833181 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/libdbusmenu-qt5?expand=0&rev=28
This commit is contained in:
parent
a796581a12
commit
f351be5b25
BIN
0.9.3+16.04.20160218-0ubuntu1.tar.gz
(Stored with Git LFS)
Normal file
BIN
0.9.3+16.04.20160218-0ubuntu1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 9 06:29:29 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
- 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 <alarrosa@suse.com>
|
||||||
|
|
||||||
|
- 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
|
Thu Jun 25 16:52:13 UTC 2015 - hrvoje.senjan@gmail.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libdbusmenu-qt5
|
# spec file for package libdbusmenu-qt5
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# 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)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# 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 rname libdbusmenu-qt
|
||||||
|
%define version_ %(echo %{version} | sed -e "s/+/-/")
|
||||||
|
|
||||||
Name: libdbusmenu-qt5
|
Name: libdbusmenu-qt5
|
||||||
Version: 0.9.3+15.10.20150604
|
Version: 0.9.3+16.04.20160218
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: https://launchpad.net/libdbusmenu-qt/
|
URL: https://launchpad.net/libdbusmenu-qt/
|
||||||
Summary: A Qt implementation of the DBusMenu protocol
|
Summary: A Qt implementation of the DBusMenu protocol
|
||||||
License: LGPL-2.0+
|
License: LGPL-2.0-or-later
|
||||||
Group: System/Libraries
|
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
|
Source1: baselibs.conf
|
||||||
# PATCH-FIX-UPSTREAM noqDebug-qWarnings.patch -- libdbusmenu uses it's own qDebug's and qWarnings,
|
# 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
|
# 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.
|
This package contains development files for libdbusmenu-qt5.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{rname}-%{version}
|
%setup -q -n %{rname}-%{version_}-0ubuntu1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%if 0%{?suse_version} <= 1310
|
%if 0%{?suse_version} <= 1310
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:dd87926003be6455420a077dd8edb29f5dac428b9b299b2bd73a1c29c2126328
|
|
||||||
size 46318
|
|
@ -1,163 +1,29 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
Index: libdbusmenu-qt-0.9.3-16.04.20160218-0ubuntu1/CMakeLists.txt
|
||||||
index 0ee9154..597a7de 100644
|
===================================================================
|
||||||
--- a/CMakeLists.txt
|
--- libdbusmenu-qt-0.9.3-16.04.20160218-0ubuntu1.orig/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ libdbusmenu-qt-0.9.3-16.04.20160218-0ubuntu1/CMakeLists.txt
|
||||||
@@ -91,7 +91,7 @@ install(FILES ${CMAKE_BINARY_DIR}/dbusmenu-${QT_SUFFIX}.pc
|
@@ -107,7 +107,7 @@ install(FILES ${CMAKE_BINARY_DIR}/dbusme
|
||||||
|
)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
if (NOT USE_QT5) # TODO port tests to Qt5
|
|
||||||
-add_subdirectory(tests)
|
-add_subdirectory(tests)
|
||||||
+#add_subdirectory(tests)
|
+#add_subdirectory(tests)
|
||||||
endif()
|
|
||||||
add_subdirectory(tools)
|
add_subdirectory(tools)
|
||||||
|
|
||||||
diff --git a/src/dbusmenuexporter.cpp b/src/dbusmenuexporter.cpp
|
if(WITH_DOC)
|
||||||
index f25718d..8868efb 100644
|
Index: libdbusmenu-qt-0.9.3-16.04.20160218-0ubuntu1/src/debug_p.h
|
||||||
--- a/src/dbusmenuexporter.cpp
|
===================================================================
|
||||||
+++ b/src/dbusmenuexporter.cpp
|
--- libdbusmenu-qt-0.9.3-16.04.20160218-0ubuntu1.orig/src/debug_p.h
|
||||||
@@ -160,7 +160,9 @@ void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem *item, QMenu *me
|
+++ libdbusmenu-qt-0.9.3-16.04.20160218-0ubuntu1/src/debug_p.h
|
||||||
Q_FOREACH(QAction *action, menu->actions()) {
|
@@ -26,7 +26,11 @@
|
||||||
int actionId = m_idForAction.value(action, -1);
|
#define _DMBLUE "\033[34m"
|
||||||
if (actionId == -1) {
|
#define _DMRED "\033[31m"
|
||||||
|
#define _DMRESET "\033[0m"
|
||||||
+#ifndef QT_NO_DEBUG
|
+#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
|
+#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<uint, DBusMenuLayoutItem> 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<QObject> 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<bool> 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)
|
||||||
|
Loading…
Reference in New Issue
Block a user