diff options
author | Fabian Müller <80399010+fmoc@users.noreply.github.com> | 2022-02-21 13:13:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 13:13:16 +0300 |
commit | 8b148a059b61f2baac625bdf20fbca243a001223 (patch) | |
tree | 7dc2b1b2d7f793878c99e3584c2fc7734fedadf8 /src/libsync/account.cpp | |
parent | 4b37ded384a737444b90c1fbbc1f28c580224afd (diff) |
Remove Account dependency from OAuth (#9426)
* Integrate Hannah's new DetermineAuthTypeJob2
* Allow use of OAuth class without account
This commit extracts the account-specific code (for use during normal
runtime, i.e., after the wizard has succeeded). Using a derived class
instead of a factory (job) saves some boilerplate code in this scenario.
* Move DetermineUserJobFactory into creds
* Emphasize purpose of class
* Fix file name
* Rename methods
* Split declaration and definition
* Add missing docstrings
* Give core job class a better name
* Document difference between core and other jobs
Diffstat (limited to 'src/libsync/account.cpp')
-rw-r--r-- | src/libsync/account.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsync/account.cpp b/src/libsync/account.cpp index 0d0aba03d..2eabff789 100644 --- a/src/libsync/account.cpp +++ b/src/libsync/account.cpp @@ -165,7 +165,7 @@ void Account::setCredentials(AbstractCredentials *cred) jar = _am->cookieJar(); jar->setParent(nullptr); - _am = QSharedPointer<QNetworkAccessManager>(); + _am.reset(); } // The order for these two is important! Reading the credential's @@ -176,7 +176,7 @@ void Account::setCredentials(AbstractCredentials *cred) // Note: This way the QNAM can outlive the Account and Credentials. // This is necessary to avoid issues with the QNAM being deleted while // processing slotHandleSslErrors(). - _am = QSharedPointer<QNetworkAccessManager>(_credentials->createQNAM(), &QObject::deleteLater); + _am.reset(_credentials->createQNAM(), &QObject::deleteLater); if (jar) { _am->setCookieJar(jar); |