From 5ff4b012afaf5de2c196ef5fccfc038733ff020d Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 24 Oct 2011 09:03:51 +1000 Subject: [PATCH] Remove dependency on QDesktopServices deprecated API. QDesktopServices::storageLocation() is deprecated in favor of QStandardPaths::writableLocation(). Change-Id: I50f73e93f39ded555123656282cf5a02abb972d8 Reviewed-by: Glenn Watson --- src/declarative/qml/qdeclarativesqldatabase.cpp | 4 ++-- tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qdeclarativesqldatabase.cpp b/src/declarative/qml/qdeclarativesqldatabase.cpp index dff87b2..920f835 100644 --- a/src/declarative/qml/qdeclarativesqldatabase.cpp +++ b/src/declarative/qml/qdeclarativesqldatabase.cpp @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include #include @@ -517,7 +517,7 @@ static v8::Handle qmlsqldatabase_open_sync(const v8::Arguments& args) QDeclarativeSqlDatabaseData::QDeclarativeSqlDatabaseData(QV8Engine *engine) { - QString dataLocation = QDesktopServices::storageLocation(QDesktopServices::DataLocation); + QString dataLocation = QStandardPaths::writableLocation(QStandardPaths::DataLocation); offlineStoragePath = dataLocation.replace(QLatin1Char('/'), QDir::separator()) + QDir::separator() + QLatin1String("QML") + QDir::separator() + QLatin1String("OfflineStorage"); diff --git a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp index 06ee4e9..6ee1457 100644 --- a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp +++ b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include @@ -177,7 +177,7 @@ void tst_qdeclarativeengine::offlineStoragePath() QDeclarativeEngine engine; - QDir dir(QDesktopServices::storageLocation(QDesktopServices::DataLocation)); + QDir dir(QStandardPaths::writableLocation(QStandardPaths::DataLocation)); dir.mkpath("QML"); dir.cd("QML"); dir.mkpath("OfflineStorage"); -- 2.7.4