Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2022-05-11 19:44:31 +0300
committerHannah von Reth <vonreth@kde.org>2022-05-17 09:55:07 +0300
commit9751b49032e6e049cea8875c172947ed44531ab0 (patch)
tree79b21278c0eecac0aa1a72c3ff86f7cacca383b4 /src/libsync
parent83ff3aaa9737dae919fe67f8da3de398c18b98a1 (diff)
Remove sharedAccessManager
Diffstat (limited to 'src/libsync')
-rw-r--r--src/libsync/account.cpp13
-rw-r--r--src/libsync/account.h3
2 files changed, 3 insertions, 13 deletions
diff --git a/src/libsync/account.cpp b/src/libsync/account.cpp
index 0b5c69046..3870f6cdd 100644
--- a/src/libsync/account.cpp
+++ b/src/libsync/account.cpp
@@ -152,8 +152,7 @@ void Account::setCredentials(AbstractCredentials *cred)
if (_am) {
jar = _am->cookieJar();
jar->setParent(nullptr);
-
- _am.reset();
+ _am->deleteLater();
}
// The order for these two is important! Reading the credential's
@@ -161,10 +160,7 @@ void Account::setCredentials(AbstractCredentials *cred)
_credentials.reset(cred);
cred->setAccount(this);
- // 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.reset(_credentials->createAM(), &QObject::deleteLater);
+ _am = _credentials->createAM();
if (jar) {
_am->setCookieJar(jar);
@@ -203,11 +199,6 @@ AccessManager *Account::accessManager()
return _am.data();
}
-QSharedPointer<AccessManager> Account::sharedAccessManager()
-{
- return _am;
-}
-
QNetworkReply *Account::sendRawRequest(const QByteArray &verb, const QUrl &url, QNetworkRequest req, QIODevice *data)
{
Q_ASSERT(verb.isUpper());
diff --git a/src/libsync/account.h b/src/libsync/account.h
index 55534f9e6..f594607cd 100644
--- a/src/libsync/account.h
+++ b/src/libsync/account.h
@@ -205,7 +205,6 @@ public:
void clearCookieJar();
AccessManager *accessManager();
- [[deprecated]] QSharedPointer<AccessManager> sharedAccessManager();
JobQueue *jobQueue();
@@ -263,7 +262,7 @@ private:
Capabilities _capabilities;
QString _serverVersion;
QuotaInfo *_quotaInfo;
- QSharedPointer<AccessManager> _am;
+ QPointer<AccessManager> _am;
QScopedPointer<AbstractCredentials> _credentials;
bool _http2Supported = false;