Hello community,

here is the log from the commit of package kxmlgui for openSUSE:Factory checked 
in at 2016-02-24 18:57:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kxmlgui (Old)
 and      /work/SRC/openSUSE:Factory/.kxmlgui.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kxmlgui"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kxmlgui/kxmlgui.changes  2016-01-20 
09:48:46.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kxmlgui.new/kxmlgui.changes     2016-02-24 
18:57:37.000000000 +0100
@@ -1,0 +2,21 @@
+Mon Feb 22 16:16:03 UTC 2016 - hrvoje.sen...@gmail.com
+
+- Add and enable use-setFallbackSessionManagementEnabled-API-with-5.5.1.patch
+  on 42.1 Leap only, for now (kde#354724, boo#955280)
+
+-------------------------------------------------------------------
+Wed Feb 17 22:07:24 UTC 2016 - hrvoje.sen...@gmail.com
+
+- Added fix-session-saving.patch (kde#354724, boo#955280)
+
+-------------------------------------------------------------------
+Sat Feb  6 18:08:39 UTC 2016 - hrvoje.sen...@gmail.com
+
+- Update to 5.19.0 (boo#967668)
+  * Add option to disable KGlobalAccel at compilation time
+  * Repair path to app shortcut scheme
+  * Fix listing of shortcut files (wrong QDir usage)
+  * For more details please see:
+    https://www.kde.org/announcements/kde-frameworks-5.19.0.php
+
+-------------------------------------------------------------------

Old:
----
  kxmlgui-5.18.0.tar.xz

New:
----
  fix-session-saving.patch
  kxmlgui-5.19.0.tar.xz
  use-setFallbackSessionManagementEnabled-API-with-5.5.1.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kxmlgui.spec ++++++
--- /var/tmp/diff_new_pack.pR4vwB/_old  2016-02-24 18:57:38.000000000 +0100
+++ /var/tmp/diff_new_pack.pR4vwB/_new  2016-02-24 18:57:38.000000000 +0100
@@ -18,9 +18,9 @@
 
 %bcond_without lang
 %define lname   libKF5XmlGui5
-%define _tar_path 5.18
+%define _tar_path 5.19
 Name:           kxmlgui
-Version:        5.18.0
+Version:        5.19.0
 Release:        0
 %define kf5_version %{version}
 BuildRequires:  attica-qt5-devel >= %{_tar_path}
@@ -52,6 +52,11 @@
 Url:            http://www.kde.org
 Source:         
http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
 Source1:        baselibs.conf
+# PATCH-FIX-UPSTREAM fix-session-saving.patch -- kde#354724, boo#955280
+Patch0:         fix-session-saving.patch
+# PATCH-FIX-UPSTREAM 
use-setFallbackSessionManagementEnabled-API-with-5.5.1.patch -- We can enable 
usage of setFallbackSessionManagementEnabled function
+# with Qt 5.5.1, as we have the qtbase patch backported. For now only apppy 
patch on 42.1 Leap, as TW doesn't have that patch yet -- #354724, boo#955280
+Patch1:         use-setFallbackSessionManagementEnabled-API-with-5.5.1.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -94,6 +99,10 @@
 %lang_package -n %lname
 %prep
 %setup -q
+%patch0 -p1
+%if 0%{?suse_version} == 1315 && 0%{?is_opensuse}
+%patch1 -p1
+%endif
 
 %build
   %cmake_kf5 -d build -- -DSYSCONF_INSTALL_DIR=%{_kf5_sysconfdir}

++++++ fix-session-saving.patch ++++++
>From f7cbcc77722256db084d3b0ab6ce76173e959f0e Mon Sep 17 00:00:00 2001
From: Andreas Hartmetz <ahartm...@gmail.com>
Date: Fri, 19 Feb 2016 19:37:36 +0100
Subject: [PATCH 1/1] Fix session management broken since KF5 / Qt5.

Requires Qt 5.6 branch not more than a few days old, or >= 5.6.0
when it is released.
Parts of the fix are:
- Call QGuiApplication::setFallbackSessionManagementEnabled(false)
  to prevent application suicide through a mechanism that tries to
  help applications without any proper session management support,
  but badly interferes with applications that do implement proper
  session management, such as KDE applications.
- Add back commitData[Request] handling. For some reason it was
  removed during porting.
- Change the returned types of saveState() and commitData() to void.
  The return values were unused.

BUG: 354724
---
 src/kmainwindow.cpp | 44 +++++++++++++++++++++++++++++++++++++++++---
 src/kmainwindow_p.h |  3 ++-
 2 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/src/kmainwindow.cpp b/src/kmainwindow.cpp
index cae655d..c384b67 100644
--- a/src/kmainwindow.cpp
+++ b/src/kmainwindow.cpp
@@ -121,13 +121,15 @@ KMWSessionManager::KMWSessionManager()
 {
     connect(qApp, SIGNAL(saveStateRequest(QSessionManager&)),
             this, SLOT(saveState(QSessionManager&)));
+    connect(qApp, SIGNAL(commitDataRequest(QSessionManager&)),
+            this, SLOT(commitData(QSessionManager&)));
 }
 
 KMWSessionManager::~KMWSessionManager()
 {
 }
 
-bool KMWSessionManager::saveState(QSessionManager &sm)
+void KMWSessionManager::saveState(QSessionManager &sm)
 {
     KConfigGui::setSessionConfig(sm.sessionId(), sm.sessionKey());
 
@@ -158,8 +160,42 @@ bool KMWSessionManager::saveState(QSessionManager &sm)
         discard << localFilePath;
         sm.setDiscardCommand(discard);
     }
+}
 
-    return true;
+void KMWSessionManager::commitData(QSessionManager &sm)
+{
+    if (!sm.allowsInteraction()) {
+        return;
+    }
+
+    /*
+       Purpose of this exercise: invoke queryClose() without actually closing 
the
+       windows, because
+       - queryClose() may contain session management code, so it must be 
invoked
+       - actually closing windows may quit the application - cf.
+         QGuiApplication::quitOnLastWindowClosed()
+       - quitting the application and thus closing the session manager 
connection
+         violates the X11 XSMP protocol.
+         The exact requirement of XSMP that would be broken is,
+         in the description of the client's state machine:
+
+           save-yourself-done: (changing state is forbidden)
+
+         Closing the session manager connection causes a state change.
+         Worst of all, that is a real problem with ksmserver - it will not save
+         applications that quit on their own in state save-yourself-done.
+     */
+    foreach (KMainWindow *window, KMainWindow::memberList()) {
+        if (window->testAttribute(Qt::WA_WState_Hidden)) {
+            continue;
+        }
+        QCloseEvent e;
+        QApplication::sendEvent(window, &e);
+        if (!e.isAccepted()) {
+            sm.cancel();
+            return;
+        }
+    }
 }
 
 Q_GLOBAL_STATIC(KMWSessionManager, ksm)
@@ -180,7 +216,9 @@ KMainWindow::KMainWindow(KMainWindowPrivate &dd, QWidget 
*parent, Qt::WindowFlag
 void KMainWindowPrivate::init(KMainWindow *_q)
 {
     q = _q;
-
+#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
+    QGuiApplication::setFallbackSessionManagementEnabled(false);
+#endif
     q->setAnimated(q->style()->styleHint(QStyle::SH_Widget_Animate, 0, q));
 
     q->setAttribute(Qt::WA_DeleteOnClose);
diff --git a/src/kmainwindow_p.h b/src/kmainwindow_p.h
index 8204ce1..910680d 100644
--- a/src/kmainwindow_p.h
+++ b/src/kmainwindow_p.h
@@ -81,7 +81,8 @@ public:
     ~KMWSessionManager();
 
 private Q_SLOTS:
-    bool saveState(QSessionManager &);
+    void saveState(QSessionManager &);
+    void commitData(QSessionManager &);
 };
 
 #endif
-- 
2.6.2

++++++ kxmlgui-5.18.0.tar.xz -> kxmlgui-5.19.0.tar.xz ++++++
++++ 25393 lines of diff (skipped)

++++++ use-setFallbackSessionManagementEnabled-API-with-5.5.1.patch ++++++
diff --git a/src/kmainwindow.cpp b/src/kmainwindow.cpp
index c384b67..b8fd216 100644
--- a/src/kmainwindow.cpp
+++ b/src/kmainwindow.cpp
@@ -216,7 +216,7 @@ KMainWindow::KMainWindow(KMainWindowPrivate &dd, QWidget 
*parent, Qt::WindowFlag
 void KMainWindowPrivate::init(KMainWindow *_q)
 {
     q = _q;
-#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
+#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 1)
     QGuiApplication::setFallbackSessionManagementEnabled(false);
 #endif
     q->setAnimated(q->style()->styleHint(QStyle::SH_Widget_Animate, 0, q));

Reply via email to