Add autotest interface to get session from QNAM
Change-Id: I7d8ea41299408377042a9f0d0a672e1a6fb57e7d Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
This commit is contained in:
parent
b0c7f34c90
commit
1a6b338e10
@ -849,6 +849,17 @@ QNetworkAccessManager::NetworkAccessibility QNetworkAccessManager::networkAccess
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
|
||||
Returns the network session currently in use.
|
||||
This can be changed at any time, ownership remains with the QNetworkAccessManager
|
||||
*/
|
||||
const QWeakPointer<const QNetworkSession> QNetworkAccessManagerPrivate::getNetworkSession(const QNetworkAccessManager *q)
|
||||
{
|
||||
return q->d_func()->networkSession.toWeakRef();
|
||||
}
|
||||
|
||||
#endif // QT_NO_BEARERMANAGEMENT
|
||||
|
||||
/*!
|
||||
|
@ -162,6 +162,7 @@ public:
|
||||
static inline QNetworkAccessCache *getObjectCache(QNetworkAccessBackend *backend)
|
||||
{ return &backend->manager->objectCache; }
|
||||
Q_AUTOTEST_EXPORT static void clearCache(QNetworkAccessManager *manager);
|
||||
Q_AUTOTEST_EXPORT static const QWeakPointer<const QNetworkSession> getNetworkSession(const QNetworkAccessManager *manager);
|
||||
|
||||
Q_DECLARE_PUBLIC(QNetworkAccessManager)
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user