mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +08:00
refs #602, CWebDataServices and CCookieManager now part of CApplication
* New hint flag: DB data for the client will no longer be web loaded but fetched from cache whenever possible * No public constructors for the 2 classes * adjusted main
This commit is contained in:
committed by
Mathew Sutcliffe
parent
4b7ba4f117
commit
65af7d87da
@@ -21,14 +21,17 @@
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
class CApplication;
|
||||
|
||||
/*!
|
||||
* Centralized cookie manager,
|
||||
* which allows thread safe sharing of cookies
|
||||
* Cookie manager, which allows thread safe sharing of cookies
|
||||
*/
|
||||
class BLACKCORE_EXPORT CCookieManager : QNetworkCookieJar
|
||||
class BLACKCORE_EXPORT CCookieManager : public QNetworkCookieJar
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
friend class CApplication;
|
||||
|
||||
public:
|
||||
//! cookiesForUrl::setCookiesFromUrl
|
||||
//! \threadsafe
|
||||
@@ -58,19 +61,10 @@ namespace BlackCore
|
||||
//! \threadsafe
|
||||
virtual bool updateCookie(const QNetworkCookie &cookie) override;
|
||||
|
||||
//! Our central access manager
|
||||
static CCookieManager *instance();
|
||||
|
||||
//! Set the central instance to the given access manager
|
||||
static void setToAccessManager(QNetworkAccessManager *manager);
|
||||
|
||||
private:
|
||||
//! Constructor
|
||||
CCookieManager(QObject *parent = nullptr);
|
||||
|
||||
//! Reset the parent, required when CookieManager is set to QNetworkAccessManager
|
||||
static void resetParent();
|
||||
|
||||
mutable QReadWriteLock m_lock { QReadWriteLock::Recursive };
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user