From 1c93b10b0aa6fa528d1a49e029a7158b4e2cea8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pertti=20Kellom=C3=A4ki?= Date: Wed, 8 Jun 2011 14:14:42 +0300 Subject: [PATCH] Changes: Deprecate MDeclarativeCache::applicationDirPath() and MDeclarativeCache::applicationFilePath(). Modify examples to use the QCoreApplication members. RevBy: Juha Lintula --- debian/changelog | 1 + examples/boosted-qml/with-cmake/main.cpp | 5 +---- examples/boosted-qml/with-qmake/main.cpp | 5 +---- src/qdeclarativebooster/mdeclarativecache.h | 12 ++++++------ 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/debian/changelog b/debian/changelog index bfc58d4..5629005 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ applauncherd (0.30.1) unstable; urgency=low + * Changes: Deprecate MDeclarativeCache::applicationDirPath() and MDeclarativeCache::applicationFilePath(). * Changes: Modify test applications to use _exit(). -- Pertti Kellomaki Wed, 8 Jun 2011 13:36:37 +0300 diff --git a/examples/boosted-qml/with-cmake/main.cpp b/examples/boosted-qml/with-cmake/main.cpp index 349e153..def66a2 100644 --- a/examples/boosted-qml/with-cmake/main.cpp +++ b/examples/boosted-qml/with-cmake/main.cpp @@ -25,10 +25,7 @@ Q_DECL_EXPORT int main(int argc, char **argv) QApplication *app = MDeclarativeCache::qApplication(argc, argv); QDeclarativeView *window = MDeclarativeCache::qDeclarativeView(); - // Use MDeclarativeCache::applicationDirPath() - // instead of QCoreApplication::applicationDirPath() - // because the latter does not work with the booster. - QDir::setCurrent(MDeclarativeCache::applicationDirPath()); + QDir::setCurrent(QCoreApplication::applicationDirPath()); window->setSource(QUrl::fromLocalFile("main.qml")); window->showFullScreen(); diff --git a/examples/boosted-qml/with-qmake/main.cpp b/examples/boosted-qml/with-qmake/main.cpp index 50cd9a0..18e2167 100644 --- a/examples/boosted-qml/with-qmake/main.cpp +++ b/examples/boosted-qml/with-qmake/main.cpp @@ -25,10 +25,7 @@ Q_DECL_EXPORT int main(int argc, char **argv) QApplication *app = MDeclarativeCache::qApplication(argc, argv); QDeclarativeView *window = MDeclarativeCache::qDeclarativeView(); - // Use MDeclarativeCache::applicationDirPath() - // instead of QCoreApplication::applicationDirPath() - // because the latter does not work with the booster. - QDir::setCurrent(MDeclarativeCache::applicationDirPath()); + QDir::setCurrent(QCoreApplication::applicationDirPath()); window->setSource(QUrl::fromLocalFile("main.qml")); diff --git a/src/qdeclarativebooster/mdeclarativecache.h b/src/qdeclarativebooster/mdeclarativecache.h index 8db13b1..68cb1d1 100644 --- a/src/qdeclarativebooster/mdeclarativecache.h +++ b/src/qdeclarativebooster/mdeclarativecache.h @@ -60,17 +60,17 @@ public: //! Returns the directory that contains the application executable. /*! - * Workaround for QApplication::applicationDirPath() that does not - * work on linux with qdeclarativebooster and Qt 4.7. + * This function is deprecated. It used to be a workaround for QApplication::applicationDirPath() + * not working on harmattan with qdeclarativebooster and Qt 4.7, but this has been fixed. */ - static QString applicationDirPath(); + static QString applicationDirPath() __attribute__ ((deprecated)); //! Returns the file path of the application executable. /*! - * Workaround for QApplication::applicationFilePath() that does not - * work on linux with qdeclarativebooster and Qt 4.7. + * This function is deprecated. It used to be a workaround for QApplication::applicationFilePath() + * not working on harmattan with qdeclarativebooster and Qt 4.7, but this has been fixed. */ - static QString applicationFilePath(); + static QString applicationFilePath() __attribute__ ((deprecated)); protected: