From 5be7e75113b061d910fae55729c1b239095bdbe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Thu, 31 Mar 2016 20:59:24 +0200 Subject: [PATCH 1/5] fix kwallet --- keychain_unix.cpp | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/keychain_unix.cpp b/keychain_unix.cpp index e83f33f..8f44098 100644 --- a/keychain_unix.cpp +++ b/keychain_unix.cpp @@ -326,18 +326,18 @@ void ReadPasswordJobPrivate::kwalletEntryTypeFinished( QDBusPendingCallWatcher* ? QDBusPendingCall( iface->readPassword( walletHandle, q->service(), key, q->service() ) ) : QDBusPendingCall( iface->readEntry( walletHandle, q->service(), key, q->service() ) ); QDBusPendingCallWatcher* nextWatcher = new QDBusPendingCallWatcher( nextReply, this ); - connect( nextWatcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(kwalletReadFinished(QDBusPendingCallWatcher*)) ); + connect( nextWatcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(kwalletFinished(QDBusPendingCallWatcher*)) ); } void ReadPasswordJobPrivate::kwalletFinished( QDBusPendingCallWatcher* watcher ) { if ( !watcher->isError() ) { - if ( mode == Binary ) { - QDBusPendingReply reply = *watcher; - data = reply.value(); - } else { - QDBusPendingReply reply = *watcher; - data = reply.value().toUtf8(); - } + if ( mode == Binary ) { + QDBusPendingReply reply = *watcher; + data = reply.value(); + } else { + QDBusPendingReply reply = *watcher; + data = reply.value().toUtf8(); + } } JobPrivate::kwalletFinished(watcher); @@ -461,17 +461,18 @@ void JobPrivate::kwalletOpenFinished( QDBusPendingCallWatcher* watcher ) { nextReply = iface->removeEntry( handle, q->service(), key, q->service() ); QDBusPendingCallWatcher* nextWatcher = new QDBusPendingCallWatcher( nextReply, this ); - connect( nextWatcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(kwalletWriteFinished(QDBusPendingCallWatcher*)) ); + connect( nextWatcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(kwalletFinished(QDBusPendingCallWatcher*)) ); } void JobPrivate::kwalletFinished( QDBusPendingCallWatcher* watcher ) { - watcher->deleteLater(); - QDBusPendingReply reply = *watcher; - if ( reply.isError() ) { - const QDBusError err = reply.error(); - q->emitFinishedWithError( OtherError, tr("Could not open wallet: %1; %2") - .arg( QDBusError::errorString( err.type() ), err.message() ) ); - return; + if ( !watcher->isError() ) { + if ( mode == Binary ) { + QDBusPendingReply reply = *watcher; + data = reply.value(); + } else { + QDBusPendingReply reply = *watcher; + data = reply.value().toUtf8(); + } } q->emitFinished(); From b0a8c18729ce1456e87e10d55f529ef7ca68dab7 Mon Sep 17 00:00:00 2001 From: Frank Osterfeld Date: Thu, 31 Mar 2016 13:26:48 -0700 Subject: [PATCH 2/5] Bump version to 0.6.1 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1f92c0..3e34ed8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ project(qtkeychain) ### -set(QTKEYCHAIN_VERSION 0.6.0) +set(QTKEYCHAIN_VERSION 0.6.1) set(QTKEYCHAIN_SOVERSION 0) ### From 7ccc348b7bdca7ef9fbc8704339e9295508a8638 Mon Sep 17 00:00:00 2001 From: Frank Osterfeld Date: Thu, 31 Mar 2016 13:28:18 -0700 Subject: [PATCH 3/5] Update Changelog --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index f2b689f..a5da226 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ ChangeLog ========= +version 0.6.1 (release 2016-03-31) + * Fix KWallet not working (regressions in 0.6.0) + version 0.6.0 (release 2016-03-18) * Added support for the Windows Credential Store From 6d361e673ab36dd2f8bd9a3f3135ae46aa44b46b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Fri, 1 Apr 2016 17:50:57 +0200 Subject: [PATCH 4/5] kwallet: check is reply is valid --- keychain_unix.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/keychain_unix.cpp b/keychain_unix.cpp index 8f44098..ae926e8 100644 --- a/keychain_unix.cpp +++ b/keychain_unix.cpp @@ -333,10 +333,14 @@ void ReadPasswordJobPrivate::kwalletFinished( QDBusPendingCallWatcher* watcher ) if ( !watcher->isError() ) { if ( mode == Binary ) { QDBusPendingReply reply = *watcher; - data = reply.value(); + if (reply.isValid()) { + data = reply.value(); + } } else { QDBusPendingReply reply = *watcher; - data = reply.value().toUtf8(); + if (reply.isValid()) { + data = reply.value().toUtf8(); + } } } @@ -468,10 +472,14 @@ void JobPrivate::kwalletFinished( QDBusPendingCallWatcher* watcher ) { if ( !watcher->isError() ) { if ( mode == Binary ) { QDBusPendingReply reply = *watcher; - data = reply.value(); + if (reply.isValid()) { + data = reply.value(); + } } else { QDBusPendingReply reply = *watcher; - data = reply.value().toUtf8(); + if (reply.isValid()) { + data = reply.value().toUtf8(); + } } } From 75e7f148f4435f50f74eca45c6b22fa50cb1499a Mon Sep 17 00:00:00 2001 From: Frank Osterfeld Date: Mon, 4 Apr 2016 17:52:41 +0100 Subject: [PATCH 5/5] Update version and changelog for 0.6.2 --- CMakeLists.txt | 2 +- ChangeLog | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e34ed8..d04a9b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ project(qtkeychain) ### -set(QTKEYCHAIN_VERSION 0.6.1) +set(QTKEYCHAIN_VERSION 0.6.2) set(QTKEYCHAIN_SOVERSION 0) ### diff --git a/ChangeLog b/ChangeLog index a5da226..c040c44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ ChangeLog ========= +version 0.6.2 (release 2016-04-04) + * KWallet: Fixes a crash when storing passwords, seen on Debian/KDE4 + version 0.6.1 (release 2016-03-31) * Fix KWallet not working (regressions in 0.6.0)