forked from blue/squawk
account removal bugfix, some testing
This commit is contained in:
parent
f64e5c2df0
commit
ce686e121b
3 changed files with 17 additions and 6 deletions
|
@ -139,8 +139,10 @@ void Core::Squawk::addAccount(
|
|||
bool active,
|
||||
Shared::AccountPassword passwordType)
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
if (amap.count(name) > 0) {
|
||||
qDebug() << "An attempt to add account" << name << "but an account with such name already exist, ignoring";
|
||||
return;
|
||||
}
|
||||
Account* acc = new Account(login, server, password, name, active, &network);
|
||||
acc->setResource(resource);
|
||||
acc->setPasswordType(passwordType);
|
||||
|
@ -198,8 +200,10 @@ void Core::Squawk::addAccount(
|
|||
switch (passwordType) {
|
||||
case Shared::AccountPassword::alwaysAsk:
|
||||
case Shared::AccountPassword::kwallet:
|
||||
acc->invalidatePassword();
|
||||
break;
|
||||
if (password == "") {
|
||||
acc->invalidatePassword();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue