[Pkg-owncloud-commits] [qtkeychain] 10/16: Fix kdewallet integration
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Sep 3 22:15:55 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository qtkeychain.
commit 5200d184535b2b065214df70ee1b2d45833e3592
Author: Liviu Cristian Mirea Ghiban <contact at liviucmg.com>
Date: Sun Aug 17 18:17:25 2014 +0300
Fix kdewallet integration
---
keychain_p.h | 2 ++
keychain_unix.cpp | 13 +++++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/keychain_p.h b/keychain_p.h
index 8897ba1..c2ad6c9 100644
--- a/keychain_p.h
+++ b/keychain_p.h
@@ -114,10 +114,12 @@ public:
void fallbackOnError(const QDBusError& err);
private Q_SLOTS:
+ void kwalletWalletFound( QDBusPendingCallWatcher* watcher );
void kwalletOpenFinished( QDBusPendingCallWatcher* watcher );
void kwalletWriteFinished( QDBusPendingCallWatcher* watcher );
#else
private Q_SLOTS:
+ void kwalletWalletFound( QDBusPendingCallWatcher* ) {}
void kwalletOpenFinished( QDBusPendingCallWatcher* ) {}
void kwalletWriteFinished( QDBusPendingCallWatcher* ) {}
#endif
diff --git a/keychain_unix.cpp b/keychain_unix.cpp
index ec9d26c..6d08805 100644
--- a/keychain_unix.cpp
+++ b/keychain_unix.cpp
@@ -349,9 +349,9 @@ void WritePasswordJobPrivate::scheduledStart() {
if ( QDBusConnection::sessionBus().isConnected() )
{
iface = new org::kde::KWallet( QLatin1String("org.kde.kwalletd"), QLatin1String("/modules/kwalletd"), QDBusConnection::sessionBus(), this );
- const QDBusPendingReply<int> reply = iface->open( QLatin1String("kdewallet"), 0, q->service() );
+ const QDBusPendingReply<QString> reply = iface->networkWallet();
QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher( reply, this );
- connect( watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(kwalletOpenFinished(QDBusPendingCallWatcher*)) );
+ connect( watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(kwalletWalletFound(QDBusPendingCallWatcher*)) );
}
else
{
@@ -429,6 +429,15 @@ void WritePasswordJobPrivate::gnomeKeyring_cb( int result, WritePasswordJobPriva
}
}
+void WritePasswordJobPrivate::kwalletWalletFound(QDBusPendingCallWatcher *watcher)
+{
+ watcher->deleteLater();
+ const QDBusPendingReply<QString> reply = *watcher;
+ const QDBusPendingReply<int> pendingReply = iface->open( reply.value(), 0, q->service() );
+ QDBusPendingCallWatcher* pendingWatcher = new QDBusPendingCallWatcher( pendingReply, this );
+ connect( pendingWatcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(kwalletOpenFinished(QDBusPendingCallWatcher*)) );
+}
+
void WritePasswordJobPrivate::kwalletOpenFinished( QDBusPendingCallWatcher* watcher ) {
watcher->deleteLater();
QDBusPendingReply<int> reply = *watcher;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/qtkeychain.git
More information about the Pkg-owncloud-commits
mailing list