[arch-commits] Commit in kxmlgui/repos (6 files)

Antonio Rojas arojas at archlinux.org
Sat May 16 07:48:39 UTC 2015


    Date: Saturday, May 16, 2015 @ 09:48:39
  Author: arojas
Revision: 239438

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  kxmlgui/repos/extra-i686/PKGBUILD
    (from rev 239437, kxmlgui/trunk/PKGBUILD)
  kxmlgui/repos/extra-i686/session-restore.patch
    (from rev 239437, kxmlgui/trunk/session-restore.patch)
  kxmlgui/repos/extra-x86_64/PKGBUILD
    (from rev 239437, kxmlgui/trunk/PKGBUILD)
  kxmlgui/repos/extra-x86_64/session-restore.patch
    (from rev 239437, kxmlgui/trunk/session-restore.patch)
Deleted:
  kxmlgui/repos/extra-i686/PKGBUILD
  kxmlgui/repos/extra-x86_64/PKGBUILD

------------------------------------+
 /PKGBUILD                          |   86 +++++++++++++++++++++++++++++++++++
 extra-i686/PKGBUILD                |   37 ---------------
 extra-i686/session-restore.patch   |   54 +++++++++++++++++++++
 extra-x86_64/PKGBUILD              |   37 ---------------
 extra-x86_64/session-restore.patch |   54 +++++++++++++++++++++
 5 files changed, 194 insertions(+), 74 deletions(-)

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2015-05-16 07:47:08 UTC (rev 239437)
+++ extra-i686/PKGBUILD	2015-05-16 07:48:39 UTC (rev 239438)
@@ -1,37 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Andrea Scarpino <andrea at archlinux.org>
-
-pkgname=kxmlgui
-pkgver=5.10.0
-pkgrel=1
-pkgdesc='User configurable main windows'
-arch=('i686' 'x86_64')
-url='https://projects.kde.org/projects/frameworks/kxmlgui'
-license=('LGPL')
-depends=('kglobalaccel' 'ktextwidgets' 'attica-qt5')
-makedepends=('extra-cmake-modules' 'python')
-groups=('kf5')
-source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz")
-md5sums=('35b8161e519fc6a2a466330a9f24c05f')
-
-prepare() {
-  mkdir -p build
-}
-
-build() {
-  cd build
-  cmake ../${pkgname}-${pkgver} \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_INSTALL_DIR=lib \
-    -DLIBEXEC_INSTALL_DIR=lib \
-    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-    -DBUILD_TESTING=OFF
-  make
-}
-
-package() {
-  cd build
-  make DESTDIR="${pkgdir}" install
-}

Copied: kxmlgui/repos/extra-i686/PKGBUILD (from rev 239437, kxmlgui/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD	                        (rev 0)
+++ extra-i686/PKGBUILD	2015-05-16 07:48:39 UTC (rev 239438)
@@ -0,0 +1,43 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+
+pkgname=kxmlgui
+pkgver=5.10.0
+pkgrel=2
+pkgdesc='User configurable main windows'
+arch=('i686' 'x86_64')
+url='https://projects.kde.org/projects/frameworks/kxmlgui'
+license=('LGPL')
+depends=('kglobalaccel' 'ktextwidgets' 'attica-qt5')
+makedepends=('extra-cmake-modules' 'python')
+groups=('kf5')
+source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz" 
+'session-restore.patch')
+md5sums=('35b8161e519fc6a2a466330a9f24c05f'
+         '4dc0c7ec892840d27cacb99085219991')
+
+prepare() {
+  mkdir -p build
+
+# Fix session restore for KF5 applications https://bugs.kde.org/show_bug.cgi?id=346768
+  cd $pkgname-$pkgver
+  patch -p1 -i "$srcdir"/session-restore.patch
+}
+
+build() {
+  cd build
+  cmake ../${pkgname}-${pkgver} \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DLIB_INSTALL_DIR=lib \
+    -DLIBEXEC_INSTALL_DIR=lib \
+    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+    -DBUILD_TESTING=OFF
+  make
+}
+
+package() {
+  cd build
+  make DESTDIR="${pkgdir}" install
+}

Copied: kxmlgui/repos/extra-i686/session-restore.patch (from rev 239437, kxmlgui/trunk/session-restore.patch)
===================================================================
--- extra-i686/session-restore.patch	                        (rev 0)
+++ extra-i686/session-restore.patch	2015-05-16 07:48:39 UTC (rev 239438)
@@ -0,0 +1,54 @@
+From: Stefan Becker <chemobejk at gmail.com>
+Date: Sat, 09 May 2015 14:17:25 +0000
+Subject: Add session management for KMainWindow
+X-Git-Url: http://quickgit.kde.org/?p=kxmlgui.git&a=commitdiff&h=fa86f6e4afd4a4f32d297f271d3daececc6c0ba4
+---
+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
+---
+
+
+--- a/src/kmainwindow.cpp
++++ b/src/kmainwindow.cpp
+@@ -127,8 +127,10 @@
+ {
+ }
+ 
+-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 at cs.tu-berlin.de>, this
+@@ -144,6 +146,19 @@
+ 
+     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;
+ }
+ 
+

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2015-05-16 07:47:08 UTC (rev 239437)
+++ extra-x86_64/PKGBUILD	2015-05-16 07:48:39 UTC (rev 239438)
@@ -1,37 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Andrea Scarpino <andrea at archlinux.org>
-
-pkgname=kxmlgui
-pkgver=5.10.0
-pkgrel=1
-pkgdesc='User configurable main windows'
-arch=('i686' 'x86_64')
-url='https://projects.kde.org/projects/frameworks/kxmlgui'
-license=('LGPL')
-depends=('kglobalaccel' 'ktextwidgets' 'attica-qt5')
-makedepends=('extra-cmake-modules' 'python')
-groups=('kf5')
-source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz")
-md5sums=('35b8161e519fc6a2a466330a9f24c05f')
-
-prepare() {
-  mkdir -p build
-}
-
-build() {
-  cd build
-  cmake ../${pkgname}-${pkgver} \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_INSTALL_DIR=lib \
-    -DLIBEXEC_INSTALL_DIR=lib \
-    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-    -DBUILD_TESTING=OFF
-  make
-}
-
-package() {
-  cd build
-  make DESTDIR="${pkgdir}" install
-}

Copied: kxmlgui/repos/extra-x86_64/PKGBUILD (from rev 239437, kxmlgui/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2015-05-16 07:48:39 UTC (rev 239438)
@@ -0,0 +1,43 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+
+pkgname=kxmlgui
+pkgver=5.10.0
+pkgrel=2
+pkgdesc='User configurable main windows'
+arch=('i686' 'x86_64')
+url='https://projects.kde.org/projects/frameworks/kxmlgui'
+license=('LGPL')
+depends=('kglobalaccel' 'ktextwidgets' 'attica-qt5')
+makedepends=('extra-cmake-modules' 'python')
+groups=('kf5')
+source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz" 
+'session-restore.patch')
+md5sums=('35b8161e519fc6a2a466330a9f24c05f'
+         '4dc0c7ec892840d27cacb99085219991')
+
+prepare() {
+  mkdir -p build
+
+# Fix session restore for KF5 applications https://bugs.kde.org/show_bug.cgi?id=346768
+  cd $pkgname-$pkgver
+  patch -p1 -i "$srcdir"/session-restore.patch
+}
+
+build() {
+  cd build
+  cmake ../${pkgname}-${pkgver} \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DLIB_INSTALL_DIR=lib \
+    -DLIBEXEC_INSTALL_DIR=lib \
+    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+    -DBUILD_TESTING=OFF
+  make
+}
+
+package() {
+  cd build
+  make DESTDIR="${pkgdir}" install
+}

Copied: kxmlgui/repos/extra-x86_64/session-restore.patch (from rev 239437, kxmlgui/trunk/session-restore.patch)
===================================================================
--- extra-x86_64/session-restore.patch	                        (rev 0)
+++ extra-x86_64/session-restore.patch	2015-05-16 07:48:39 UTC (rev 239438)
@@ -0,0 +1,54 @@
+From: Stefan Becker <chemobejk at gmail.com>
+Date: Sat, 09 May 2015 14:17:25 +0000
+Subject: Add session management for KMainWindow
+X-Git-Url: http://quickgit.kde.org/?p=kxmlgui.git&a=commitdiff&h=fa86f6e4afd4a4f32d297f271d3daececc6c0ba4
+---
+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
+---
+
+
+--- a/src/kmainwindow.cpp
++++ b/src/kmainwindow.cpp
+@@ -127,8 +127,10 @@
+ {
+ }
+ 
+-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 at cs.tu-berlin.de>, this
+@@ -144,6 +146,19 @@
+ 
+     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;
+ }
+ 
+



More information about the arch-commits mailing list