Accepting request 311907 from KDE:Frameworks5

Update to 5.11

OBS-URL: https://build.opensuse.org/request/show/311907
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kxmlgui?expand=0&rev=19
This commit is contained in:
Dominique Leuenberger 2015-06-23 10:12:31 +00:00 committed by Git OBS Bridge
commit 0f230b5d4d
5 changed files with 14 additions and 64 deletions

View File

@ -1,56 +0,0 @@
From fa86f6e4afd4a4f32d297f271d3daececc6c0ba4 Mon Sep 17 00:00:00 2001
From: Stefan Becker <chemobejk@gmail.com>
Date: Sat, 9 May 2015 17:17:25 +0300
Subject: [PATCH 1/1] Add session management for KMainWindow
- replace the KConfig object in KConfigGui with a new one using the
session id and key from the QSessionManager object
- make sure that the data is stored after the application has update it
- if the KConfig object is represented by a local file then add a
discard command to the session manager object
BUG: 346768
REVIEW: 123706
---
src/kmainwindow.cpp | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/kmainwindow.cpp b/src/kmainwindow.cpp
index 15eecb7c1b2aae0691db2680b9e8400d6eb715ab..7c868417030f95cf575f04783894c8f62e1b354b 100644
--- a/src/kmainwindow.cpp
+++ b/src/kmainwindow.cpp
@@ -127,8 +127,10 @@ KMWSessionManager::~KMWSessionManager()
{
}
-bool KMWSessionManager::saveState(QSessionManager &)
+bool KMWSessionManager::saveState(QSessionManager &sm)
{
+ KConfigGui::setSessionConfig(sm.sessionId(), sm.sessionKey());
+
KConfig *config = KConfigGui::sessionConfig();
if (KMainWindow::memberList().count()) {
// According to Jochen Wilhelmy <digisnap@cs.tu-berlin.de>, this
@@ -144,6 +146,19 @@ bool KMWSessionManager::saveState(QSessionManager &)
KConfigGroup group(config, "Number");
group.writeEntry("NumberOfWindows", n);
+
+ // store new status to disk
+ config->sync();
+
+ // generate discard command for new file
+ QString localFilePath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1Char('/') + config->name();
+ if (QFile::exists(localFilePath)) {
+ QStringList discard;
+ discard << QLatin1String("rm");
+ discard << localFilePath;
+ sm.setDiscardCommand(discard);
+ }
+
return true;
}
--
2.3.7

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee86d47fa75083fc20dee1050e320118327fc3a42a498be441e28b7653a342d4
size 862484

3
kxmlgui-5.11.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dd6f430e80b954573745177a79c5726426241ceae7b33e07ac678da64c21c4a9
size 862560

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sun Jun 7 19:07:59 UTC 2015 - hrvoje.senjan@gmail.com
- Update to 5.11.0
* Add session management for KMainWindow (kde#346768)
* For more details please see:
https://www.kde.org/announcements/kde-frameworks-5.11.0.php
- Drop 0001-Add-session-management-for-KMainWindow.patch, merged upstream
-------------------------------------------------------------------
Tue May 12 13:19:07 UTC 2015 - hrvoje.senjan@gmail.com

View File

@ -18,9 +18,9 @@
%bcond_without lang
%define lname libKF5XmlGui5
%define _tar_path 5.10
%define _tar_path 5.11
Name: kxmlgui
Version: 5.10.0
Version: 5.11.0
Release: 0
%define kf5_version %{version}
BuildRequires: attica-qt5-devel >= %{_tar_path}
@ -51,8 +51,6 @@ Group: System/GUI/KDE
Url: http://www.kde.org
Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-UPSTREAM 0001-Add-session-management-for-KMainWindow.patch
Patch0: 0001-Add-session-management-for-KMainWindow.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -95,7 +93,6 @@ description for example for integrating actions from plugins. Development files.
%lang_package -n %lname
%prep
%setup -q
%patch0 -p1
%build
%cmake_kf5 -d build -- -DSYSCONF_INSTALL_DIR=%{_kf5_sysconfdir}