Fixes: NB#257654 - QApplication::applicationDirPath() and QApplication::applicationFilePath() return wrong values for d-boosted applications

Details: Set application attribute Qt::AA_LinuxReinitPathsFromArgv0
         so that QCoreApplication::applicationFilePath() and
         QCoreApplication::applicationDirPath() work correctly
         for d-boosted applications.
RevBy: Alexey Shilov
pull/1/head
Pertti Kellomäki 15 years ago
parent 705b9f1d37
commit 9cda284174

1
debian/changelog vendored

@ -1,5 +1,6 @@
applauncherd (0.30.1) unstable; urgency=low
* Fixes: NB#257654 - QApplication::applicationDirPath() and QApplication::applicationFilePath() return wrong values for d-boosted applications
* Changes: New functional tests added to check testability library is loaded by booster-m and booster-d
* Changes: Deprecate MDeclarativeCache::applicationDirPath() and MDeclarativeCache::applicationFilePath().
* Changes: Modify test applications to use _exit().

@ -21,6 +21,9 @@ set(LIBSRC mdeclarativecache.cpp mdeclarativecache.h mdeclarativecache_p.h)
add_library(mdeclarativecache SHARED ${LIBSRC})
set_target_properties(mdeclarativecache PROPERTIES
VERSION 0.1 SOVERSION 0)
if ($ENV{HARMATTAN})
set_target_properties(mdeclarativecache PROPERTIES COMPILE_FLAGS -DHAVE_PATH_REINIT)
endif ($ENV{HARMATTAN})
target_link_libraries(mdeclarativecache ${LIBDL} ${QT_QTCORE_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTGUI_LIBRARY} ${X11_LIBRARIES})
add_library(qdeclarativebooster MODULE ${PLUGINSRC} ${MOC_SRC})

@ -182,6 +182,11 @@ QApplication* MDeclarativeCachePrivate::qApplication(int &argc, char **argv)
__gcov_flush();
#endif
#ifdef HAVE_PATH_REINIT
// Set the magic attribute so that paths are reinitialized
qApplicationInstance->setAttribute(Qt::AA_LinuxReinitPathsFromArgv0, true);
#endif
return qApplicationInstance;
}

Loading…
Cancel
Save