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

Port to QtKeychain #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nicolasfella
Copy link

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.

None yet

2 participants