aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2020-10-16 15:04:23 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2020-10-23 15:05:07 +0200
commiteb1da874f275279546701f2be7e7db08e8d36e0d (patch)
tree4f5b840b42bfdf2328051e86b851f47e77a9c0c9
parentc31c4068f87bb65328b4d25ca0c8d428ab8f74a6 (diff)
Remove usage of deprecated QStandardPaths::DataLocation
Task-number: QTBUG-87037 Change-Id: I1969dba3b6edfaf202a316576674efed481bb1e4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--src/plugins/qmltooling/qmldbg_preview/qqmlpreviewfileloader.cpp1
-rw-r--r--src/qml/qml/qqmlengine.cpp2
-rw-r--r--tests/auto/qml/qqmlengine/tst_qqmlengine.cpp4
3 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewfileloader.cpp b/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewfileloader.cpp
index 9a3460b063..ffe50697f8 100644
--- a/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewfileloader.cpp
+++ b/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewfileloader.cpp
@@ -65,7 +65,6 @@ QQmlPreviewFileLoader::QQmlPreviewFileLoader(QQmlPreviewServiceImpl *service) :
m_blacklist.blacklist(QLibraryInfo::path(QLibraryInfo::SettingsPath));
static const QStandardPaths::StandardLocation blackListLocations[] = {
- QStandardPaths::DataLocation,
QStandardPaths::CacheLocation,
QStandardPaths::GenericDataLocation,
QStandardPaths::ConfigLocation,
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index b5b36cccb9..0b4493df79 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -2168,7 +2168,7 @@ QString QQmlEngine::offlineStoragePath() const
Q_D(const QQmlEngine);
if (d->offlineStoragePath.isEmpty()) {
- QString dataLocation = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
+ QString dataLocation = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
QQmlEnginePrivate *e = const_cast<QQmlEnginePrivate *>(d);
if (!dataLocation.isEmpty())
e->offlineStoragePath = dataLocation.replace(QLatin1Char('/'), QDir::separator())
diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
index 1e9b6434c4..6c00494189 100644
--- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
+++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
@@ -272,7 +272,7 @@ void tst_qqmlengine::offlineStoragePath()
QQmlEngine engine;
- QString dataLocation = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
+ QString dataLocation = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
QCOMPARE(dataLocation.isEmpty(), engine.offlineStoragePath().isEmpty());
@@ -297,7 +297,7 @@ void tst_qqmlengine::offlineDatabaseStoragePath()
qApp->setOrganizationDomain("www.qt-project.org");
QQmlEngine engine;
- QString dataLocation = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
+ QString dataLocation = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
const QString databaseName = QLatin1String("foo");
QString databaseLocation = engine.offlineStorageDatabaseFilePath(databaseName);
QCOMPARE(dataLocation.isEmpty(), databaseLocation.isEmpty());