on xenial help sign in
add some debug facilities to DBus
commit555821da0b7cfbe2351cb615f4abdbca10176d81 authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 30 Jun 2016, 17:01 (10 years ago) parenta189f76
4 files changed+18−2
src/CMakeLists.txt+7−1 src/ShellApplication.cpp+2 tests/uqmlscene/CMakeLists.txt+5−1 tests/uqmlscene/main.cpp+4
src/CMakeLists.txt+7−1
@@ -3,9 +3,14 @@ pkg_check_modules(CONNECTIVITY REQUIRED connectivity-qt1)
33include_directories(
44 SYSTEM
55 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
6+ ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
67 ${CONNECTIVITY_INCLUDE_DIRS}
78)
89
10+include_directories(
11+ ${libunity8-private_SOURCE_DIR}
12+)
13+
914file(GLOB_RECURSE QML_FILES
1015 ${CMAKE_SOURCE_DIR}/qml/*
1116 ${CMAKE_SOURCE_DIR}/tests/*.qml
@@ -25,6 +30,7 @@ set(SOURCE_FILES
2530 ShellView.cpp
2631 UnityCommandLineParser.cpp
2732 UnixSignalHandler.cpp
33+ DebuggingController.cpp
2834 ${QML_FILES} # This is to make qml and image files appear in the IDE's project tree
2935)
3036
@@ -39,7 +45,7 @@ qt5_use_modules(${SHELL_APP} DBus Gui Qml Quick Test)
3945if (NOT "${ANDROID_PROPERTIES_INCLUDE_DIRS}" STREQUAL "")
4046 set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${ANDROID_PROPERTIES_INCLUDE_DIRS})
4147endif()
42−target_link_libraries(${SHELL_APP} ${ANDROID_PROPERTIES_LDFLAGS} UbuntuGestures connectivity-qt1)
48+target_link_libraries(${SHELL_APP} ${ANDROID_PROPERTIES_LDFLAGS} UbuntuGestures connectivity-qt1 unity8-private)
4349
4450if (ENABLE_TOUCH_EMULATION)
4551 target_link_libraries(${SHELL_APP} ${MOUSETOUCHADAPTOR_LIBS_LDFLAGS})
src/ShellApplication.cpp+2
@@ -29,6 +29,7 @@
2929#include <paths.h>
3030#include "CachingNetworkManagerFactory.h"
3131#include "UnityCommandLineParser.h"
32+#include "DebuggingController.h"
3233
3334ShellApplication::ShellApplication(int & argc, char ** argv, bool isMirServer)
3435 : QGuiApplication(argc, argv)
@@ -93,6 +94,7 @@ ShellApplication::ShellApplication(int & argc, char ** argv, bool isMirServer)
9394 }
9495 #endif
9596
97+ new DebuggingController(this);
9698
9799 // Some hard-coded policy for now.
98100 // NB: We don't support more than two screens at the moment
tests/uqmlscene/CMakeLists.txt+5−1
@@ -1,16 +1,19 @@
11add_executable(uqmlscene
22 ${shellapplication_MOC_SRCS}
33 main.cpp
4+ ${CMAKE_SOURCE_DIR}/src/DebuggingController.cpp
45 )
56
6−qt5_use_modules(uqmlscene Qml Quick Test)
7+qt5_use_modules(uqmlscene Qml Quick Test DBus)
78pkg_check_modules(XCB REQUIRED xcb)
89
910include_directories(
1011 ${CMAKE_CURRENT_BINARY_DIR}
1112 ${CMAKE_SOURCE_DIR}/src
13+ ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
1214 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
1315 ${CMAKE_SOURCE_DIR}/libs/UbuntuGestures
16+ ${libunity8-private_SOURCE_DIR}
1417)
1518
1619if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
@@ -22,4 +25,5 @@ target_link_libraries(uqmlscene
2225 ${Qt5Quick_LIBRARIES}
2326 ${XCB_LDFLAGS}
2427 UbuntuGestures
28+ unity8-private
2529 )
tests/uqmlscene/main.cpp+4
@@ -63,6 +63,8 @@
6363#include <QtCore/QTranslator>
6464#include <QtCore/QLibraryInfo>
6565
66+#include "DebuggingController.h"
67+
6668#ifdef QML_RUNTIME_TESTING
6769class RenderStatistics
6870{
@@ -466,6 +468,8 @@ int main(int argc, char ** argv)
466468
467469 int exitCode = 0;
468470
471+ new DebuggingController(&app);
472+
469473 if (!options.file.isEmpty()) {
470474 if (!options.versionDetection || checkVersion(options.file)) {
471475#ifndef QT_NO_TRANSLATION