[packages/kde4-kdelibs] - rel 3; fixes kwallet access hangs - upstream bug 254198
arekm
arekm at pld-linux.org
Sun Sep 1 23:00:50 CEST 2013
commit 5f3894c51e4ec3ee2a2322d8d50bb18ebee33725
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Sep 1 23:00:46 2013 +0200
- rel 3; fixes kwallet access hangs - upstream bug 254198
kde4-kdelibs.spec | 4 ++-
kdelibs-bug-254198.patch | 83 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 86 insertions(+), 1 deletion(-)
---
diff --git a/kde4-kdelibs.spec b/kde4-kdelibs.spec
index 8f0786e..34f38ea 100644
--- a/kde4-kdelibs.spec
+++ b/kde4-kdelibs.spec
@@ -17,7 +17,7 @@ Summary(ru.UTF-8): K Desktop Environment - Библиотеки
Summary(uk.UTF-8): K Desktop Environment - Бібліотеки
Name: kde4-kdelibs
Version: 4.11.0
-Release: 1
+Release: 3
License: LGPL
Group: X11/Libraries
Source0: ftp://ftp.kde.org/pub/kde/%{_state}/%{version}/src/%{orgname}-%{version}.tar.xz
@@ -30,6 +30,7 @@ Patch2: %{name}-findlzmafix.patch
Patch3: %{name}-aboutPLD.patch
Patch4: %{name}-devicemanager_remove.patch
Patch5: kde4-kdelibs-sync.patch
+Patch6: kdelibs-bug-254198.patch
URL: http://www.kde.org/
BuildRequires: OpenEXR-devel >= 1.2.2
BuildRequires: Qt3Support-devel >= %{qtver}
@@ -242,6 +243,7 @@ KDE.
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
%if "%{pld_release}" == "ti"
sed -i -e 's#PLDLINUX_VERSION#PLD/Titanium#g' kio/kio/kprotocolmanager.cpp
diff --git a/kdelibs-bug-254198.patch b/kdelibs-bug-254198.patch
new file mode 100644
index 0000000..144062a
--- /dev/null
+++ b/kdelibs-bug-254198.patch
@@ -0,0 +1,83 @@
+From: Valentin Rusu <kde at rusu.info>
+Date: Sat, 31 Aug 2013 23:16:28 +0000
+Subject: Fix the synchronous-mode wallet open logic
+X-Git-Url: http://quickgit.kde.org/?p=kdelibs.git&a=commitdiff&h=f8fea3f01c85eb0d6d479647ac27fe431846a1ae
+---
+Fix the synchronous-mode wallet open logic
+
+BUG: 254198
+
+The wallet opening logic, for the synchronous mode, had a nested
+event loops problem, leading to frozen kwalletd. That was because
+kwalletd wasn't using qdbus delayed replies. kdelibs used
+asynchronous open methods even for the synchronous mode, coupled
+with an internal event loop to simulate synchronous mode.
+This commit removes that internal event loop, as the kwalletd now
+blocks on synchronous wallet open requests.
+---
+
+
+--- a/kdeui/util/kwallet.cpp
++++ b/kdeui/util/kwallet.cpp
+@@ -221,7 +221,6 @@
+ QString folder;
+ int handle;
+ int transactionId;
+- QPointer<QEventLoop> loop;
+ };
+
+ #ifdef HAVE_KSECRETSSERVICE
+@@ -477,18 +476,18 @@
+ connect(&walletLauncher->getInterface(), SIGNAL(walletAsyncOpened(int,int)),
+ wallet, SLOT(walletAsyncOpened(int,int)));
+
+- // Use an eventloop for synchronous calls
+- QEventLoop loop;
+- if (ot == Synchronous || ot == Path) {
+- connect(wallet, SIGNAL(walletOpened(bool)), &loop, SLOT(quit()));
+- }
+-
+ // Make sure the password prompt window will be visible and activated
+ KWindowSystem::allowExternalProcessWindowActivation();
+
+ // do the call
+ QDBusReply<int> r;
+- if (ot == Synchronous || ot == Asynchronous) {
++ if (ot == Synchronous) {
++ r = walletLauncher->getInterface().open(name, (qlonglong)w, appid());
++ // after this call, r would contain a transaction id >0 if OK or -1 if NOK
++ // if OK, the slot walletAsyncOpened should have been received, but the transaction id
++ // will not match. We'll get that handle from the reply - see below
++ }
++ else if (ot == Asynchronous) {
+ r = walletLauncher->getInterface().openAsync(name, (qlonglong)w, appid(), true);
+ } else if (ot == Path) {
+ r = walletLauncher->getInterface().openPathAsync(name, (qlonglong)w, appid(), true);
+@@ -510,14 +509,7 @@
+ delete wallet;
+ wallet = 0;
+ } else {
+- // wait for the daemon's reply
+- // store a pointer to the event loop so it can be quit in error case
+- wallet->d->loop = &loop;
+- loop.exec();
+- if (wallet->d->handle < 0) {
+- delete wallet;
+- return 0;
+- }
++ wallet->d->handle = r.value();
+ }
+ } else if (ot == Asynchronous) {
+ if (wallet->d->transactionId < 0) {
+@@ -1517,10 +1509,6 @@
+
+ void Wallet::WalletPrivate::walletServiceUnregistered()
+ {
+- if (loop) {
+- loop->quit();
+- }
+-
+ if (handle >= 0) {
+ q->slotWalletClosed(handle);
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kde4-kdelibs.git/commitdiff/5f3894c51e4ec3ee2a2322d8d50bb18ebee33725
More information about the pld-cvs-commit
mailing list