Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plasma applet for NetworkManager
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Wiki
Bugzilla
Code
Merge requests
23
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Plasma
Plasma applet for NetworkManager
Commits
6d2593bc
Commit
6d2593bc
authored
10 years ago
by
Jan Grulich
Browse files
Options
Downloads
Patches
Plain Diff
Do not keep trying to open KWallet if we failed before
REVIEW:120313 BUG:339223
parent
21d62fa2
No related branches found
Branches containing commit
Tags
v5.0.95
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
kded/secretagent.cpp
+16
-4
16 additions, 4 deletions
kded/secretagent.cpp
kded/secretagent.h
+1
-0
1 addition, 0 deletions
kded/secretagent.h
with
17 additions
and
4 deletions
kded/secretagent.cpp
+
16
−
4
View file @
6d2593bc
...
...
@@ -42,10 +42,11 @@
#include
<KWallet/Wallet>
#include
<QDebug>
SecretAgent
::
SecretAgent
(
QObject
*
parent
)
:
NetworkManager
::
SecretAgent
(
"org.kde.plasma.networkmanagement"
,
parent
),
m_wallet
(
0
),
m_dialog
(
0
)
SecretAgent
::
SecretAgent
(
QObject
*
parent
)
:
NetworkManager
::
SecretAgent
(
"org.kde.plasma.networkmanagement"
,
parent
)
,
m_openWalletFailed
(
false
)
,
m_wallet
(
0
)
,
m_dialog
(
0
)
{
connect
(
NetworkManager
::
notifier
(),
&
NetworkManager
::
Notifier
::
serviceDisappeared
,
this
,
&
SecretAgent
::
killDialogs
);
...
...
@@ -251,9 +252,13 @@ void SecretAgent::killDialogs()
void
SecretAgent
::
walletOpened
(
bool
success
)
{
if
(
!
success
)
{
m_openWalletFailed
=
true
;
m_wallet
->
deleteLater
();
m_wallet
=
0
;
}
else
{
m_openWalletFailed
=
false
;
}
processNext
();
}
...
...
@@ -453,6 +458,13 @@ bool SecretAgent::useWallet() const
return
true
;
}
/* If opening of KWallet failed before, we should not try to open it again and
* we should return false instead */
if
(
m_openWalletFailed
)
{
m_openWalletFailed
=
false
;
return
false
;
}
if
(
KWallet
::
Wallet
::
isEnabled
())
{
m_wallet
=
KWallet
::
Wallet
::
openWallet
(
KWallet
::
Wallet
::
LocalWallet
(),
0
,
KWallet
::
Wallet
::
Asynchronous
);
if
(
m_wallet
)
{
...
...
This diff is collapsed.
Click to expand it.
kded/secretagent.h
+
1
−
0
View file @
6d2593bc
...
...
@@ -113,6 +113,7 @@ private:
bool
hasSecrets
(
const
NMVariantMapMap
&
connection
)
const
;
void
sendSecrets
(
const
NMVariantMapMap
&
secrets
,
const
QDBusMessage
&
message
)
const
;
mutable
bool
m_openWalletFailed
;
mutable
KWallet
::
Wallet
*
m_wallet
;
mutable
PasswordDialog
*
m_dialog
;
QList
<
SecretsRequest
>
m_calls
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment