diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-10-24 09:03:51 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-24 01:22:31 +0200 |
commit | 5ff4b012afaf5de2c196ef5fccfc038733ff020d (patch) | |
tree | 47f4e206f640fee9071c90b734c105958d6d27ba | |
parent | 210bb5a06811057a8ce2747bd187817a06968042 (diff) |
Remove dependency on QDesktopServices deprecated API.
QDesktopServices::storageLocation() is deprecated in favor of
QStandardPaths::writableLocation().
Change-Id: I50f73e93f39ded555123656282cf5a02abb972d8
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
-rw-r--r-- | src/declarative/qml/qdeclarativesqldatabase.cpp | 4 | ||||
-rw-r--r-- | 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 dff87b2f78..920f835d19 100644 --- a/src/declarative/qml/qdeclarativesqldatabase.cpp +++ b/src/declarative/qml/qdeclarativesqldatabase.cpp @@ -51,7 +51,7 @@ #include <QtSql/qsqlerror.h> #include <QtSql/qsqlrecord.h> #include <QtSql/qsqlfield.h> -#include <QtGui/qdesktopservices.h> +#include <QtCore/qstandardpaths.h> #include <QtCore/qstack.h> #include <QtCore/qcryptographichash.h> #include <QtCore/qsettings.h> @@ -517,7 +517,7 @@ static v8::Handle<v8::Value> 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 06ee4e98cd..6ee14572e3 100644 --- a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp +++ b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp @@ -45,7 +45,7 @@ #include <QNetworkAccessManager> #include <QPointer> #include <QDir> -#include <QDesktopServices> +#include <QStandardPaths> #include <QDebug> #include <QDeclarativeComponent> #include <QDeclarativeNetworkAccessManagerFactory> @@ -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"); |