Detect if opening the wallet failed.
(Assuming that the user denied access)
This commit is contained in:
parent
7573b17ba6
commit
be96f4c514
|
@ -33,6 +33,11 @@ void ReadPasswordJob::Private::kwalletOpenFinished( QDBusPendingCallWatcher* wat
|
|||
|
||||
walletHandle = reply.value();
|
||||
|
||||
if ( walletHandle < 0 ) {
|
||||
q->emitFinishedWithError( AccessDenied, tr("Access to keychain denied") );
|
||||
return;
|
||||
}
|
||||
|
||||
const QDBusPendingReply<int> nextReply = iface->entryType( walletHandle, q->service(), key, q->service() );
|
||||
QDBusPendingCallWatcher* nextWatcher = new QDBusPendingCallWatcher( nextReply, this );
|
||||
connect( nextWatcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(kwalletEntryTypeFinished(QDBusPendingCallWatcher*)) );
|
||||
|
@ -93,6 +98,11 @@ void WritePasswordJob::Private::kwalletOpenFinished( QDBusPendingCallWatcher* wa
|
|||
|
||||
const int handle = reply.value();
|
||||
|
||||
if ( handle < 0 ) {
|
||||
q->emitFinishedWithError( AccessDenied, tr("Access to keychain denied") );
|
||||
return;
|
||||
}
|
||||
|
||||
QDBusPendingReply<int> nextReply;
|
||||
|
||||
if ( !textData.isEmpty() )
|
||||
|
|
Loading…
Reference in New Issue