diff options
author | Tasuku Suzuki <tasuku.suzuki@nokia.com> | 2010-04-14 06:08:52 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2010-04-14 06:08:52 (GMT) |
commit | 5a8b5b892441a65319e39c1a8f305cf0b49edf17 (patch) | |
tree | d17f5d3bc54a29a904bbc76074b6367913fd2d46 | |
parent | fb1c371b643e44890c1eada5aba893d62d814e5a (diff) | |
download | Qt-5a8b5b892441a65319e39c1a8f305cf0b49edf17.zip Qt-5a8b5b892441a65319e39c1a8f305cf0b49edf17.tar.gz Qt-5a8b5b892441a65319e39c1a8f305cf0b49edf17.tar.bz2 |
Fix QT_NO_DESKTOPSERVICES
Merge-request: 2359
Reviewed-by: Alexis Menard <alexis.menard@nokia.com>
-rw-r--r-- | src/declarative/qml/qdeclarativeengine.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index e2f810e..8462c65 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -212,10 +212,13 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr newQMetaObject(StaticQtMetaObject::get()); globalObject().setProperty(QLatin1String("Qt"), qtObject); +#ifndef QT_NO_DESKTOPSERVICES offlineStoragePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation).replace(QLatin1Char('/'), QDir::separator()) + QDir::separator() + QLatin1String("QML") + QDir::separator() + QLatin1String("OfflineStorage"); - +#else + qWarning("offlineStoragePath is not set by default with QT_NO_DESKTOPSERVICES"); +#endif qt_add_qmlxmlhttprequest(this); qt_add_qmlsqldatabase(this); @@ -1214,7 +1217,10 @@ QScriptValue QDeclarativeEnginePrivate::desktopOpenUrl(QScriptContext *ctxt, QSc { if(ctxt->argumentCount() < 1) return e->newVariant(QVariant(false)); - bool ret = QDesktopServices::openUrl(QUrl(ctxt->argument(0).toString())); + bool ret = false; +#ifndef QT_NO_DESKTOPSERVICES + ret = QDesktopServices::openUrl(QUrl(ctxt->argument(0).toString())); +#endif return e->newVariant(QVariant(ret)); } |