AccountManager: load the cookies

For issue #7054
This commit is contained in:
Olivier Goffart 2019-03-01 08:46:33 +01:00 committed by Kevin Ottens
parent 575935ded0
commit 87bd26bf6c
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -16,6 +16,7 @@
#include "configfile.h"
#include "sslerrordialog.h"
#include "proxyauthhandler.h"
#include "common/asserts.h"
#include <theme.h>
#include <creds/credentialsfactory.h>
#include <creds/abstractcredentials.h>
@ -85,6 +86,10 @@ bool AccountManager::restore()
if (auto acc = loadAccountHelper(*settings)) {
acc->_id = accountId;
if (auto accState = AccountState::loadFromSettings(acc, *settings)) {
auto jar = qobject_cast<CookieJar*>(acc->_am->cookieJar());
ASSERT(jar);
if (jar)
jar->restore(acc->cookieJarPath());
addAccountState(accState);
}
}