Date: Saturday, May 16, 2015 @ 09:40:28 Author: arojas Revision: 239436
archrelease: copy trunk to extra-i686, extra-x86_64 Added: kconfig/repos/extra-i686/PKGBUILD (from rev 239435, kconfig/trunk/PKGBUILD) kconfig/repos/extra-i686/session-restore.patch (from rev 239435, kconfig/trunk/session-restore.patch) kconfig/repos/extra-x86_64/PKGBUILD (from rev 239435, kconfig/trunk/PKGBUILD) kconfig/repos/extra-x86_64/session-restore.patch (from rev 239435, kconfig/trunk/session-restore.patch) Deleted: kconfig/repos/extra-i686/PKGBUILD kconfig/repos/extra-x86_64/PKGBUILD ------------------------------------+ /PKGBUILD | 86 +++++++++++++++++++++++ extra-i686/PKGBUILD | 37 ---------- extra-i686/session-restore.patch | 127 +++++++++++++++++++++++++++++++++++ extra-x86_64/PKGBUILD | 37 ---------- extra-x86_64/session-restore.patch | 127 +++++++++++++++++++++++++++++++++++ 5 files changed, 340 insertions(+), 74 deletions(-) Deleted: extra-i686/PKGBUILD =================================================================== --- extra-i686/PKGBUILD 2015-05-16 07:38:58 UTC (rev 239435) +++ extra-i686/PKGBUILD 2015-05-16 07:40:28 UTC (rev 239436) @@ -1,37 +0,0 @@ -# $Id$ -# Maintainer: Felix Yan <felixonm...@archlinux.org> -# Contributor: Andrea Scarpino <and...@archlinux.org> - -pkgname=kconfig -pkgver=5.10.0 -pkgrel=1 -pkgdesc='Configuration system' -arch=('i686' 'x86_64') -url='https://projects.kde.org/projects/frameworks/kconfig' -license=('LGPL') -depends=('qt5-base') -makedepends=('extra-cmake-modules' 'qt5-tools') -groups=('kf5') -source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz") -md5sums=('0c762fbe3b98fede3e8a7af3e18e71bb') - -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: kconfig/repos/extra-i686/PKGBUILD (from rev 239435, kconfig/trunk/PKGBUILD) =================================================================== --- extra-i686/PKGBUILD (rev 0) +++ extra-i686/PKGBUILD 2015-05-16 07:40:28 UTC (rev 239436) @@ -0,0 +1,43 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Andrea Scarpino <and...@archlinux.org> + +pkgname=kconfig +pkgver=5.10.0 +pkgrel=2 +pkgdesc='Configuration system' +arch=('i686' 'x86_64') +url='https://projects.kde.org/projects/frameworks/kconfig' +license=('LGPL') +depends=('qt5-base') +makedepends=('extra-cmake-modules' 'qt5-tools') +groups=('kf5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz" +'session-restore.patch') +md5sums=('0c762fbe3b98fede3e8a7af3e18e71bb' + 'c10f5b9293bb2736d3f7f411005dd60a') + +prepare() { + mkdir -p build + +# Fix session restore 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: kconfig/repos/extra-i686/session-restore.patch (from rev 239435, kconfig/trunk/session-restore.patch) =================================================================== --- extra-i686/session-restore.patch (rev 0) +++ extra-i686/session-restore.patch 2015-05-16 07:40:28 UTC (rev 239436) @@ -0,0 +1,127 @@ +From 9978cfd5ccd18509dd514b3a7ada8c158c209de1 Mon Sep 17 00:00:00 2001 +From: Stefan Becker <chemob...@gmail.com> +Date: Sat, 9 May 2015 17:16:27 +0300 +Subject: [PATCH 1/3] Add KConfigGui::setSessionConfig() + +When the application receives a saveState signal it needs to replace the +current KConfig object with a new one based on the QSessionManager +information. Add a new interface that accepts the new session id and key. + +BUG: 346768 +REVIEW: 123705 +--- + src/gui/kconfiggui.cpp | 41 ++++++++++++++++++++++++++++++++--------- + src/gui/kconfiggui.h | 17 +++++++++++++++-- + 2 files changed, 47 insertions(+), 11 deletions(-) + +diff --git a/src/gui/kconfiggui.cpp b/src/gui/kconfiggui.cpp +index 0048c60..67b6009 100644 +--- a/src/gui/kconfiggui.cpp ++++ b/src/gui/kconfiggui.cpp +@@ -25,28 +25,51 @@ + + #include <kconfig.h> + ++static QString configName(const QString &id, const QString &key) ++{ ++ return(QLatin1String("session/") + QGuiApplication::applicationName() + ++ QLatin1Char('_') + id + ++ QLatin1Char('_') + key); ++} ++ + static KConfig *s_sessionConfig = Q_NULLPTR; + + KConfig *KConfigGui::sessionConfig() + { +- if (!s_sessionConfig) { // create an instance specific config object +- s_sessionConfig = new KConfig(sessionConfigName(), KConfig::SimpleConfig); ++#ifdef QT_NO_SESSIONMANAGER ++#error QT_NO_SESSIONMANAGER was set, this will not compile. Reconfigure Qt with Session management support. ++#endif ++ if (!hasSessionConfig()) { ++ // create the default instance specific config object ++ // from applications' -session command line parameter ++ s_sessionConfig = new KConfig(configName(qApp->sessionId(), ++ qApp->sessionKey()), ++ KConfig::SimpleConfig); + } ++ + return s_sessionConfig; + } + ++void KConfigGui::setSessionConfig(const QString &id, const QString &key) ++{ ++ if (hasSessionConfig()) { ++ delete s_sessionConfig; ++ s_sessionConfig = Q_NULLPTR; ++ } ++ ++ // create a new instance specific config object from supplied id & key ++ s_sessionConfig = new KConfig(configName(id, key), ++ KConfig::SimpleConfig); ++} ++ + bool KConfigGui::hasSessionConfig() + { + return s_sessionConfig != Q_NULLPTR; + } + ++#ifndef KDE_NO_DEPRECATED + QString KConfigGui::sessionConfigName() + { +-#ifdef QT_NO_SESSIONMANAGER +-#error QT_NO_SESSIONMANAGER was set, this will not compile. Reconfigure Qt with Session management support. +-#endif +- const QString sessionKey = qApp->sessionKey(); +- const QString sessionId = qApp->sessionId(); +- return QString(QLatin1String("session/%1_%2_%3")).arg(QGuiApplication::applicationName()).arg(sessionId).arg(sessionKey); ++ return sessionConfig()->name(); + } +- ++#endif +diff --git a/src/gui/kconfiggui.h b/src/gui/kconfiggui.h +index 173400f..fe1f820 100644 +--- a/src/gui/kconfiggui.h ++++ b/src/gui/kconfiggui.h +@@ -31,7 +31,7 @@ class KConfig; + namespace KConfigGui + { + /** +- * Returns the application session config object. ++ * Returns the current application session config object. + * + * @return A pointer to the application's instance specific + * KConfig object. +@@ -40,6 +40,16 @@ namespace KConfigGui + KCONFIGGUI_EXPORT KConfig *sessionConfig(); + + /** ++ * Replaces the current application session config object. ++ * ++ * @param id new session id ++ * @param key new session key ++ * ++ * @since 5.11 ++ */ ++KCONFIGGUI_EXPORT void setSessionConfig(const QString &id, const QString &key); ++ ++/** + * Indicates if a session config has been created for that application + * (ie. if sessionConfig() got called at least once) + * +@@ -51,8 +61,11 @@ KCONFIGGUI_EXPORT bool hasSessionConfig(); + * Returns the name of the application session + * + * @return the application session name ++ * @deprecated since 5.11, use sessionConfig()->name() + */ +-KCONFIGGUI_EXPORT QString sessionConfigName(); ++#ifndef KDE_NO_DEPRECATED ++KCONFIGGUI_DEPRECATED QString sessionConfigName(); ++#endif + } + + #endif // KCONFIGGUI_H +-- +2.4.1 + Deleted: extra-x86_64/PKGBUILD =================================================================== --- extra-x86_64/PKGBUILD 2015-05-16 07:38:58 UTC (rev 239435) +++ extra-x86_64/PKGBUILD 2015-05-16 07:40:28 UTC (rev 239436) @@ -1,37 +0,0 @@ -# $Id$ -# Maintainer: Felix Yan <felixonm...@archlinux.org> -# Contributor: Andrea Scarpino <and...@archlinux.org> - -pkgname=kconfig -pkgver=5.10.0 -pkgrel=1 -pkgdesc='Configuration system' -arch=('i686' 'x86_64') -url='https://projects.kde.org/projects/frameworks/kconfig' -license=('LGPL') -depends=('qt5-base') -makedepends=('extra-cmake-modules' 'qt5-tools') -groups=('kf5') -source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz") -md5sums=('0c762fbe3b98fede3e8a7af3e18e71bb') - -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: kconfig/repos/extra-x86_64/PKGBUILD (from rev 239435, kconfig/trunk/PKGBUILD) =================================================================== --- extra-x86_64/PKGBUILD (rev 0) +++ extra-x86_64/PKGBUILD 2015-05-16 07:40:28 UTC (rev 239436) @@ -0,0 +1,43 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Andrea Scarpino <and...@archlinux.org> + +pkgname=kconfig +pkgver=5.10.0 +pkgrel=2 +pkgdesc='Configuration system' +arch=('i686' 'x86_64') +url='https://projects.kde.org/projects/frameworks/kconfig' +license=('LGPL') +depends=('qt5-base') +makedepends=('extra-cmake-modules' 'qt5-tools') +groups=('kf5') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz" +'session-restore.patch') +md5sums=('0c762fbe3b98fede3e8a7af3e18e71bb' + 'c10f5b9293bb2736d3f7f411005dd60a') + +prepare() { + mkdir -p build + +# Fix session restore 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: kconfig/repos/extra-x86_64/session-restore.patch (from rev 239435, kconfig/trunk/session-restore.patch) =================================================================== --- extra-x86_64/session-restore.patch (rev 0) +++ extra-x86_64/session-restore.patch 2015-05-16 07:40:28 UTC (rev 239436) @@ -0,0 +1,127 @@ +From 9978cfd5ccd18509dd514b3a7ada8c158c209de1 Mon Sep 17 00:00:00 2001 +From: Stefan Becker <chemob...@gmail.com> +Date: Sat, 9 May 2015 17:16:27 +0300 +Subject: [PATCH 1/3] Add KConfigGui::setSessionConfig() + +When the application receives a saveState signal it needs to replace the +current KConfig object with a new one based on the QSessionManager +information. Add a new interface that accepts the new session id and key. + +BUG: 346768 +REVIEW: 123705 +--- + src/gui/kconfiggui.cpp | 41 ++++++++++++++++++++++++++++++++--------- + src/gui/kconfiggui.h | 17 +++++++++++++++-- + 2 files changed, 47 insertions(+), 11 deletions(-) + +diff --git a/src/gui/kconfiggui.cpp b/src/gui/kconfiggui.cpp +index 0048c60..67b6009 100644 +--- a/src/gui/kconfiggui.cpp ++++ b/src/gui/kconfiggui.cpp +@@ -25,28 +25,51 @@ + + #include <kconfig.h> + ++static QString configName(const QString &id, const QString &key) ++{ ++ return(QLatin1String("session/") + QGuiApplication::applicationName() + ++ QLatin1Char('_') + id + ++ QLatin1Char('_') + key); ++} ++ + static KConfig *s_sessionConfig = Q_NULLPTR; + + KConfig *KConfigGui::sessionConfig() + { +- if (!s_sessionConfig) { // create an instance specific config object +- s_sessionConfig = new KConfig(sessionConfigName(), KConfig::SimpleConfig); ++#ifdef QT_NO_SESSIONMANAGER ++#error QT_NO_SESSIONMANAGER was set, this will not compile. Reconfigure Qt with Session management support. ++#endif ++ if (!hasSessionConfig()) { ++ // create the default instance specific config object ++ // from applications' -session command line parameter ++ s_sessionConfig = new KConfig(configName(qApp->sessionId(), ++ qApp->sessionKey()), ++ KConfig::SimpleConfig); + } ++ + return s_sessionConfig; + } + ++void KConfigGui::setSessionConfig(const QString &id, const QString &key) ++{ ++ if (hasSessionConfig()) { ++ delete s_sessionConfig; ++ s_sessionConfig = Q_NULLPTR; ++ } ++ ++ // create a new instance specific config object from supplied id & key ++ s_sessionConfig = new KConfig(configName(id, key), ++ KConfig::SimpleConfig); ++} ++ + bool KConfigGui::hasSessionConfig() + { + return s_sessionConfig != Q_NULLPTR; + } + ++#ifndef KDE_NO_DEPRECATED + QString KConfigGui::sessionConfigName() + { +-#ifdef QT_NO_SESSIONMANAGER +-#error QT_NO_SESSIONMANAGER was set, this will not compile. Reconfigure Qt with Session management support. +-#endif +- const QString sessionKey = qApp->sessionKey(); +- const QString sessionId = qApp->sessionId(); +- return QString(QLatin1String("session/%1_%2_%3")).arg(QGuiApplication::applicationName()).arg(sessionId).arg(sessionKey); ++ return sessionConfig()->name(); + } +- ++#endif +diff --git a/src/gui/kconfiggui.h b/src/gui/kconfiggui.h +index 173400f..fe1f820 100644 +--- a/src/gui/kconfiggui.h ++++ b/src/gui/kconfiggui.h +@@ -31,7 +31,7 @@ class KConfig; + namespace KConfigGui + { + /** +- * Returns the application session config object. ++ * Returns the current application session config object. + * + * @return A pointer to the application's instance specific + * KConfig object. +@@ -40,6 +40,16 @@ namespace KConfigGui + KCONFIGGUI_EXPORT KConfig *sessionConfig(); + + /** ++ * Replaces the current application session config object. ++ * ++ * @param id new session id ++ * @param key new session key ++ * ++ * @since 5.11 ++ */ ++KCONFIGGUI_EXPORT void setSessionConfig(const QString &id, const QString &key); ++ ++/** + * Indicates if a session config has been created for that application + * (ie. if sessionConfig() got called at least once) + * +@@ -51,8 +61,11 @@ KCONFIGGUI_EXPORT bool hasSessionConfig(); + * Returns the name of the application session + * + * @return the application session name ++ * @deprecated since 5.11, use sessionConfig()->name() + */ +-KCONFIGGUI_EXPORT QString sessionConfigName(); ++#ifndef KDE_NO_DEPRECATED ++KCONFIGGUI_DEPRECATED QString sessionConfigName(); ++#endif + } + + #endif // KCONFIGGUI_H +-- +2.4.1 +