account removal bugfix, some testing

This commit is contained in:
Blue 2022-04-13 22:02:48 +03:00
parent f64e5c2df0
commit ce686e121b
Signed by untrusted user: blue
GPG Key ID: 9B203B252A63EE38
3 changed files with 17 additions and 6 deletions

View File

@ -2,11 +2,18 @@
## Squawk 0.2.2 (UNRELEASED)
### Bug fixes
- now when you remove an account it actually gets removed
- segfault on unitialized Availability in some rare occesions
### Improvements
- there is a way to disable an account and it wouldn't connect when you change availability
- if you cancel password query an account becomes inactive and doesn't annoy you anymore
- if you filled password field and chose KWallet as a storage Squawk wouldn't ask you again for the same password
- if left the password field empty and chose KWallet as a storage Squawk will try to get that passord from KWallet before asking you to input it
- accounts now connect to the server asyncronously - if one is stopped on password prompt another is connecting
### New features
- new "About" window with links, license, gratitudes
## Squawk 0.2.1 (Apr 02, 2022)
### Bug fixes

View File

@ -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;
}

View File

@ -564,7 +564,7 @@ void Squawk::onRosterContextMenu(const QPoint& point)
connect(card, &QAction::triggered, std::bind(&Squawk::onActivateVCard, this, name, acc->getBareJid(), true));
QAction* remove = contextMenu->addAction(Shared::icon("edit-delete"), tr("Remove"));
connect(remove, &QAction::triggered, std::bind(&Squawk::removeAccount, this, name));
connect(remove, &QAction::triggered, std::bind(&Squawk::removeAccountRequest, this, name));
}
break;
case Models::Item::contact: {