Search
SailfishOS Open Build Service
>
Projects
>
zephyr
:
devel:mw
>
mapplauncherd
> qt5.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File qt5.patch of Package mapplauncherd
diff -ru mapplauncherd/CMakeLists.txt mapplauncherd-qt5/CMakeLists.txt --- mapplauncherd/CMakeLists.txt 2012-11-15 19:02:06.000000000 +0000 +++ mapplauncherd-qt5/CMakeLists.txt 2012-11-16 12:38:08.288160746 +0000 @@ -60,7 +60,7 @@ # Sub build: tests # This will build the HelloWorld test library, unit tests, functional tests # and performance tests - add_subdirectory(tests) +# add_subdirectory(tests) endif ($ENV{BUILD_TESTS}) # Target for documentation (make doc) diff -ru mapplauncherd/src/CMakeLists.txt mapplauncherd-qt5/src/CMakeLists.txt --- mapplauncherd/src/CMakeLists.txt 2012-11-15 19:02:06.000000000 +0000 +++ mapplauncherd-qt5/src/CMakeLists.txt 2012-11-16 12:38:08.302160617 +0000 @@ -16,6 +16,4 @@ # Sub build: qdeclarativebooster plugin add_subdirectory(qdeclarativebooster) -# Sub build: single-instance binary / library -add_subdirectory(single-instance) diff -ru mapplauncherd/src/launcher/launcher.c mapplauncherd-qt5/src/launcher/launcher.c --- mapplauncherd/src/launcher/launcher.c 2012-11-15 19:02:06.000000000 +0000 +++ mapplauncherd-qt5/src/launcher/launcher.c 2012-11-16 12:38:52.275753116 +0000 @@ -129,12 +129,13 @@ { // Exit if DISPLAY is missing. This would result in dying // boosters and applauncherd would keep on re-starting them. +#if 0 if (!getenv("DISPLAY")) { fprintf(stderr, "FATAL!!: DISPLAY environment variable not set.\n"); return EXIT_FAILURE; } - +#endif // Parse command line g_debugPrinting = 0; diff -ru mapplauncherd/src/launcherlib/booster.cpp mapplauncherd-qt5/src/launcherlib/booster.cpp --- mapplauncherd/src/launcherlib/booster.cpp 2012-11-15 19:02:06.000000000 +0000 +++ mapplauncherd-qt5/src/launcherlib/booster.cpp 2012-11-16 12:38:08.318160469 +0000 @@ -121,8 +121,10 @@ { if (!pluginEntry->lockFunc(m_appData->appName().c_str())) { +#if 0 // Set XErrorHandler to handle possible errors from X XErrorHandler oldHandler = XSetErrorHandler(Booster::handleXError); +#endif // Try to activate the window of the existing instance if (!pluginEntry->activateExistingInstanceFunc(m_appData->appName().c_str())) { @@ -136,8 +138,9 @@ m_connection->close(); // Return original XErrorHandler +#if 0 XSetErrorHandler(oldHandler); - +#endif // invoker requested to start an application that is already running // booster is not needed this time, let's wait for the next connection from invoker continue; diff -ru mapplauncherd/src/launcherlib/booster.h mapplauncherd-qt5/src/launcherlib/booster.h --- mapplauncherd/src/launcherlib/booster.h 2012-11-15 19:02:06.000000000 +0000 +++ mapplauncherd-qt5/src/launcherlib/booster.h 2012-11-16 12:38:08.325160403 +0000 @@ -21,7 +21,6 @@ #define BOOSTER_H #include "launcherlib.h" -#include <QX11Info> #include <cstdlib> #include <string> diff -ru mapplauncherd/src/qdeclarativebooster/CMakeLists.txt mapplauncherd-qt5/src/qdeclarativebooster/CMakeLists.txt --- mapplauncherd/src/qdeclarativebooster/CMakeLists.txt 2012-11-15 19:02:06.000000000 +0000 +++ mapplauncherd-qt5/src/qdeclarativebooster/CMakeLists.txt 2012-11-16 12:54:10.611290518 +0000 @@ -1,4 +1,3 @@ -include(FindX11) # Qt support include(${QT_USE_FILE}) @@ -14,6 +13,13 @@ set(MOC_HDRS eventhandler.h) qt4_wrap_cpp(MOC_SRC ${MOC_HDRS}) + +find_package(Qt5Core REQUIRED) +find_package(Qt5Quick1 REQUIRED) +find_package(Qt5Gui REQUIRED) +find_package(Qt5Widgets REQUIRED) +find_package(Qt5Concurrent REQUIRED) + # Set executables add_library(mdeclarativecache SHARED ${LIBSRC} ${MOC_SRC}) set_target_properties(mdeclarativecache PROPERTIES @@ -21,7 +27,7 @@ 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} "-L../launcherlib -lapplauncherd") +target_link_libraries(mdeclarativecache ${LIBDL} ${Qt5Core_LIBRARIES} ${Qt5Quick1_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Concurrent_LIBRARIES} "-L../launcherlib -lapplauncherd") add_dependencies(mdeclarativecache applauncherd) add_library(qdeclarativebooster MODULE ${PLUGINSRC}) @@ -30,6 +36,9 @@ target_link_libraries(qdeclarativebooster ${LIBDL} "-L. -lmdeclarativecache -L../launcherlib -lapplauncherd") add_dependencies(qdeclarativebooster applauncherd mdeclarativecache) +find_package(Qt5Core REQUIRED) +include_directories(${Qt5Core_PRIVATE_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS}) + # Add install rule install(TARGETS qdeclarativebooster DESTINATION /usr/lib/applauncherd/) install(TARGETS mdeclarativecache DESTINATION /usr/lib) diff -ru mapplauncherd/src/qdeclarativebooster/eventhandler.cpp mapplauncherd-qt5/src/qdeclarativebooster/eventhandler.cpp --- mapplauncherd/src/qdeclarativebooster/eventhandler.cpp 2012-11-15 19:02:06.000000000 +0000 +++ mapplauncherd-qt5/src/qdeclarativebooster/eventhandler.cpp 2012-11-16 12:38:08.327160385 +0000 @@ -1,5 +1,5 @@ -#include <QtConcurrentRun> -#include <QApplication> +#include <QtConcurrent/QtConcurrentRun> +#include <QtWidgets/QApplication> #include "eventhandler.h" #include "connection.h" diff -ru mapplauncherd/src/qdeclarativebooster/mdeclarativecache.cpp mapplauncherd-qt5/src/qdeclarativebooster/mdeclarativecache.cpp --- mapplauncherd/src/qdeclarativebooster/mdeclarativecache.cpp 2012-11-15 19:02:06.000000000 +0000 +++ mapplauncherd-qt5/src/qdeclarativebooster/mdeclarativecache.cpp 2012-11-16 12:38:08.328160376 +0000 @@ -17,13 +17,12 @@ ** ****************************************************************************/ -#include <Qt/QtDeclarative> -#include <QX11Info> +#include <QtQuick1/QtQuick1> #include <QtPlugin> #include <QPluginLoader> #include <QLibraryInfo> #include <QApplication> - +#include <private/qcoreapplication_p.h> #include "mdeclarativecache.h" #include "mdeclarativecache_p.h" @@ -90,6 +89,7 @@ } else { + QCoreApplicationPrivate *qap = static_cast<QCoreApplicationPrivate*>(QObjectPrivate::get(qApp)); if (argc > ARGV_LIMIT) { qWarning("MDeclarativeCache: QCoreApplication::arguments() will not contain all arguments."); @@ -98,7 +98,7 @@ // Copy arguments to QCoreApplication for (int i = 0; i < qMin(argc, ARGV_LIMIT); i++) { - qApp->argv()[i] = argv[i]; + qap->argv[i] = argv[i]; } // This changes argc in QCoreApplication diff -ru mapplauncherd/src/single-instance/CMakeLists.txt mapplauncherd-qt5/src/single-instance/CMakeLists.txt --- mapplauncherd/src/single-instance/CMakeLists.txt 2012-11-15 19:02:06.000000000 +0000 +++ mapplauncherd-qt5/src/single-instance/CMakeLists.txt 2012-11-16 12:38:08.328160376 +0000 @@ -5,7 +5,6 @@ # Find X11 include(FindPkgConfig) -pkg_check_modules(X11 x11 REQUIRED) # Set include dirs include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${X11_INCLUDE_DIRS} ${COMMON}) @@ -19,9 +18,6 @@ # Set C flags because of report.c set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fPIC") -# Set link libraries -link_libraries(${X11_LDFLAGS}) - # Set target add_executable(single-instance ${SRC}) diff -ru mapplauncherd/src/single-instance/main.cpp mapplauncherd-qt5/src/single-instance/main.cpp --- mapplauncherd/src/single-instance/main.cpp 2012-11-15 19:02:06.000000000 +0000 +++ mapplauncherd-qt5/src/single-instance/main.cpp 2012-11-16 12:38:08.330160356 +0000 @@ -317,6 +317,7 @@ //! Activate existing application DECL_EXPORT bool activateExistingInstance(const char * binaryName) { +#if 0 if (Display * dpy = XOpenDisplay(NULL)) { if (Window winId = windowIdForBinary(dpy, binaryName)) @@ -337,6 +338,8 @@ report(report_error, "Failed to open display!\n"); return false; } + return false; +#endif } }