mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-23 04:57:44 +00:00
Make remembered username/passwords separate for each profile
This commit is contained in:
parent
0b5d6ee182
commit
5367342bd9
1 changed files with 4 additions and 4 deletions
|
@ -301,14 +301,14 @@ LauncherWindow::LauncherWindow(QWidget* parent) :
|
|||
if(currentProfile().rememberUsername) {
|
||||
auto job = new QKeychain::WritePasswordJob("LauncherWindow");
|
||||
job->setTextData(usernameEdit->text());
|
||||
job->setKey("username");
|
||||
job->setKey(currentProfile().name + "username");
|
||||
job->start();
|
||||
}
|
||||
|
||||
if(currentProfile().rememberPassword) {
|
||||
auto job = new QKeychain::WritePasswordJob("LauncherWindow");
|
||||
job->setTextData(passwordEdit->text());
|
||||
job->setKey("password");
|
||||
job->setKey(currentProfile().name + "password");
|
||||
job->start();
|
||||
}
|
||||
|
||||
|
@ -402,7 +402,7 @@ void LauncherWindow::reloadControls() {
|
|||
rememberUsernameBox->setChecked(currentProfile().rememberUsername);
|
||||
if(currentProfile().rememberUsername) {
|
||||
auto job = new QKeychain::ReadPasswordJob("LauncherWindow");
|
||||
job->setKey("username");
|
||||
job->setKey(currentProfile().name + "-username");
|
||||
job->start();
|
||||
|
||||
connect(job, &QKeychain::ReadPasswordJob::finished, [=](QKeychain::Job* j) {
|
||||
|
@ -413,7 +413,7 @@ void LauncherWindow::reloadControls() {
|
|||
rememberPasswordBox->setChecked(currentProfile().rememberPassword);
|
||||
if(currentProfile().rememberPassword) {
|
||||
auto job = new QKeychain::ReadPasswordJob("LauncherWindow");
|
||||
job->setKey("password");
|
||||
job->setKey(currentProfile().name + "-password");
|
||||
job->start();
|
||||
|
||||
connect(job, &QKeychain::ReadPasswordJob::finished, [=](QKeychain::Job* j) {
|
||||
|
|
Loading…
Add table
Reference in a new issue