mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 06:17:17 +02:00
Enable QtWebEngine to store its cache on disk
In the past, QtWebEngine stored the cache on disk automatically. But apparently due to a recent change to Qt, this has changed: a Web Engine Profile that is constructed without a Storage Name is placed in "Off the Record" mode, which means that the cache is stored only in memory. Therefore, we must assign a Storage Name and disable "Off the Record" mode.
This commit is contained in:
parent
dbd9299e85
commit
ef163c836d
2 changed files with 4 additions and 0 deletions
|
@ -24,6 +24,9 @@ FileTypeProfile::FileTypeProfile(QQmlContext* parent) :
|
|||
static const QString WEB_ENGINE_USER_AGENT = "Chrome/48.0 (HighFidelityInterface)";
|
||||
setHttpUserAgent(WEB_ENGINE_USER_AGENT);
|
||||
|
||||
setStorageName(QML_WEB_ENGINE_STORAGE_NAME);
|
||||
setOffTheRecord(false);
|
||||
|
||||
auto requestInterceptor = new RequestInterceptor(this);
|
||||
setRequestInterceptor(requestInterceptor);
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ static const QString QML_WEB_ENGINE_STORAGE_NAME = "qmlWebEngine";
|
|||
HFWebEngineProfile::HFWebEngineProfile(QQmlContext* parent) : Parent(parent)
|
||||
{
|
||||
setStorageName(QML_WEB_ENGINE_STORAGE_NAME);
|
||||
setOffTheRecord(false);
|
||||
|
||||
// we use the HFWebEngineRequestInterceptor to make sure that web requests are authenticated for the interface user
|
||||
setRequestInterceptor(new RequestInterceptor(this));
|
||||
|
|
Loading…
Reference in a new issue