From d69e2856e17f3841cae4dedc2a5d9f2c2c1cc3e1609c254113ffd20f218f6699 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Mon, 11 May 2015 20:40:04 +0000 Subject: [PATCH 1/4] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/libdbusmenu-qt5?expand=0&rev=20 --- avoid-shadowing-variable+fix-leak.diff | 18 ++++++++++++++++++ dont-leak-all-the-watchers.diff | 20 ++++++++++++++++++++ libdbusmenu-qt5.changes | 7 +++++++ libdbusmenu-qt5.spec | 8 +++++++- 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 avoid-shadowing-variable+fix-leak.diff create mode 100644 dont-leak-all-the-watchers.diff diff --git a/avoid-shadowing-variable+fix-leak.diff b/avoid-shadowing-variable+fix-leak.diff new file mode 100644 index 0000000..8c06970 --- /dev/null +++ b/avoid-shadowing-variable+fix-leak.diff @@ -0,0 +1,18 @@ +=== modified file 'src/dbusmenuimporter.cpp' +--- src/dbusmenuimporter.cpp 2015-05-05 19:42:58 +0000 ++++ src/dbusmenuimporter.cpp 2015-05-05 19:54:13 +0000 +@@ -553,10 +553,11 @@ + + if (needRefresh || menu->actions().isEmpty()) { + d->m_idsRefreshedByAboutToShow << id; +- watcher = d->refresh(id); +- if (!d->waitForWatcher(watcher, REFRESH_TIMEOUT)) { ++ QDBusPendingCallWatcher *watcher2 = d->refresh(id); ++ if (!d->waitForWatcher(watcher2, REFRESH_TIMEOUT)) { + DMWARNING << "Application did not refresh before timeout"; + } ++ watcher2->deleteLater(); + } + } + + diff --git a/dont-leak-all-the-watchers.diff b/dont-leak-all-the-watchers.diff new file mode 100644 index 0000000..52725d0 --- /dev/null +++ b/dont-leak-all-the-watchers.diff @@ -0,0 +1,20 @@ +=== modified file 'src/dbusmenuimporter.cpp' +--- src/dbusmenuimporter.cpp 2014-03-05 09:53:39 +0000 ++++ src/dbusmenuimporter.cpp 2015-05-05 19:42:58 +0000 +@@ -433,6 +433,7 @@ + void DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher) + { + int parentId = watcher->property(DBUSMENU_PROPERTY_ID).toInt(); ++ watcher->deleteLater(); + + QDBusPendingReply reply = *watcher; + if (!reply.isValid()) { +@@ -538,6 +539,7 @@ + void DBusMenuImporter::slotAboutToShowDBusCallFinished(QDBusPendingCallWatcher *watcher) + { + int id = watcher->property(DBUSMENU_PROPERTY_ID).toInt(); ++ watcher->deleteLater(); + + QDBusPendingReply reply = *watcher; + if (reply.isError()) { + diff --git a/libdbusmenu-qt5.changes b/libdbusmenu-qt5.changes index 2ffb99e..d0b9f62 100644 --- a/libdbusmenu-qt5.changes +++ b/libdbusmenu-qt5.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon May 11 20:38:21 UTC 2015 - hrvoje.senjan@gmail.com + +- Add patches from upstream: + dont-leak-all-the-watchers.diff and + avoid-shadowing-variable+fix-leak.diff + ------------------------------------------------------------------- Mon Sep 15 19:31:29 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/libdbusmenu-qt5.spec b/libdbusmenu-qt5.spec index 0cb52d1..3e836b9 100644 --- a/libdbusmenu-qt5.spec +++ b/libdbusmenu-qt5.spec @@ -1,7 +1,7 @@ # # spec file for package libdbusmenu-qt5 # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,6 +32,10 @@ Source1: baselibs.conf Patch1: noqDebug-qWarnings.patch # PATCH-FIX-UPSTREAM full_include_dir.patch -- CMake 2.8.12 creates a fatal error on relative include dirs for a target. silence that policy Patch2: full_include_dir.patch +# PATCH-FIX-UPSTREAM dont-leak-all-the-watchers.diff +Patch3: dont-leak-all-the-watchers.diff +# PATCH-FIX-UPSTREAM avoid-shadowing-variable+fix-leak.diff +Patch4: avoid-shadowing-variable+fix-leak.diff #Needed for DISABLE_FIND_PACKAGE BuildRequires: cmake >= 2.8.6 BuildRequires: doxygen @@ -74,6 +78,8 @@ This package contains development files for libdbusmenu-qt5. %if 0%{?suse_version} <= 1310 %patch2 -p1 %endif +%patch3 -p0 +%patch4 -p0 # Remove build time references so build-compare can do its work sed -i "s/HTML_TIMESTAMP = YES/HTML_TIMESTAMP = NO/" Doxyfile.in From ad8ccdad5734bedd2e2e0f45d31f334ba517cdca2300a2a2dbc18bb15e0b7251 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Mon, 11 May 2015 20:44:48 +0000 Subject: [PATCH 2/4] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/libdbusmenu-qt5?expand=0&rev=21 --- avoid-shadowing-variable+fix-leak.diff | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/avoid-shadowing-variable+fix-leak.diff b/avoid-shadowing-variable+fix-leak.diff index 8c06970..4bc5c1e 100644 --- a/avoid-shadowing-variable+fix-leak.diff +++ b/avoid-shadowing-variable+fix-leak.diff @@ -1,7 +1,7 @@ === modified file 'src/dbusmenuimporter.cpp' --- src/dbusmenuimporter.cpp 2015-05-05 19:42:58 +0000 +++ src/dbusmenuimporter.cpp 2015-05-05 19:54:13 +0000 -@@ -553,10 +553,11 @@ +@@ -571,12 +571,13 @@ if (needRefresh || menu->actions().isEmpty()) { d->m_idsRefreshedByAboutToShow << id; @@ -9,7 +9,9 @@ - if (!d->waitForWatcher(watcher, REFRESH_TIMEOUT)) { + QDBusPendingCallWatcher *watcher2 = d->refresh(id); + if (!d->waitForWatcher(watcher2, REFRESH_TIMEOUT)) { + #ifndef QT_NO_DEBUG DMWARNING << "Application did not refresh before timeout"; + #endif } + watcher2->deleteLater(); } From fd5b839f23c1e91bcb4dc44ee3770bbaab9e8ca21a917d05c28a9f3d892025fa Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Fri, 15 May 2015 19:29:39 +0000 Subject: [PATCH 3/4] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/libdbusmenu-qt5?expand=0&rev=22 --- avoid-shadowing-variable+fix-leak.diff | 2 +- libdbusmenu-qt5.changes | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/avoid-shadowing-variable+fix-leak.diff b/avoid-shadowing-variable+fix-leak.diff index 4bc5c1e..fcb7dba 100644 --- a/avoid-shadowing-variable+fix-leak.diff +++ b/avoid-shadowing-variable+fix-leak.diff @@ -13,7 +13,7 @@ DMWARNING << "Application did not refresh before timeout"; #endif } -+ watcher2->deleteLater(); ++ //watcher2->deleteLater(); } } diff --git a/libdbusmenu-qt5.changes b/libdbusmenu-qt5.changes index d0b9f62..d97c8e6 100644 --- a/libdbusmenu-qt5.changes +++ b/libdbusmenu-qt5.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 15 19:29:14 UTC 2015 - hrvoje.senjan@gmail.com + +- Adjust avoid-shadowing-variable+fix-leak.diff so it doesn't crash + ------------------------------------------------------------------- Mon May 11 20:38:21 UTC 2015 - hrvoje.senjan@gmail.com From 28093ee57d9ede0c09e4ec529fb8651611a597ef677e7cb246be415635e66b21 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Fri, 22 May 2015 17:33:28 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/libdbusmenu-qt5?expand=0&rev=23 --- ...g-variable+fix-leak.diff => Clean-up-variable-naming.patch | 0 libdbusmenu-qt5.changes | 2 +- libdbusmenu-qt5.spec | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename avoid-shadowing-variable+fix-leak.diff => Clean-up-variable-naming.patch (100%) diff --git a/avoid-shadowing-variable+fix-leak.diff b/Clean-up-variable-naming.patch similarity index 100% rename from avoid-shadowing-variable+fix-leak.diff rename to Clean-up-variable-naming.patch diff --git a/libdbusmenu-qt5.changes b/libdbusmenu-qt5.changes index d97c8e6..7e0cefe 100644 --- a/libdbusmenu-qt5.changes +++ b/libdbusmenu-qt5.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Fri May 15 19:29:14 UTC 2015 - hrvoje.senjan@gmail.com -- Adjust avoid-shadowing-variable+fix-leak.diff so it doesn't crash +- Replace avoid-shadowing-variable+fix-leak.diff with Clean-up-variable-naming.patch ------------------------------------------------------------------- Mon May 11 20:38:21 UTC 2015 - hrvoje.senjan@gmail.com diff --git a/libdbusmenu-qt5.spec b/libdbusmenu-qt5.spec index 3e836b9..d729139 100644 --- a/libdbusmenu-qt5.spec +++ b/libdbusmenu-qt5.spec @@ -34,8 +34,8 @@ Patch1: noqDebug-qWarnings.patch Patch2: full_include_dir.patch # PATCH-FIX-UPSTREAM dont-leak-all-the-watchers.diff Patch3: dont-leak-all-the-watchers.diff -# PATCH-FIX-UPSTREAM avoid-shadowing-variable+fix-leak.diff -Patch4: avoid-shadowing-variable+fix-leak.diff +# PATCH-FIX-UPSTREAM Clean-up-variable-naming.patch +Patch4: Clean-up-variable-naming.patch #Needed for DISABLE_FIND_PACKAGE BuildRequires: cmake >= 2.8.6 BuildRequires: doxygen