diff --git a/data/pkgconfig/qdeclarative-boostable.pc b/data/pkgconfig/qdeclarative-boostable.pc index ae6db9e..ac846dc 100644 --- a/data/pkgconfig/qdeclarative-boostable.pc +++ b/data/pkgconfig/qdeclarative-boostable.pc @@ -1,5 +1,5 @@ Name: qdeclarative-boostable Description: make application boostable by applauncherd Version: 0.2.0 -Libs: -pie -rdynamic -lqdeclarativeboostercache +Libs: -pie -rdynamic -lmdeclarativecache Cflags: -fPIC -fvisibility=hidden -fvisibility-inlines-hidden diff --git a/debian/applauncherd-dev.install b/debian/applauncherd-dev.install index 3192613..b694982 100644 --- a/debian/applauncherd-dev.install +++ b/debian/applauncherd-dev.install @@ -1,5 +1,5 @@ usr/lib/pkgconfig/qt-boostable.pc usr/share/qt4/mkspecs/features/qt-boostable.prf -usr/include/applauncherd/qdeclarativeboostercache.h +usr/include/applauncherd/mdeclarativecache.h usr/lib/pkgconfig/qdeclarative-boostable.pc usr/share/qt4/mkspecs/features/qdeclarative-boostable.prf diff --git a/debian/applauncherd-launcher.install b/debian/applauncherd-launcher.install index 201134d..cc7e27c 100644 --- a/debian/applauncherd-launcher.install +++ b/debian/applauncherd-launcher.install @@ -4,5 +4,5 @@ usr/bin/applauncherd usr/lib/applauncherd/libmbooster.so usr/lib/applauncherd/libqtbooster.so usr/lib/applauncherd/libqdeclarativebooster.so -usr/lib/libqdeclarativeboostercache.so -usr/lib/libqdeclarativeboostercache.so.* +usr/lib/libmdeclarativecache.so +usr/lib/libmdeclarativecache.so.* diff --git a/src/qdeclarativebooster/CMakeLists.txt b/src/qdeclarativebooster/CMakeLists.txt index 492f66d..6e8614d 100644 --- a/src/qdeclarativebooster/CMakeLists.txt +++ b/src/qdeclarativebooster/CMakeLists.txt @@ -11,22 +11,22 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/src/comm set(PLUGINSRC qdeclarativebooster.cpp pluginfactory.cpp ${LAUNCHER}/appdata.cpp ${LAUNCHER}/booster.cpp ${LAUNCHER}/connection.cpp ${LAUNCHER}/logger.cpp ${LAUNCHER}/singleinstance.cpp ${LAUNCHER}/socketmanager.cpp) -set(LIBSRC qdeclarativeboostercache.cpp qdeclarativeboostercache.h qdeclarativeboostercache_p.h) +set(LIBSRC mdeclarativecache.cpp mdeclarativecache.h mdeclarativecache_p.h) # Set executables -add_library(qdeclarativeboostercache SHARED ${LIBSRC}) -set_target_properties(qdeclarativeboostercache PROPERTIES +add_library(mdeclarativecache SHARED ${LIBSRC}) +set_target_properties(mdeclarativecache PROPERTIES VERSION 0.1 SOVERSION 0) -target_link_libraries(qdeclarativeboostercache ${LIBDL} ${QT_QTCORE_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTGUI_LIBRARY} ${X11_LIBRARIES}) +target_link_libraries(mdeclarativecache ${LIBDL} ${QT_QTCORE_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTGUI_LIBRARY} ${X11_LIBRARIES}) add_library(qdeclarativebooster MODULE ${PLUGINSRC}) set_target_properties(qdeclarativebooster PROPERTIES COMPILE_FLAGS -fvisibility=hidden) -target_link_libraries(qdeclarativebooster ${LIBDL} "-L. -lqdeclarativeboostercache") -add_dependencies(qdeclarativebooster qdeclarativeboostercache) +target_link_libraries(qdeclarativebooster ${LIBDL} "-L. -lmdeclarativecache") +add_dependencies(qdeclarativebooster mdeclarativecache) # Add install rule install(TARGETS qdeclarativebooster DESTINATION /usr/lib/applauncherd/) -install(TARGETS qdeclarativeboostercache DESTINATION /usr/lib) -install(FILES qdeclarativeboostercache.h DESTINATION /usr/include/applauncherd +install(TARGETS mdeclarativecache DESTINATION /usr/lib) +install(FILES mdeclarativecache.h DESTINATION /usr/include/applauncherd PERMISSIONS OWNER_READ GROUP_READ WORLD_READ) diff --git a/src/qdeclarativebooster/qdeclarativeboostercache.cpp b/src/qdeclarativebooster/mdeclarativecache.cpp similarity index 81% rename from src/qdeclarativebooster/qdeclarativeboostercache.cpp rename to src/qdeclarativebooster/mdeclarativecache.cpp index ebaeb66..4e6a67f 100644 --- a/src/qdeclarativebooster/qdeclarativeboostercache.cpp +++ b/src/qdeclarativebooster/mdeclarativecache.cpp @@ -19,18 +19,18 @@ #include #include -#include "qdeclarativeboostercache.h" -#include "qdeclarativeboostercache_p.h" +#include "mdeclarativecache.h" +#include "mdeclarativecache_p.h" #ifdef Q_WS_X11 #include #include #endif -QDeclarativeBoosterCachePrivate * const QDeclarativeBoosterCache::d_ptr = new QDeclarativeBoosterCachePrivate; -const int QDeclarativeBoosterCachePrivate::ARGV_LIMIT = 32; +MDeclarativeCachePrivate * const MDeclarativeCache::d_ptr = new MDeclarativeCachePrivate; +const int MDeclarativeCachePrivate::ARGV_LIMIT = 32; -QDeclarativeBoosterCachePrivate::QDeclarativeBoosterCachePrivate() : +MDeclarativeCachePrivate::MDeclarativeCachePrivate() : qApplicationInstance(0), qDeclarativeViewInstance(0), initialArgc(ARGV_LIMIT), @@ -38,17 +38,17 @@ QDeclarativeBoosterCachePrivate::QDeclarativeBoosterCachePrivate() : { } -QDeclarativeBoosterCachePrivate::~QDeclarativeBoosterCachePrivate() +MDeclarativeCachePrivate::~MDeclarativeCachePrivate() { delete qDeclarativeViewInstance; delete[] initialArgv; } -void QDeclarativeBoosterCachePrivate::populate() +void MDeclarativeCachePrivate::populate() { static const char *const emptyString = ""; - static const char *const appNameFormat = "qdeclarativeboostercache_pre_initialized_qapplication%d"; + static const char *const appNameFormat = "mdeclarativecache_pre_initialized_qapplication%d"; static char appName[strlen(appNameFormat) + 8]; // Append pid to appName to make it unique. This is required because the @@ -57,7 +57,7 @@ void QDeclarativeBoosterCachePrivate::populate() sprintf(appName, appNameFormat, getpid()); // We support at most ARGV_LIMIT arguments in QCoreApplication. These will be set when real - // arguments are known (in QDeclarativeBoosterCachePrivate::qApplication). + // arguments are known (in MDeclarativeCachePrivate::qApplication). initialArgv[0] = const_cast(appName); for (int i = 1; i < initialArgc; i++) { initialArgv[i] = const_cast(emptyString); @@ -75,7 +75,7 @@ void QDeclarativeBoosterCachePrivate::populate() qDeclarativeViewInstance = new QDeclarativeView(); } -QApplication* QDeclarativeBoosterCachePrivate::qApplication(int &argc, char **argv) +QApplication* MDeclarativeCachePrivate::qApplication(int &argc, char **argv) { if (qApplicationInstance == 0) { qApplicationInstance = new QApplication(argc, argv); @@ -121,7 +121,7 @@ QApplication* QDeclarativeBoosterCachePrivate::qApplication(int &argc, char **ar return qApplicationInstance; } -QDeclarativeView* QDeclarativeBoosterCachePrivate::qDeclarativeView() +QDeclarativeView* MDeclarativeCachePrivate::qDeclarativeView() { QDeclarativeView *returnValue; if (qDeclarativeViewInstance != 0) { @@ -133,17 +133,17 @@ QDeclarativeView* QDeclarativeBoosterCachePrivate::qDeclarativeView() return returnValue; } -void QDeclarativeBoosterCache::populate() +void MDeclarativeCache::populate() { d_ptr->populate(); } -QApplication* QDeclarativeBoosterCache::qApplication(int &argc, char **argv) +QApplication* MDeclarativeCache::qApplication(int &argc, char **argv) { return d_ptr->qApplication(argc, argv); } -QDeclarativeView* QDeclarativeBoosterCache::qDeclarativeView() +QDeclarativeView* MDeclarativeCache::qDeclarativeView() { return d_ptr->qDeclarativeView(); } diff --git a/src/qdeclarativebooster/qdeclarativeboostercache.h b/src/qdeclarativebooster/mdeclarativecache.h similarity index 73% rename from src/qdeclarativebooster/qdeclarativeboostercache.h rename to src/qdeclarativebooster/mdeclarativecache.h index 96feb15..203214e 100644 --- a/src/qdeclarativebooster/qdeclarativeboostercache.h +++ b/src/qdeclarativebooster/mdeclarativecache.h @@ -17,26 +17,26 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEBOOSTERCACHE_H -#define QDECLARATIVEBOOSTERCACHE_H +#ifndef MDECLARATIVECACHE_H +#define MDECLARATIVECACHE_H -class QDeclarativeBoosterCachePrivate; +class MDeclarativeCachePrivate; class QApplication; class QDeclarativeView; /*! - * \class QDeclarativeBoosterCache. + * \class MDeclarativeCache. * \brief Cache class for QDeclarativeBooster. */ -class QDeclarativeBoosterCache +class MDeclarativeCache { public: //! Constructor. - QDeclarativeBoosterCache() {}; + MDeclarativeCache() {}; //! Destructor. - virtual ~QDeclarativeBoosterCache() {}; + virtual ~MDeclarativeCache() {}; //! Populate cache with QApplication and QDeclarativeView static void populate(); @@ -55,20 +55,20 @@ public: protected: - static QDeclarativeBoosterCachePrivate* const d_ptr; + static MDeclarativeCachePrivate* const d_ptr; private: //! Disable copy-constructor - QDeclarativeBoosterCache(const QDeclarativeBoosterCache & r); + MDeclarativeCache(const MDeclarativeCache & r); //! Disable assignment operator - QDeclarativeBoosterCache & operator= (const QDeclarativeBoosterCache & r); + MDeclarativeCache & operator= (const MDeclarativeCache & r); #ifdef UNIT_TEST - friend class Ut_QDeclarativeBoosterCache; + friend class Ut_MDeclarativeCache; #endif }; -#endif //QDECLARATIVEBOOSTERCACHE_H +#endif //MDECLARATIVECACHE_H diff --git a/src/qdeclarativebooster/qdeclarativeboostercache_p.h b/src/qdeclarativebooster/mdeclarativecache_p.h similarity index 77% rename from src/qdeclarativebooster/qdeclarativeboostercache_p.h rename to src/qdeclarativebooster/mdeclarativecache_p.h index 0b5474c..ad5d4ca 100644 --- a/src/qdeclarativebooster/qdeclarativeboostercache_p.h +++ b/src/qdeclarativebooster/mdeclarativecache_p.h @@ -17,18 +17,18 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEBOOSTERCACHE_P_H -#define QDECLARATIVEBOOSTERCACHE_P_H +#ifndef MDECLARATIVECACHE_P_H +#define MDECLARATIVECACHE_P_H -class QDeclarativeBoosterCache; +class MDeclarativeCache; class QApplication; class QDeclarativeView; -class QDeclarativeBoosterCachePrivate +class MDeclarativeCachePrivate { public: - QDeclarativeBoosterCachePrivate(); - virtual ~QDeclarativeBoosterCachePrivate(); + MDeclarativeCachePrivate(); + virtual ~MDeclarativeCachePrivate(); void populate(); QApplication* qApplication(int &argc, char **argv); QDeclarativeView* qDeclarativeView(); @@ -40,8 +40,8 @@ public: char **initialArgv; #ifdef UNIT_TEST - friend class Ut_QDeclarativeBoosterCache; + friend class Ut_MDeclarativeCache; #endif }; -#endif // QDECLARATIVEBOOSTERCACHE_P_H +#endif // MDECLARATIVECACHE_P_H diff --git a/src/qdeclarativebooster/qdeclarativebooster.cpp b/src/qdeclarativebooster/qdeclarativebooster.cpp index d4aa67c..8a31678 100644 --- a/src/qdeclarativebooster/qdeclarativebooster.cpp +++ b/src/qdeclarativebooster/qdeclarativebooster.cpp @@ -18,7 +18,7 @@ ****************************************************************************/ #include "qdeclarativebooster.h" -#include "qdeclarativeboostercache.h" +#include "mdeclarativecache.h" const string QDeclarativeBooster::m_socketId = "/tmp/boostd"; const string QDeclarativeBooster::m_temporaryProcessName = "booster-d"; @@ -50,6 +50,6 @@ char QDeclarativeBooster::type() bool QDeclarativeBooster::preload() { - QDeclarativeBoosterCache::populate(); + MDeclarativeCache::populate(); return true; } diff --git a/tests/Common/TestApps/fala_qml_helloworld/main.cpp b/tests/Common/TestApps/fala_qml_helloworld/main.cpp index 76fe6a4..0479c1b 100644 --- a/tests/Common/TestApps/fala_qml_helloworld/main.cpp +++ b/tests/Common/TestApps/fala_qml_helloworld/main.cpp @@ -20,7 +20,7 @@ #include #include #include -#include "qdeclarativeboostercache.h" +#include "mdeclarativecache.h" void FANGORNLOG(const char* s) { @@ -45,10 +45,10 @@ Q_DECL_EXPORT int main(int argc, char **argv) { timestamp("application main"); - QApplication *app = QDeclarativeBoosterCache::qApplication(argc, argv); + QApplication *app = MDeclarativeCache::qApplication(argc, argv); timestamp("QApplication from cache"); - QDeclarativeView *window = QDeclarativeBoosterCache::qDeclarativeView(); + QDeclarativeView *window = MDeclarativeCache::qDeclarativeView(); timestamp("QDeclarativeView from cache"); window->setWindowTitle("Applauncherd QML testapp"); diff --git a/tests/Common/unittests/ut_dbooster/CMakeLists.txt b/tests/Common/unittests/ut_dbooster/CMakeLists.txt index 99011bb..9cf69f0 100644 --- a/tests/Common/unittests/ut_dbooster/CMakeLists.txt +++ b/tests/Common/unittests/ut_dbooster/CMakeLists.txt @@ -19,7 +19,7 @@ set(QT_USE_QTTEST TRUE) # Set include paths include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/src/common ${LAUNCHER} ${DBOOSTER}) -link_libraries(${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} ${MEEGOTOUCH_LIBRARIES} ${LIBCREDS} "-L${CMAKE_SOURCE_DIR}/src/qdeclarativebooster -lqdeclarativeboostercache") +link_libraries(${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} ${MEEGOTOUCH_LIBRARIES} ${LIBCREDS} "-L${CMAKE_SOURCE_DIR}/src/qdeclarativebooster -lmdeclarativecache") # Enable Qt (may not be needed, because already defined on higher level) include(${QT_USE_FILE}) diff --git a/tests/Common/unittests/ut_dbooster/ut_dbooster.cpp b/tests/Common/unittests/ut_dbooster/ut_dbooster.cpp index 2981f5e..2858eb4 100644 --- a/tests/Common/unittests/ut_dbooster/ut_dbooster.cpp +++ b/tests/Common/unittests/ut_dbooster/ut_dbooster.cpp @@ -19,7 +19,7 @@ #include "ut_dbooster.h" #include "qdeclarativebooster.h" -#include "qdeclarativeboostercache.h" +#include "mdeclarativecache.h" Ut_DBooster::Ut_DBooster() : m_subject(new QDeclarativeBooster) @@ -53,8 +53,8 @@ void Ut_DBooster::testPreload() const char * argv[] = {"foo"}; int argc = 1; - QVERIFY(QDeclarativeBoosterCache::qApplication(argc, const_cast(argv))); - QVERIFY(QDeclarativeBoosterCache::qDeclarativeView()); + QVERIFY(MDeclarativeCache::qApplication(argc, const_cast(argv))); + QVERIFY(MDeclarativeCache::qDeclarativeView()); } QTEST_APPLESS_MAIN(Ut_DBooster);