on xenial help sign in
add some debug facilities to DBus
555821dMichael Zanetti
src/CMakeLists.txt+7−1
@@ -3,9 +3,14 @@ pkg_check_modules(CONNECTIVITY REQUIRED connectivity-qt1)
3include_directories(
3include_directories(
4 SYSTEM
4 SYSTEM
5 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
5 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
6+ ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
6 ${CONNECTIVITY_INCLUDE_DIRS}
7 ${CONNECTIVITY_INCLUDE_DIRS}
7)
8)
8
9
10+include_directories(
11+ ${libunity8-private_SOURCE_DIR}
12+)
13+
9file(GLOB_RECURSE QML_FILES
14file(GLOB_RECURSE QML_FILES
10 ${CMAKE_SOURCE_DIR}/qml/*
15 ${CMAKE_SOURCE_DIR}/qml/*
11 ${CMAKE_SOURCE_DIR}/tests/*.qml
16 ${CMAKE_SOURCE_DIR}/tests/*.qml
@@ -25,6 +30,7 @@ set(SOURCE_FILES
25 ShellView.cpp
30 ShellView.cpp
26 UnityCommandLineParser.cpp
31 UnityCommandLineParser.cpp
27 UnixSignalHandler.cpp
32 UnixSignalHandler.cpp
33+ DebuggingController.cpp
28 ${QML_FILES} # This is to make qml and image files appear in the IDE's project tree
34 ${QML_FILES} # This is to make qml and image files appear in the IDE's project tree
29)
35)
30
36
@@ -39,7 +45,7 @@ qt5_use_modules(${SHELL_APP} DBus Gui Qml Quick Test)
39if (NOT "${ANDROID_PROPERTIES_INCLUDE_DIRS}" STREQUAL "")
45if (NOT "${ANDROID_PROPERTIES_INCLUDE_DIRS}" STREQUAL "")
40 set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${ANDROID_PROPERTIES_INCLUDE_DIRS})
46 set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${ANDROID_PROPERTIES_INCLUDE_DIRS})
41endif()
47endif()
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)
43
49
44if (ENABLE_TOUCH_EMULATION)
50if (ENABLE_TOUCH_EMULATION)
45 target_link_libraries(${SHELL_APP} ${MOUSETOUCHADAPTOR_LIBS_LDFLAGS})
51 target_link_libraries(${SHELL_APP} ${MOUSETOUCHADAPTOR_LIBS_LDFLAGS})
src/ShellApplication.cpp+2
@@ -29,6 +29,7 @@
29#include <paths.h>
29#include <paths.h>
30#include "CachingNetworkManagerFactory.h"
30#include "CachingNetworkManagerFactory.h"
31#include "UnityCommandLineParser.h"
31#include "UnityCommandLineParser.h"
32+#include "DebuggingController.h"
32
33
33ShellApplication::ShellApplication(int & argc, char ** argv, bool isMirServer)
34ShellApplication::ShellApplication(int & argc, char ** argv, bool isMirServer)
34 : QGuiApplication(argc, argv)
35 : QGuiApplication(argc, argv)
@@ -93,6 +94,7 @@ ShellApplication::ShellApplication(int & argc, char ** argv, bool isMirServer)
93 }
94 }
94 #endif
95 #endif
95
96
97+ new DebuggingController(this);
96
98
97 // Some hard-coded policy for now.
99 // Some hard-coded policy for now.
98 // NB: We don't support more than two screens at the moment
100 // NB: We don't support more than two screens at the moment
tests/uqmlscene/CMakeLists.txt+5−1
@@ -1,16 +1,19 @@
1add_executable(uqmlscene
1add_executable(uqmlscene
2 ${shellapplication_MOC_SRCS}
2 ${shellapplication_MOC_SRCS}
3 main.cpp
3 main.cpp
4+ ${CMAKE_SOURCE_DIR}/src/DebuggingController.cpp
4 )
5 )
5
6
6−qt5_use_modules(uqmlscene Qml Quick Test)
7+qt5_use_modules(uqmlscene Qml Quick Test DBus)
7pkg_check_modules(XCB REQUIRED xcb)
8pkg_check_modules(XCB REQUIRED xcb)
8
9
9include_directories(
10include_directories(
10 ${CMAKE_CURRENT_BINARY_DIR}
11 ${CMAKE_CURRENT_BINARY_DIR}
11 ${CMAKE_SOURCE_DIR}/src
12 ${CMAKE_SOURCE_DIR}/src
13+ ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
12 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
14 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
13 ${CMAKE_SOURCE_DIR}/libs/UbuntuGestures
15 ${CMAKE_SOURCE_DIR}/libs/UbuntuGestures
16+ ${libunity8-private_SOURCE_DIR}
14)
17)
15
18
16if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
19if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
@@ -22,4 +25,5 @@ target_link_libraries(uqmlscene
22 ${Qt5Quick_LIBRARIES}
25 ${Qt5Quick_LIBRARIES}
23 ${XCB_LDFLAGS}
26 ${XCB_LDFLAGS}
24 UbuntuGestures
27 UbuntuGestures
28+ unity8-private
25 )
29 )
tests/uqmlscene/main.cpp+4
@@ -63,6 +63,8 @@
63#include <QtCore/QTranslator>
63#include <QtCore/QTranslator>
64#include <QtCore/QLibraryInfo>
64#include <QtCore/QLibraryInfo>
65
65
66+#include "DebuggingController.h"
67+
66#ifdef QML_RUNTIME_TESTING
68#ifdef QML_RUNTIME_TESTING
67class RenderStatistics
69class RenderStatistics
68{
70{
@@ -466,6 +468,8 @@ int main(int argc, char ** argv)
466
468
467 int exitCode = 0;
469 int exitCode = 0;
468
470
471+ new DebuggingController(&app);
472+
469 if (!options.file.isEmpty()) {
473 if (!options.file.isEmpty()) {
470 if (!options.versionDetection || checkVersion(options.file)) {
474 if (!options.versionDetection || checkVersion(options.file)) {
471#ifndef QT_NO_TRANSLATION
475#ifndef QT_NO_TRANSLATION