Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KMailTransport
Commits
76cebef2
Commit
76cebef2
authored
Oct 12, 2022
by
Sandro Knauß
🐝
Browse files
Cleanup unused code for KWallet.
As we don't use KWallet anymore directly, we can cleanup KWallet references.
parent
95b7bd6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/kmailtransport/transportmanager.cpp
View file @
76cebef2
...
...
@@ -40,10 +40,8 @@
#endif
using
namespace
QKeychain
;
#include
<KWallet>
using
namespace
MailTransport
;
using
namespace
KWallet
;
namespace
MailTransport
{
...
...
@@ -70,8 +68,6 @@ public:
TransportType
::
List
types
;
bool
myOwnChange
=
false
;
bool
appliedChange
=
false
;
KWallet
::
Wallet
*
wallet
=
nullptr
;
bool
walletOpenFailed
=
false
;
bool
walletAsyncOpen
=
false
;
int
defaultTransportId
=
-
1
;
bool
isMainInstance
=
false
;
...
...
@@ -90,7 +86,6 @@ public:
// Slots
void
slotTransportsChanged
();
void
slotWalletOpened
(
bool
success
);
void
dbusServiceUnregistered
();
void
startQueuedJobs
();
void
jobResult
(
KJob
*
job
);
...
...
@@ -537,46 +532,6 @@ int TransportManagerPrivate::createId() const
return
newId
;
}
KWallet
::
Wallet
*
TransportManager
::
wallet
()
{
if
(
d
->
wallet
&&
d
->
wallet
->
isOpen
())
{
return
d
->
wallet
;
}
if
(
!
Wallet
::
isEnabled
()
||
d
->
walletOpenFailed
)
{
return
nullptr
;
}
WId
window
=
0
;
if
(
qApp
->
activeWindow
())
{
window
=
qApp
->
activeWindow
()
->
winId
();
}
else
if
(
!
QApplication
::
topLevelWidgets
().
isEmpty
())
{
window
=
qApp
->
topLevelWidgets
().
first
()
->
winId
();
}
delete
d
->
wallet
;
d
->
wallet
=
Wallet
::
openWallet
(
Wallet
::
NetworkWallet
(),
window
);
if
(
!
d
->
wallet
)
{
d
->
walletOpenFailed
=
true
;
return
nullptr
;
}
d
->
prepareWallet
();
return
d
->
wallet
;
}
void
TransportManagerPrivate
::
prepareWallet
()
{
if
(
!
wallet
)
{
return
;
}
if
(
!
wallet
->
hasFolder
(
WALLET_FOLDER
))
{
wallet
->
createFolder
(
WALLET_FOLDER
);
}
wallet
->
setFolder
(
WALLET_FOLDER
);
}
void
TransportManager
::
loadPasswords
()
{
QEventLoop
loop
;
...
...
@@ -636,20 +591,6 @@ void TransportManagerPrivate::startQueuedJobs()
}
}
void
TransportManagerPrivate
::
slotWalletOpened
(
bool
success
)
{
qCDebug
(
MAILTRANSPORT_LOG
);
walletAsyncOpen
=
false
;
if
(
!
success
)
{
walletOpenFailed
=
true
;
delete
wallet
;
wallet
=
nullptr
;
}
else
{
prepareWallet
();
}
q
->
loadPasswords
();
}
void
TransportManagerPrivate
::
validateDefault
()
{
if
(
!
q
->
transportById
(
defaultTransportId
,
false
))
{
...
...
src/kmailtransport/transportmanager.h
View file @
76cebef2
...
...
@@ -14,11 +14,6 @@
#include
<memory>
namespace
KWallet
{
class
Wallet
;
}
namespace
MailTransport
{
class
Transport
;
...
...
@@ -254,12 +249,6 @@ Q_SIGNALS:
void
transportRenamed
(
int
id
,
const
QString
&
oldName
,
const
QString
&
newName
);
protected:
/**
Returns a pointer to an open wallet if available, 0 otherwise.
The wallet is opened synchronously if necessary.
*/
KWallet
::
Wallet
*
wallet
();
/**
Loads all passwords synchronously.
*/
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment