Skip to content
This repository was archived by the owner on Sep 24, 2023. It is now read-only.

Port to QtKeychain#66

Open
nicolasfella wants to merge 1 commit intoKDAB:masterfrom
nicolasfella:work/qtkeychain
Open

Port to QtKeychain#66
nicolasfella wants to merge 1 commit intoKDAB:masterfrom
nicolasfella:work/qtkeychain

Conversation

@nicolasfella
Copy link
Member

Currently we optionally use KWallet to store passwords and fall back to
storing it in a settings file.

Instead use QtKeychain to store the password in the platforms respective
native API (which happens to be KWallet on Plasma).

This should improve the cross-platformness of the app and matches the
general direction KDE is taking wrt KWallet.

It also considerably simplifies the implifies the implementation since
we no longer need to handle the optionalness of KWallet

Currently we optionally use KWallet to store passwords and fall back to
storing it in a settings file.

Instead use QtKeychain to store the password in the platforms respective
native API (which happens to be KWallet on Plasma).

This should improve the cross-platformness of the app and matches the
general direction KDE is taking wrt KWallet.

It also considerably simplifies the implifies the implementation since
we no longer need to handle the optionalness of KWallet

job->start();

Settings::setPassword(QString()); // ensure no plain-text password from before in the config file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be kept in the case the write job fails? I'd say security over keeping the password at all costs though.

if (job->error() == QKeychain::AccessDeniedByUser) {
mDeniedByUser = true;
}
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should there be a mDeniedByUser = false; here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants