summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-11-03 15:25:05 +0100
committerMichal Klocek <michal.klocek@qt.io>2020-11-12 14:26:51 +0100
commit6ca2cfe2c29f41202491c51ef897c4f211c28c27 (patch)
treeb45d86ba804800a9d536e758ac64b1d124fb00c4
parent4b541dd4cf618a61c3cc6c73866b163fb41339df (diff)
Fix build after 216c2ed5 in base
Change-Id: If9f646d36b70494248e7d721e7473505d9e0f42d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/core/content_browser_client_qt.cpp2
-rw-r--r--src/core/profile_adapter.cpp2
-rw-r--r--tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp10
3 files changed, 7 insertions, 7 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 4da4f72e4..c90901ad9 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -992,7 +992,7 @@ mojo::Remote<network::mojom::NetworkContext> ContentBrowserClientQt::CreateNetwo
std::vector<base::FilePath> ContentBrowserClientQt::GetNetworkContextsParentDirectory()
{
return {
- toFilePath(QStandardPaths::writableLocation(QStandardPaths::DataLocation)),
+ toFilePath(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)),
toFilePath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)) };
}
diff --git a/src/core/profile_adapter.cpp b/src/core/profile_adapter.cpp
index b0b48af03..d996ff09b 100644
--- a/src/core/profile_adapter.cpp
+++ b/src/core/profile_adapter.cpp
@@ -255,7 +255,7 @@ QString ProfileAdapter::dataPath() const
name = QStringLiteral("OffTheRecord");
else if (m_name.isEmpty())
name = QStringLiteral("UnknownProfile");
- return buildLocationFromStandardPath(QStandardPaths::writableLocation(QStandardPaths::DataLocation), name);
+ return buildLocationFromStandardPath(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), name);
}
void ProfileAdapter::setDataPath(const QString &path)
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index 544fb8a11..48ddb58f9 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -116,7 +116,7 @@ void tst_QWebEngineProfile::init()
QCOMPARE(profile->persistentCookiesPolicy(), QWebEngineProfile::AllowPersistentCookies);
QCOMPARE(profile->cachePath(), QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
+ QStringLiteral("/QtWebEngine/Default"));
- QCOMPARE(profile->persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ QCOMPARE(profile->persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)
+ QStringLiteral("/QtWebEngine/Default"));
}
@@ -136,7 +136,7 @@ void tst_QWebEngineProfile::privateProfile()
QCOMPARE(otrProfile.httpCacheType(), QWebEngineProfile::MemoryHttpCache);
QCOMPARE(otrProfile.persistentCookiesPolicy(), QWebEngineProfile::NoPersistentCookies);
QCOMPARE(otrProfile.cachePath(), QString());
- QCOMPARE(otrProfile.persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ QCOMPARE(otrProfile.persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)
+ QStringLiteral("/QtWebEngine/OffTheRecord"));
// TBD: setters do not really work
otrProfile.setCachePath(QStringLiteral("/home/foo/bar"));
@@ -159,7 +159,7 @@ void tst_QWebEngineProfile::testProfile()
QCOMPARE(profile.persistentCookiesPolicy(), QWebEngineProfile::AllowPersistentCookies);
QCOMPARE(profile.cachePath(), QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
+ QStringLiteral("/QtWebEngine/Test"));
- QCOMPARE(profile.persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ QCOMPARE(profile.persistentStoragePath(), QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)
+ QStringLiteral("/QtWebEngine/Test"));
}
@@ -845,9 +845,9 @@ void tst_QWebEngineProfile::changePersistentPath()
TestServer server;
QVERIFY(server.start());
- AutoDir dataDir1(QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ AutoDir dataDir1(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)
+ QStringLiteral("/QtWebEngine/Test"));
- AutoDir dataDir2(QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ AutoDir dataDir2(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)
+ QStringLiteral("/QtWebEngine/Test2"));
QWebEngineProfile testProfile(QStringLiteral("Test"));