summaryrefslogtreecommitdiffstats
path: root/src/core/browser_context_adapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/browser_context_adapter.cpp')
-rw-r--r--src/core/browser_context_adapter.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp
index 2d56dcff7..b06515c2f 100644
--- a/src/core/browser_context_adapter.cpp
+++ b/src/core/browser_context_adapter.cpp
@@ -78,12 +78,24 @@ BrowserContextAdapter* BrowserContextAdapter::offTheRecordContext()
return WebEngineContext::current()->offTheRecordBrowserContext();
}
-QString BrowserContextAdapter::path() const
+QString BrowserContextAdapter::dataPath() const
{
QString dataLocation = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
if (dataLocation.isEmpty())
dataLocation = QDir::homePath() % QDir::separator() % QChar::fromLatin1('.') % QCoreApplication::applicationName();
dataLocation.append(QDir::separator() % QLatin1String("QtWebEngine"));
+ dataLocation.append(QDir::separator() % QLatin1String("Default"));
return dataLocation;
}
+
+QString BrowserContextAdapter::cachePath() const
+{
+ QString cacheLocation = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
+ if (cacheLocation.isEmpty())
+ cacheLocation = QDir::homePath() % QDir::separator() % QChar::fromLatin1('.') % QCoreApplication::applicationName();
+
+ cacheLocation.append(QDir::separator() % QLatin1String("QtWebEngine"));
+ cacheLocation.append(QDir::separator() % QLatin1String("Default"));
+ return cacheLocation;
+}