Merge lp:~aacid/qtmir/system_includes into lp:qtmir
- system_includes
- Merge into trunk
Proposed by
Albert Astals Cid
Status: | Superseded |
---|---|
Proposed branch: | lp:~aacid/qtmir/system_includes |
Merge into: | lp:qtmir |
Diff against target: |
1237 lines (+304/-75) 36 files modified
CMakeLists.txt (+12/-7) debian/changelog (+25/-0) debian/control (+1/-1) demos/qml-demo-client/CMakeLists.txt (+3/-6) demos/qml-demo-shell/CMakeLists.txt (+3/-6) src/common/debughelpers.cpp (+1/-0) src/modules/Unity/Application/CMakeLists.txt (+6/-2) src/modules/Unity/Application/application.cpp (+16/-12) src/modules/Unity/Application/application.h (+5/-4) src/modules/Unity/Application/mirsurfacelistmodel.cpp (+30/-4) src/modules/Unity/Application/mirsurfacelistmodel.h (+3/-0) src/modules/Unity/Application/session.cpp (+21/-22) src/modules/Unity/Application/sessionmanager.h (+0/-1) src/modules/Unity/Application/ubuntukeyboardinfo.cpp (+2/-0) src/modules/Unity/Application/upstart/taskcontroller.cpp (+2/-2) src/modules/Unity/Screens/CMakeLists.txt (+4/-0) src/platforms/mirserver/CMakeLists.txt (+5/-0) src/platforms/mirserver/mirwindowmanager.cpp (+1/-1) tests/framework/CMakeLists.txt (+5/-1) tests/framework/mock_mir_session.cpp (+1/-0) tests/mirserver/Clipboard/CMakeLists.txt (+4/-0) tests/mirserver/QtEventFeeder/CMakeLists.txt (+4/-0) tests/mirserver/QtEventFeeder/mock_qtwindowsystem.h (+12/-1) tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp (+2/-2) tests/mirserver/Screen/CMakeLists.txt (+4/-0) tests/mirserver/ScreensModel/CMakeLists.txt (+4/-0) tests/mirserver/ScreensModel/screensmodel_test.cpp (+1/-0) tests/mirserver/WindowManager/CMakeLists.txt (+4/-0) tests/modules/Application/CMakeLists.txt (+4/-1) tests/modules/Application/application_test.cpp (+32/-0) tests/modules/ApplicationManager/CMakeLists.txt (+5/-1) tests/modules/ApplicationManager/application_manager_test.cpp (+64/-0) tests/modules/SessionManager/CMakeLists.txt (+5/-1) tests/modules/SessionManager/session_test.cpp (+5/-0) tests/modules/SharedWakelock/CMakeLists.txt (+4/-0) tests/modules/SurfaceManager/CMakeLists.txt (+4/-0) |
To merge this branch: | bzr merge lp:~aacid/qtmir/system_includes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir development team | Pending | ||
Review via email: mp+296597@code.launchpad.net |
This proposal has been superseded by a proposal from 2016-06-06.
Commit message
Mark system includes as such
Description of the change
* Are there any related MPs required for this MP to build/function as expected?
Prereq
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
To post a comment you must log in.
lp:~aacid/qtmir/system_includes
updated
- 519. By Albert Astals Cid
-
spacing++
- 520. By Albert Astals Cid
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2016-05-18 20:56:14 +0000 | |||
3 | +++ CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
4 | @@ -13,6 +13,13 @@ | |||
5 | 13 | # Find includes in corresponding build directories | 13 | # Find includes in corresponding build directories |
6 | 14 | set(CMAKE_INCLUDE_CURRENT_DIR ON) | 14 | set(CMAKE_INCLUDE_CURRENT_DIR ON) |
7 | 15 | 15 | ||
8 | 16 | find_package (ECM 1.7.0 QUIET NO_MODULE) | ||
9 | 17 | if (ECM_FOUND) | ||
10 | 18 | # Provides us with -DECM_ENABLE_SANITIZERS='X' | ||
11 | 19 | # Where X can be address, thread, memory, leak, undefined | ||
12 | 20 | include("${ECM_MODULE_DIR}/ECMEnableSanitizers.cmake") | ||
13 | 21 | endif() | ||
14 | 22 | |||
15 | 16 | # add custom cmake modules | 23 | # add custom cmake modules |
16 | 17 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) | 24 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) |
17 | 18 | 25 | ||
18 | @@ -76,23 +83,21 @@ | |||
19 | 76 | pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt) | 83 | pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt) |
20 | 77 | pkg_check_modules(QTDBUSTEST libqtdbustest-1 REQUIRED) | 84 | pkg_check_modules(QTDBUSTEST libqtdbustest-1 REQUIRED) |
21 | 78 | pkg_check_modules(QTDBUSMOCK libqtdbusmock-1 REQUIRED) | 85 | pkg_check_modules(QTDBUSMOCK libqtdbusmock-1 REQUIRED) |
23 | 79 | pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=17) | 86 | pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=18) |
24 | 80 | 87 | ||
26 | 81 | include_directories(${APPLICATION_API_INCLUDE_DIRS}) | 88 | include_directories(SYSTEM ${APPLICATION_API_INCLUDE_DIRS}) |
27 | 82 | 89 | ||
28 | 83 | add_definitions(-DMIR_REQUIRE_DEPRECATED_EVENT_OPT_IN=1) | 90 | add_definitions(-DMIR_REQUIRE_DEPRECATED_EVENT_OPT_IN=1) |
29 | 84 | 91 | ||
30 | 85 | # Use the fast string builder | 92 | # Use the fast string builder |
31 | 86 | add_definitions(-DQT_USE_QSTRINGBUILDER) | 93 | add_definitions(-DQT_USE_QSTRINGBUILDER) |
32 | 87 | 94 | ||
33 | 88 | include_directories( ${APPLICATION_API_INCLUDE_DIRS} ) | ||
34 | 89 | |||
35 | 90 | # We expect this to be set via debian/rules for GLES builds | 95 | # We expect this to be set via debian/rules for GLES builds |
36 | 91 | if ("${USE_OPENGLES}" STREQUAL 1) | 96 | if ("${USE_OPENGLES}" STREQUAL 1) |
37 | 92 | message(STATUS "Qt5 determined to be compiled with GLES support") | 97 | message(STATUS "Qt5 determined to be compiled with GLES support") |
38 | 93 | pkg_check_modules(GLESv2 glesv2) | 98 | pkg_check_modules(GLESv2 glesv2) |
39 | 94 | add_definitions(-DQT_USING_GLES) | 99 | add_definitions(-DQT_USING_GLES) |
41 | 95 | include_directories (${GLESv2_INCLUDE_DIRS}) | 100 | include_directories (SYSTEM ${GLESv2_INCLUDE_DIRS}) |
42 | 96 | set (GL_LIBRARIES "${GLESv2_LIBRARIES}") | 101 | set (GL_LIBRARIES "${GLESv2_LIBRARIES}") |
43 | 97 | # Because qt/gl and qt/gles are not parallel installable we have a difficulty | 102 | # Because qt/gl and qt/gles are not parallel installable we have a difficulty |
44 | 98 | # building qtmir-desktop on armhf. We would like to link against opengl and bind the | 103 | # building qtmir-desktop on armhf. We would like to link against opengl and bind the |
45 | @@ -103,13 +108,13 @@ | |||
46 | 103 | message(STATUS "Linking against OpenGL ES but binding OpenGL API") | 108 | message(STATUS "Linking against OpenGL ES but binding OpenGL API") |
47 | 104 | pkg_check_modules(GLESv2 glesv2) | 109 | pkg_check_modules(GLESv2 glesv2) |
48 | 105 | add_definitions(-DQT_USING_GL) | 110 | add_definitions(-DQT_USING_GL) |
50 | 106 | include_directories (${GLESv2_INCLUDE_DIRS}) | 111 | include_directories (SYSTEM ${GLESv2_INCLUDE_DIRS}) |
51 | 107 | set (GL_LIBRARIES "${GLESv2_LIBRARIES}") | 112 | set (GL_LIBRARIES "${GLESv2_LIBRARIES}") |
52 | 108 | else() | 113 | else() |
53 | 109 | message(STATUS "Qt5 determined to be compiled with OpenGL support") | 114 | message(STATUS "Qt5 determined to be compiled with OpenGL support") |
54 | 110 | pkg_check_modules(GL gl) | 115 | pkg_check_modules(GL gl) |
55 | 111 | add_definitions(-DQT_USING_OPENGL) | 116 | add_definitions(-DQT_USING_OPENGL) |
57 | 112 | include_directories (${GL_INCLUDE_DIRS}) | 117 | include_directories (SYSTEM ${GL_INCLUDE_DIRS}) |
58 | 113 | endif() | 118 | endif() |
59 | 114 | 119 | ||
60 | 115 | # Standard install paths | 120 | # Standard install paths |
61 | 116 | 121 | ||
62 | === modified file 'debian/changelog' | |||
63 | --- debian/changelog 2016-05-25 13:54:56 +0000 | |||
64 | +++ debian/changelog 2016-06-06 19:37:34 +0000 | |||
65 | @@ -1,3 +1,28 @@ | |||
66 | 1 | qtmir (0.4.8+16.10.20160606.1-0ubuntu1) yakkety; urgency=medium | ||
67 | 2 | |||
68 | 3 | [ Albert Astals Cid ] | ||
69 | 4 | * Add support for compiler sanitizers via ECM | ||
70 | 5 | * Compile with -fsanitize=undefined | ||
71 | 6 | * Fix leak in ScreensModelTest (LP: #1585502) | ||
72 | 7 | * Fix leak in SessionManager test (LP: #1585498) | ||
73 | 8 | * Remove unused m_sessions member | ||
74 | 9 | * Add missing breaks | ||
75 | 10 | * Initialize m_lastX and m_lastY | ||
76 | 11 | * Initialize m_sessionId | ||
77 | 12 | * Give the locker a name | ||
78 | 13 | * Fix memory leak in QtEventFeederTest (LP: #1585503) | ||
79 | 14 | * Fix leaks in application_manager_test (LP: #1585501) | ||
80 | 15 | |||
81 | 16 | [ Daniel d'Andrada ] | ||
82 | 17 | * Improve Session debug logging | ||
83 | 18 | * MirSurfaceListModel: prepending a surface always causes | ||
84 | 19 | firstChanged() emission | ||
85 | 20 | |||
86 | 21 | [ Michael Zanetti ] | ||
87 | 22 | * Adding ApplicationInfo::surfaceCount property | ||
88 | 23 | |||
89 | 24 | -- MichaĆ Sawicz <michal.sawicz@canonical.com> Mon, 06 Jun 2016 15:45:57 +0000 | ||
90 | 25 | |||
91 | 1 | qtmir (0.4.8+16.10.20160525.2-0ubuntu1) yakkety; urgency=medium | 26 | qtmir (0.4.8+16.10.20160525.2-0ubuntu1) yakkety; urgency=medium |
92 | 2 | 27 | ||
93 | 3 | [ Alan Griffiths ] | 28 | [ Alan Griffiths ] |
94 | 4 | 29 | ||
95 | === modified file 'debian/control' | |||
96 | --- debian/control 2016-05-18 20:56:14 +0000 | |||
97 | +++ debian/control 2016-06-06 19:37:34 +0000 | |||
98 | @@ -22,7 +22,7 @@ | |||
99 | 22 | libubuntu-app-launch2-dev (>= 0.9), | 22 | libubuntu-app-launch2-dev (>= 0.9), |
100 | 23 | libubuntu-application-api-dev (>= 2.1.0), | 23 | libubuntu-application-api-dev (>= 2.1.0), |
101 | 24 | libudev-dev, | 24 | libudev-dev, |
103 | 25 | libunity-api-dev (>= 7.113), | 25 | libunity-api-dev (>= 7.114), |
104 | 26 | liburl-dispatcher1-dev, | 26 | liburl-dispatcher1-dev, |
105 | 27 | libxkbcommon-dev, | 27 | libxkbcommon-dev, |
106 | 28 | libxrender-dev, | 28 | libxrender-dev, |
107 | 29 | 29 | ||
108 | === modified file 'demos/qml-demo-client/CMakeLists.txt' | |||
109 | --- demos/qml-demo-client/CMakeLists.txt 2015-09-01 16:16:47 +0000 | |||
110 | +++ demos/qml-demo-client/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
111 | @@ -2,19 +2,16 @@ | |||
112 | 2 | configure_file(${DEMO_CLIENT}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${DEMO_CLIENT}.desktop @ONLY) | 2 | configure_file(${DEMO_CLIENT}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${DEMO_CLIENT}.desktop @ONLY) |
113 | 3 | 3 | ||
114 | 4 | include_directories( | 4 | include_directories( |
115 | 5 | SYSTEM | ||
116 | 5 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} | 6 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
117 | 7 | ${Qt5Qml_PRIVATE_INCLUDE_DIRS} | ||
118 | 8 | ${Qt5Quick_PRIVATE_INCLUDE_DIRS} | ||
119 | 6 | ) | 9 | ) |
120 | 7 | 10 | ||
121 | 8 | add_executable(${DEMO_CLIENT} | 11 | add_executable(${DEMO_CLIENT} |
122 | 9 | main.cpp | 12 | main.cpp |
123 | 10 | ) | 13 | ) |
124 | 11 | 14 | ||
125 | 12 | include_directories( | ||
126 | 13 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} | ||
127 | 14 | ${Qt5Qml_PRIVATE_INCLUDE_DIRS} | ||
128 | 15 | ${Qt5Quick_PRIVATE_INCLUDE_DIRS} | ||
129 | 16 | ) | ||
130 | 17 | |||
131 | 18 | target_link_libraries( | 15 | target_link_libraries( |
132 | 19 | ${DEMO_CLIENT} | 16 | ${DEMO_CLIENT} |
133 | 20 | Qt5::Core | 17 | Qt5::Core |
134 | 21 | 18 | ||
135 | === modified file 'demos/qml-demo-shell/CMakeLists.txt' | |||
136 | --- demos/qml-demo-shell/CMakeLists.txt 2015-09-01 16:16:47 +0000 | |||
137 | +++ demos/qml-demo-shell/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
138 | @@ -1,19 +1,16 @@ | |||
139 | 1 | set(DEMO_SHELL qtmir-demo-shell) | 1 | set(DEMO_SHELL qtmir-demo-shell) |
140 | 2 | 2 | ||
141 | 3 | include_directories( | 3 | include_directories( |
142 | 4 | SYSTEM | ||
143 | 4 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} | 5 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
144 | 6 | ${Qt5Qml_PRIVATE_INCLUDE_DIRS} | ||
145 | 7 | ${Qt5Quick_PRIVATE_INCLUDE_DIRS} | ||
146 | 5 | ) | 8 | ) |
147 | 6 | 9 | ||
148 | 7 | add_executable(${DEMO_SHELL} | 10 | add_executable(${DEMO_SHELL} |
149 | 8 | main.cpp | 11 | main.cpp |
150 | 9 | ) | 12 | ) |
151 | 10 | 13 | ||
152 | 11 | include_directories( | ||
153 | 12 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} | ||
154 | 13 | ${Qt5Qml_PRIVATE_INCLUDE_DIRS} | ||
155 | 14 | ${Qt5Quick_PRIVATE_INCLUDE_DIRS} | ||
156 | 15 | ) | ||
157 | 16 | |||
158 | 17 | target_link_libraries( | 14 | target_link_libraries( |
159 | 18 | ${DEMO_SHELL} | 15 | ${DEMO_SHELL} |
160 | 19 | Qt5::Core | 16 | Qt5::Core |
161 | 20 | 17 | ||
162 | === modified file 'src/common/debughelpers.cpp' | |||
163 | --- src/common/debughelpers.cpp 2015-11-10 11:07:23 +0000 | |||
164 | +++ src/common/debughelpers.cpp 2016-06-06 19:37:34 +0000 | |||
165 | @@ -54,6 +54,7 @@ | |||
166 | 54 | break; | 54 | break; |
167 | 55 | case QEvent::TouchCancel: | 55 | case QEvent::TouchCancel: |
168 | 56 | message.append("TouchCancel "); | 56 | message.append("TouchCancel "); |
169 | 57 | break; | ||
170 | 57 | default: | 58 | default: |
171 | 58 | message.append("TouchUNKNOWN "); | 59 | message.append("TouchUNKNOWN "); |
172 | 59 | } | 60 | } |
173 | 60 | 61 | ||
174 | === modified file 'src/modules/Unity/Application/CMakeLists.txt' | |||
175 | --- src/modules/Unity/Application/CMakeLists.txt 2016-04-26 08:56:36 +0000 | |||
176 | +++ src/modules/Unity/Application/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
177 | @@ -1,4 +1,10 @@ | |||
178 | 1 | include_directories( | 1 | include_directories( |
179 | 2 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | ||
180 | 3 | ${CMAKE_SOURCE_DIR}/src/common | ||
181 | 4 | ) | ||
182 | 5 | |||
183 | 6 | include_directories( | ||
184 | 7 | SYSTEM | ||
185 | 2 | ${GLIB_INCLUDE_DIRS} | 8 | ${GLIB_INCLUDE_DIRS} |
186 | 3 | ${GIO_INCLUDE_DIRS} | 9 | ${GIO_INCLUDE_DIRS} |
187 | 4 | ${GIO_UNIX_INCLUDE_DIRS} | 10 | ${GIO_UNIX_INCLUDE_DIRS} |
188 | @@ -7,8 +13,6 @@ | |||
189 | 7 | ${PROCESS_CPP_INCLUDE_DIRS} | 13 | ${PROCESS_CPP_INCLUDE_DIRS} |
190 | 8 | ${UBUNTU_PLATFORM_API_INCLUDE_DIRS} | 14 | ${UBUNTU_PLATFORM_API_INCLUDE_DIRS} |
191 | 9 | ${UBUNTU_APP_LAUNCH_INCLUDE_DIRS} | 15 | ${UBUNTU_APP_LAUNCH_INCLUDE_DIRS} |
192 | 10 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | ||
193 | 11 | ${CMAKE_SOURCE_DIR}/src/common | ||
194 | 12 | ${GSETTINGS_QT_INCLUDE_DIRS} | 16 | ${GSETTINGS_QT_INCLUDE_DIRS} |
195 | 13 | 17 | ||
196 | 14 | ${LTTNG_INCLUDE_DIRS} | 18 | ${LTTNG_INCLUDE_DIRS} |
197 | 15 | 19 | ||
198 | === modified file 'src/modules/Unity/Application/application.cpp' | |||
199 | --- src/modules/Unity/Application/application.cpp 2016-05-25 13:54:52 +0000 | |||
200 | +++ src/modules/Unity/Application/application.cpp 2016-06-06 19:37:34 +0000 | |||
201 | @@ -55,6 +55,8 @@ | |||
202 | 55 | , m_processState(ProcessUnknown) | 55 | , m_processState(ProcessUnknown) |
203 | 56 | , m_stopTimer(nullptr) | 56 | , m_stopTimer(nullptr) |
204 | 57 | , m_exemptFromLifecycle(false) | 57 | , m_exemptFromLifecycle(false) |
205 | 58 | , m_proxySurfaceList(new ProxySurfaceListModel(this)) | ||
206 | 59 | , m_proxyPromptSurfaceList(new ProxySurfaceListModel(this)) | ||
207 | 58 | { | 60 | { |
208 | 59 | DEBUG_MSG << "()"; | 61 | DEBUG_MSG << "()"; |
209 | 60 | 62 | ||
210 | @@ -66,6 +68,8 @@ | |||
211 | 66 | m_rotatesWindowContents = m_appInfo->rotatesWindowContents(); | 68 | m_rotatesWindowContents = m_appInfo->rotatesWindowContents(); |
212 | 67 | 69 | ||
213 | 68 | setStopTimer(new Timer); | 70 | setStopTimer(new Timer); |
214 | 71 | |||
215 | 72 | connect(m_proxySurfaceList, &unityapp::MirSurfaceListInterface::countChanged, this, &unityapp::ApplicationInfoInterface::surfaceCountChanged); | ||
216 | 69 | } | 73 | } |
217 | 70 | 74 | ||
218 | 71 | Application::~Application() | 75 | Application::~Application() |
219 | @@ -411,8 +415,8 @@ | |||
220 | 411 | bool Application::focused() const | 415 | bool Application::focused() const |
221 | 412 | { | 416 | { |
222 | 413 | bool someSurfaceHasFocus = false; // to be proven wrong | 417 | bool someSurfaceHasFocus = false; // to be proven wrong |
225 | 414 | for (int i = 0; i < m_proxySurfaceList.rowCount() && !someSurfaceHasFocus; ++i) { | 418 | for (int i = 0; i < m_proxySurfaceList->rowCount() && !someSurfaceHasFocus; ++i) { |
226 | 415 | someSurfaceHasFocus |= m_proxySurfaceList.get(i)->focused(); | 419 | someSurfaceHasFocus |= m_proxySurfaceList->get(i)->focused(); |
227 | 416 | } | 420 | } |
228 | 417 | return someSurfaceHasFocus; | 421 | return someSurfaceHasFocus; |
229 | 418 | } | 422 | } |
230 | @@ -475,8 +479,8 @@ | |||
231 | 475 | return; | 479 | return; |
232 | 476 | 480 | ||
233 | 477 | if (m_session) { | 481 | if (m_session) { |
236 | 478 | m_proxySurfaceList.setSourceList(nullptr); | 482 | m_proxySurfaceList->setSourceList(nullptr); |
237 | 479 | m_proxyPromptSurfaceList.setSourceList(nullptr); | 483 | m_proxyPromptSurfaceList->setSourceList(nullptr); |
238 | 480 | m_session->disconnect(this); | 484 | m_session->disconnect(this); |
239 | 481 | m_session->surfaceList()->disconnect(this); | 485 | m_session->surfaceList()->disconnect(this); |
240 | 482 | m_session->setApplication(nullptr); | 486 | m_session->setApplication(nullptr); |
241 | @@ -517,8 +521,8 @@ | |||
242 | 517 | if (oldFullscreen != fullscreen()) | 521 | if (oldFullscreen != fullscreen()) |
243 | 518 | Q_EMIT fullscreenChanged(fullscreen()); | 522 | Q_EMIT fullscreenChanged(fullscreen()); |
244 | 519 | 523 | ||
247 | 520 | m_proxySurfaceList.setSourceList(m_session->surfaceList()); | 524 | m_proxySurfaceList->setSourceList(m_session->surfaceList()); |
248 | 521 | m_proxyPromptSurfaceList.setSourceList(m_session->promptSurfaceList()); | 525 | m_proxyPromptSurfaceList->setSourceList(m_session->promptSurfaceList()); |
249 | 522 | } else { | 526 | } else { |
250 | 523 | // this can only happen after the session has stopped | 527 | // this can only happen after the session has stopped |
251 | 524 | Q_ASSERT(m_state == InternalState::Stopped || m_state == InternalState::StoppedResumable | 528 | Q_ASSERT(m_state == InternalState::Stopped || m_state == InternalState::StoppedResumable |
252 | @@ -852,21 +856,21 @@ | |||
253 | 852 | } | 856 | } |
254 | 853 | } | 857 | } |
255 | 854 | 858 | ||
257 | 855 | unityapp::MirSurfaceListInterface* Application::surfaceList() | 859 | unityapp::MirSurfaceListInterface* Application::surfaceList() const |
258 | 856 | { | 860 | { |
260 | 857 | return &m_proxySurfaceList; | 861 | return m_proxySurfaceList; |
261 | 858 | } | 862 | } |
262 | 859 | 863 | ||
264 | 860 | unityapp::MirSurfaceListInterface* Application::promptSurfaceList() | 864 | unityapp::MirSurfaceListInterface* Application::promptSurfaceList() const |
265 | 861 | { | 865 | { |
267 | 862 | return &m_proxyPromptSurfaceList; | 866 | return m_proxyPromptSurfaceList; |
268 | 863 | } | 867 | } |
269 | 864 | 868 | ||
270 | 865 | void Application::requestFocus() | 869 | void Application::requestFocus() |
271 | 866 | { | 870 | { |
273 | 867 | if (m_proxySurfaceList.rowCount() > 0) { | 871 | if (m_proxySurfaceList->rowCount() > 0) { |
274 | 868 | DEBUG_MSG << "() - Requesting focus for most recent app surface"; | 872 | DEBUG_MSG << "() - Requesting focus for most recent app surface"; |
276 | 869 | m_proxySurfaceList.get(0)->requestFocus(); | 873 | m_proxySurfaceList->get(0)->requestFocus(); |
277 | 870 | } else { | 874 | } else { |
278 | 871 | DEBUG_MSG << "() - emitting focusRequested()"; | 875 | DEBUG_MSG << "() - emitting focusRequested()"; |
279 | 872 | Q_EMIT focusRequested(); | 876 | Q_EMIT focusRequested(); |
280 | 873 | 877 | ||
281 | === modified file 'src/modules/Unity/Application/application.h' | |||
282 | --- src/modules/Unity/Application/application.h 2016-05-20 08:41:17 +0000 | |||
283 | +++ src/modules/Unity/Application/application.h 2016-06-06 19:37:34 +0000 | |||
284 | @@ -108,8 +108,9 @@ | |||
285 | 108 | void setExemptFromLifecycle(bool) override; | 108 | void setExemptFromLifecycle(bool) override; |
286 | 109 | QSize initialSurfaceSize() const override; | 109 | QSize initialSurfaceSize() const override; |
287 | 110 | void setInitialSurfaceSize(const QSize &size) override; | 110 | void setInitialSurfaceSize(const QSize &size) override; |
290 | 111 | unity::shell::application::MirSurfaceListInterface* surfaceList() override; | 111 | unity::shell::application::MirSurfaceListInterface* surfaceList() const override; |
291 | 112 | unity::shell::application::MirSurfaceListInterface* promptSurfaceList() override; | 112 | unity::shell::application::MirSurfaceListInterface* promptSurfaceList() const override; |
292 | 113 | int surfaceCount() const override { return surfaceList()->count(); } | ||
293 | 113 | 114 | ||
294 | 114 | ProcessState processState() const { return m_processState; } | 115 | ProcessState processState() const { return m_processState; } |
295 | 115 | void setProcessState(ProcessState value); | 116 | void setProcessState(ProcessState value); |
296 | @@ -190,8 +191,8 @@ | |||
297 | 190 | QSize m_initialSurfaceSize; | 191 | QSize m_initialSurfaceSize; |
298 | 191 | bool m_closing{false}; | 192 | bool m_closing{false}; |
299 | 192 | 193 | ||
302 | 193 | ProxySurfaceListModel m_proxySurfaceList; | 194 | ProxySurfaceListModel *m_proxySurfaceList; |
303 | 194 | ProxySurfaceListModel m_proxyPromptSurfaceList; | 195 | ProxySurfaceListModel *m_proxyPromptSurfaceList; |
304 | 195 | 196 | ||
305 | 196 | friend class ApplicationManager; | 197 | friend class ApplicationManager; |
306 | 197 | friend class SessionManager; | 198 | friend class SessionManager; |
307 | 198 | 199 | ||
308 | === modified file 'src/modules/Unity/Application/mirsurfacelistmodel.cpp' | |||
309 | --- src/modules/Unity/Application/mirsurfacelistmodel.cpp 2016-05-17 19:57:52 +0000 | |||
310 | +++ src/modules/Unity/Application/mirsurfacelistmodel.cpp 2016-06-06 19:37:34 +0000 | |||
311 | @@ -20,6 +20,9 @@ | |||
312 | 20 | 20 | ||
313 | 21 | #include <paths.h> | 21 | #include <paths.h> |
314 | 22 | 22 | ||
315 | 23 | #include <QDebug> | ||
316 | 24 | #include <QDebugStateSaver> | ||
317 | 25 | |||
318 | 23 | namespace unityapp = unity::shell::application; | 26 | namespace unityapp = unity::shell::application; |
319 | 24 | using namespace qtmir; | 27 | using namespace qtmir; |
320 | 25 | 28 | ||
321 | @@ -65,11 +68,11 @@ | |||
322 | 65 | m_surfaceList.prepend(surface); | 68 | m_surfaceList.prepend(surface); |
323 | 66 | connectSurface(surface); | 69 | connectSurface(surface); |
324 | 67 | endInsertRows(); | 70 | endInsertRows(); |
326 | 68 | Q_EMIT countChanged(); | 71 | Q_EMIT countChanged(m_surfaceList.count()); |
327 | 69 | if (count() == 1) { | 72 | if (count() == 1) { |
328 | 70 | Q_EMIT emptyChanged(); | 73 | Q_EMIT emptyChanged(); |
329 | 71 | Q_EMIT firstChanged(); | ||
330 | 72 | } | 74 | } |
331 | 75 | Q_EMIT firstChanged(); | ||
332 | 73 | } | 76 | } |
333 | 74 | 77 | ||
334 | 75 | void MirSurfaceListModel::connectSurface(MirSurfaceInterface *surface) | 78 | void MirSurfaceListModel::connectSurface(MirSurfaceInterface *surface) |
335 | @@ -85,7 +88,7 @@ | |||
336 | 85 | beginRemoveRows(QModelIndex(), i, i); | 88 | beginRemoveRows(QModelIndex(), i, i); |
337 | 86 | m_surfaceList.removeAt(i); | 89 | m_surfaceList.removeAt(i); |
338 | 87 | endRemoveRows(); | 90 | endRemoveRows(); |
340 | 88 | Q_EMIT countChanged(); | 91 | Q_EMIT countChanged(m_surfaceList.count()); |
341 | 89 | if (count() == 0) { | 92 | if (count() == 0) { |
342 | 90 | Q_EMIT emptyChanged(); | 93 | Q_EMIT emptyChanged(); |
343 | 91 | } | 94 | } |
344 | @@ -147,7 +150,7 @@ | |||
345 | 147 | }); | 150 | }); |
346 | 148 | } | 151 | } |
347 | 149 | endInsertRows(); | 152 | endInsertRows(); |
349 | 150 | Q_EMIT countChanged(); | 153 | Q_EMIT countChanged(m_surfaceList.count()); |
350 | 151 | if (wasEmpty) { | 154 | if (wasEmpty) { |
351 | 152 | Q_EMIT emptyChanged(); | 155 | Q_EMIT emptyChanged(); |
352 | 153 | } | 156 | } |
353 | @@ -207,6 +210,11 @@ | |||
354 | 207 | // ProxySurfaceListModel | 210 | // ProxySurfaceListModel |
355 | 208 | ////////////////////////////////////////////////////////////////////////////// | 211 | ////////////////////////////////////////////////////////////////////////////// |
356 | 209 | 212 | ||
357 | 213 | ProxySurfaceListModel::ProxySurfaceListModel(QObject *parent): | ||
358 | 214 | unity::shell::application::MirSurfaceListInterface(parent) | ||
359 | 215 | { | ||
360 | 216 | } | ||
361 | 217 | |||
362 | 210 | void ProxySurfaceListModel::setSourceList(MirSurfaceListModel *sourceList) | 218 | void ProxySurfaceListModel::setSourceList(MirSurfaceListModel *sourceList) |
363 | 211 | { | 219 | { |
364 | 212 | if (m_sourceList == sourceList) | 220 | if (m_sourceList == sourceList) |
365 | @@ -284,3 +292,21 @@ | |||
366 | 284 | 292 | ||
367 | 285 | return m_sourceList->data(index, role); | 293 | return m_sourceList->data(index, role); |
368 | 286 | } | 294 | } |
369 | 295 | |||
370 | 296 | QDebug operator<<(QDebug dbg, const unityapp::MirSurfaceListInterface &surfaceListConst) | ||
371 | 297 | { | ||
372 | 298 | auto surfaceList = const_cast<unityapp::MirSurfaceListInterface*>(&surfaceListConst); | ||
373 | 299 | |||
374 | 300 | QDebugStateSaver saver(dbg); | ||
375 | 301 | dbg.nospace(); | ||
376 | 302 | dbg << "MirSurfaceList("; | ||
377 | 303 | for (int i = 0; i < surfaceList->count(); ++i) { | ||
378 | 304 | if (i > 0) { | ||
379 | 305 | dbg << ", "; | ||
380 | 306 | } | ||
381 | 307 | auto surface = surfaceList->get(i); | ||
382 | 308 | dbg << (void*)surface; | ||
383 | 309 | } | ||
384 | 310 | dbg << ')'; | ||
385 | 311 | return dbg; | ||
386 | 312 | } | ||
387 | 287 | 313 | ||
388 | === modified file 'src/modules/Unity/Application/mirsurfacelistmodel.h' | |||
389 | --- src/modules/Unity/Application/mirsurfacelistmodel.h 2016-05-10 21:06:21 +0000 | |||
390 | +++ src/modules/Unity/Application/mirsurfacelistmodel.h 2016-06-06 19:37:34 +0000 | |||
391 | @@ -81,6 +81,7 @@ | |||
392 | 81 | { | 81 | { |
393 | 82 | Q_OBJECT | 82 | Q_OBJECT |
394 | 83 | public: | 83 | public: |
395 | 84 | ProxySurfaceListModel(QObject *parent = nullptr); | ||
396 | 84 | void setSourceList(MirSurfaceListModel *sourceList); | 85 | void setSourceList(MirSurfaceListModel *sourceList); |
397 | 85 | 86 | ||
398 | 86 | Q_INVOKABLE unity::shell::application::MirSurfaceInterface *get(int index) override; | 87 | Q_INVOKABLE unity::shell::application::MirSurfaceInterface *get(int index) override; |
399 | @@ -94,4 +95,6 @@ | |||
400 | 94 | 95 | ||
401 | 95 | } // namespace qtmir | 96 | } // namespace qtmir |
402 | 96 | 97 | ||
403 | 98 | QDebug operator<<(QDebug, const unity::shell::application::MirSurfaceListInterface &); | ||
404 | 99 | |||
405 | 97 | #endif // QTMIR_MIRSURFACELISTMODEL_H | 100 | #endif // QTMIR_MIRSURFACELISTMODEL_H |
406 | 98 | 101 | ||
407 | === modified file 'src/modules/Unity/Application/session.cpp' | |||
408 | --- src/modules/Unity/Application/session.cpp 2016-05-17 19:18:44 +0000 | |||
409 | +++ src/modules/Unity/Application/session.cpp 2016-06-06 19:37:34 +0000 | |||
410 | @@ -38,6 +38,8 @@ | |||
411 | 38 | 38 | ||
412 | 39 | using unity::shell::application::ApplicationInfoInterface; | 39 | using unity::shell::application::ApplicationInfoInterface; |
413 | 40 | 40 | ||
414 | 41 | #define DEBUG_MSG qCDebug(QTMIR_SURFACES).nospace() << "Session[" << (void*)this << ",name=" << name() << "]::" << __func__ | ||
415 | 42 | |||
416 | 41 | namespace qtmir | 43 | namespace qtmir |
417 | 42 | { | 44 | { |
418 | 43 | 45 | ||
419 | @@ -75,7 +77,7 @@ | |||
420 | 75 | , m_live(true) | 77 | , m_live(true) |
421 | 76 | , m_promptSessionManager(promptSessionManager) | 78 | , m_promptSessionManager(promptSessionManager) |
422 | 77 | { | 79 | { |
424 | 78 | qCDebug(QTMIR_SESSIONS) << "Session::Session() " << this->name(); | 80 | DEBUG_MSG << "()"; |
425 | 79 | 81 | ||
426 | 80 | setSuspendTimer(new Timer); | 82 | setSuspendTimer(new Timer); |
427 | 81 | 83 | ||
428 | @@ -84,7 +86,7 @@ | |||
429 | 84 | 86 | ||
430 | 85 | Session::~Session() | 87 | Session::~Session() |
431 | 86 | { | 88 | { |
433 | 87 | qCDebug(QTMIR_SESSIONS) << "Session::~Session() " << name(); | 89 | DEBUG_MSG << "()"; |
434 | 88 | stopPromptSessions(); | 90 | stopPromptSessions(); |
435 | 89 | 91 | ||
436 | 90 | QList<SessionInterface*> children(m_children->list()); | 92 | QList<SessionInterface*> children(m_children->list()); |
437 | @@ -107,7 +109,7 @@ | |||
438 | 107 | Q_ASSERT(m_state == Session::Suspending); | 109 | Q_ASSERT(m_state == Session::Suspending); |
439 | 108 | 110 | ||
440 | 109 | if (m_surfaceList.count() == 0) { | 111 | if (m_surfaceList.count() == 0) { |
442 | 110 | qCDebug(QTMIR_SESSIONS) << "Application::suspend - no surface to call stopFrameDropper() on!"; | 112 | DEBUG_MSG << " no surface to call stopFrameDropper() on!"; |
443 | 111 | } else { | 113 | } else { |
444 | 112 | for (int i = 0; i < m_surfaceList.count(); ++i) { | 114 | for (int i = 0; i < m_surfaceList.count(); ++i) { |
445 | 113 | auto surface = static_cast<MirSurfaceInterface*>(m_surfaceList.get(i)); | 115 | auto surface = static_cast<MirSurfaceInterface*>(m_surfaceList.get(i)); |
446 | @@ -153,8 +155,7 @@ | |||
447 | 153 | return; | 155 | return; |
448 | 154 | } | 156 | } |
449 | 155 | 157 | ||
452 | 156 | qCDebug(QTMIR_SESSIONS) << "Session::setState - session=" << name() | 158 | DEBUG_MSG << "(state=" << sessionStateToString(state) << ")"; |
451 | 157 | << "state=" << sessionStateToString(state); | ||
453 | 158 | 159 | ||
454 | 159 | if (m_state == Suspending) { | 160 | if (m_state == Suspending) { |
455 | 160 | m_suspendTimer->stop(); | 161 | m_suspendTimer->stop(); |
456 | @@ -198,7 +199,7 @@ | |||
457 | 198 | 199 | ||
458 | 199 | void Session::registerSurface(MirSurfaceInterface *newSurface) | 200 | void Session::registerSurface(MirSurfaceInterface *newSurface) |
459 | 200 | { | 201 | { |
461 | 201 | qCDebug(QTMIR_SESSIONS) << "Session::resgisterSurface - session=" << name() << "surface=" << newSurface; | 202 | DEBUG_MSG << "(surface=" << newSurface << ")"; |
462 | 202 | 203 | ||
463 | 203 | // Only notify QML of surface creation once it has drawn its first frame. | 204 | // Only notify QML of surface creation once it has drawn its first frame. |
464 | 204 | if (newSurface->isFirstFrameDrawn()) { | 205 | if (newSurface->isFirstFrameDrawn()) { |
465 | @@ -214,7 +215,7 @@ | |||
466 | 214 | 215 | ||
467 | 215 | void Session::prependSurface(MirSurfaceInterface *newSurface) | 216 | void Session::prependSurface(MirSurfaceInterface *newSurface) |
468 | 216 | { | 217 | { |
470 | 217 | qCDebug(QTMIR_SESSIONS) << "Session::prependSurface - session=" << name() << "surface=" << newSurface; | 218 | DEBUG_MSG << "(surface=" << newSurface << ")"; |
471 | 218 | 219 | ||
472 | 219 | connect(newSurface, &MirSurfaceInterface::stateChanged, | 220 | connect(newSurface, &MirSurfaceInterface::stateChanged, |
473 | 220 | this, &Session::updateFullscreenProperty); | 221 | this, &Session::updateFullscreenProperty); |
474 | @@ -246,7 +247,7 @@ | |||
475 | 246 | 247 | ||
476 | 247 | void Session::removeSurface(MirSurfaceInterface* surface) | 248 | void Session::removeSurface(MirSurfaceInterface* surface) |
477 | 248 | { | 249 | { |
479 | 249 | qCDebug(QTMIR_SESSIONS) << "Session::removeSurface - session=" << name() << "surface=" << surface; | 250 | DEBUG_MSG << "(surface=" << surface << ")"; |
480 | 250 | 251 | ||
481 | 251 | surface->disconnect(this); | 252 | surface->disconnect(this); |
482 | 252 | 253 | ||
483 | @@ -277,8 +278,8 @@ | |||
484 | 277 | 278 | ||
485 | 278 | void Session::setFullscreen(bool fullscreen) | 279 | void Session::setFullscreen(bool fullscreen) |
486 | 279 | { | 280 | { |
487 | 280 | qCDebug(QTMIR_SESSIONS) << "Session::setFullscreen - session=" << this << "fullscreen=" << fullscreen; | ||
488 | 281 | if (m_fullscreen != fullscreen) { | 281 | if (m_fullscreen != fullscreen) { |
489 | 282 | DEBUG_MSG << "(" << fullscreen << ")"; | ||
490 | 282 | m_fullscreen = fullscreen; | 283 | m_fullscreen = fullscreen; |
491 | 283 | Q_EMIT fullscreenChanged(m_fullscreen); | 284 | Q_EMIT fullscreenChanged(m_fullscreen); |
492 | 284 | } | 285 | } |
493 | @@ -286,7 +287,7 @@ | |||
494 | 286 | 287 | ||
495 | 287 | void Session::suspend() | 288 | void Session::suspend() |
496 | 288 | { | 289 | { |
498 | 289 | qCDebug(QTMIR_SESSIONS) << "Session::suspend - session=" << this << "state=" << sessionStateToString(m_state); | 290 | DEBUG_MSG << " state=" << sessionStateToString(m_state); |
499 | 290 | if (m_state == Running) { | 291 | if (m_state == Running) { |
500 | 291 | session()->set_lifecycle_state(mir_lifecycle_state_will_suspend); | 292 | session()->set_lifecycle_state(mir_lifecycle_state_will_suspend); |
501 | 292 | m_suspendTimer->start(); | 293 | m_suspendTimer->start(); |
502 | @@ -305,7 +306,7 @@ | |||
503 | 305 | 306 | ||
504 | 306 | void Session::resume() | 307 | void Session::resume() |
505 | 307 | { | 308 | { |
507 | 308 | qCDebug(QTMIR_SESSIONS) << "Session::resume - session=" << this << "state=" << sessionStateToString(m_state); | 309 | DEBUG_MSG << " state=" << sessionStateToString(m_state); |
508 | 309 | 310 | ||
509 | 310 | if (m_state == Suspending || m_state == Suspended) { | 311 | if (m_state == Suspending || m_state == Suspended) { |
510 | 311 | doResume(); | 312 | doResume(); |
511 | @@ -336,7 +337,7 @@ | |||
512 | 336 | 337 | ||
513 | 337 | void Session::close() | 338 | void Session::close() |
514 | 338 | { | 339 | { |
516 | 339 | qCDebug(QTMIR_SESSIONS) << "Session::close - " << name(); | 340 | DEBUG_MSG << "()"; |
517 | 340 | 341 | ||
518 | 341 | if (m_state == Stopped) return; | 342 | if (m_state == Stopped) return; |
519 | 342 | 343 | ||
520 | @@ -348,7 +349,7 @@ | |||
521 | 348 | 349 | ||
522 | 349 | void Session::stop() | 350 | void Session::stop() |
523 | 350 | { | 351 | { |
525 | 351 | qCDebug(QTMIR_SESSIONS) << "Session::stop - " << name(); | 352 | DEBUG_MSG << "()"; |
526 | 352 | 353 | ||
527 | 353 | if (m_state != Stopped) { | 354 | if (m_state != Stopped) { |
528 | 354 | 355 | ||
529 | @@ -372,7 +373,7 @@ | |||
530 | 372 | void Session::setLive(const bool live) | 373 | void Session::setLive(const bool live) |
531 | 373 | { | 374 | { |
532 | 374 | if (m_live != live) { | 375 | if (m_live != live) { |
534 | 375 | qCDebug(QTMIR_SESSIONS) << "Session::setLive - " << name() << "live=" << live; | 376 | DEBUG_MSG << "(" << live << ")"; |
535 | 376 | 377 | ||
536 | 377 | m_live = live; | 378 | m_live = live; |
537 | 378 | Q_EMIT liveChanged(m_live); | 379 | Q_EMIT liveChanged(m_live); |
538 | @@ -396,7 +397,7 @@ | |||
539 | 396 | 397 | ||
540 | 397 | void Session::insertChildSession(uint index, SessionInterface* session) | 398 | void Session::insertChildSession(uint index, SessionInterface* session) |
541 | 398 | { | 399 | { |
543 | 399 | qCDebug(QTMIR_SESSIONS) << "Session::insertChildSession - " << session->name() << " to " << name() << " @ " << index; | 400 | DEBUG_MSG << "(index=" << index << ", Session[" << (void*)session << ",name=" << session->name() << "])"; |
544 | 400 | Q_ASSERT(!m_children->contains(session)); | 401 | Q_ASSERT(!m_children->contains(session)); |
545 | 401 | 402 | ||
546 | 402 | m_children->insert(index, session); | 403 | m_children->insert(index, session); |
547 | @@ -424,7 +425,7 @@ | |||
548 | 424 | 425 | ||
549 | 425 | void Session::removeChildSession(SessionInterface* session) | 426 | void Session::removeChildSession(SessionInterface* session) |
550 | 426 | { | 427 | { |
552 | 427 | qCDebug(QTMIR_SESSIONS) << "Session::removeChildSession - " << session->name() << " from " << name(); | 428 | DEBUG_MSG << "(Session[" << (void*)session << ",name=" << session->name() << "])"; |
553 | 428 | 429 | ||
554 | 429 | disconnect(session, 0, this, 0); | 430 | disconnect(session, 0, this, 0); |
555 | 430 | 431 | ||
556 | @@ -452,16 +453,14 @@ | |||
557 | 452 | 453 | ||
558 | 453 | void Session::appendPromptSession(const std::shared_ptr<ms::PromptSession>& promptSession) | 454 | void Session::appendPromptSession(const std::shared_ptr<ms::PromptSession>& promptSession) |
559 | 454 | { | 455 | { |
562 | 455 | qCDebug(QTMIR_SESSIONS) << "Session::appendPromptSession session=" << name() | 456 | DEBUG_MSG << "(promptSession=" << (promptSession ? promptSession.get() : nullptr) << ")"; |
561 | 456 | << "promptSession=" << (promptSession ? promptSession.get() : nullptr); | ||
563 | 457 | 457 | ||
564 | 458 | m_promptSessions.append(promptSession); | 458 | m_promptSessions.append(promptSession); |
565 | 459 | } | 459 | } |
566 | 460 | 460 | ||
567 | 461 | void Session::removePromptSession(const std::shared_ptr<ms::PromptSession>& promptSession) | 461 | void Session::removePromptSession(const std::shared_ptr<ms::PromptSession>& promptSession) |
568 | 462 | { | 462 | { |
571 | 463 | qCDebug(QTMIR_SESSIONS) << "Session::removePromptSession session=" << name() | 463 | DEBUG_MSG << "(promptSession=" << (promptSession ? promptSession.get() : nullptr) << ")"; |
570 | 464 | << "promptSession=" << (promptSession ? promptSession.get() : nullptr); | ||
572 | 465 | 464 | ||
573 | 466 | m_promptSessions.removeAll(promptSession); | 465 | m_promptSessions.removeAll(promptSession); |
574 | 467 | } | 466 | } |
575 | @@ -477,7 +476,7 @@ | |||
576 | 477 | QListIterator<std::shared_ptr<ms::PromptSession>> it(copy); | 476 | QListIterator<std::shared_ptr<ms::PromptSession>> it(copy); |
577 | 478 | for ( it.toBack(); it.hasPrevious(); ) { | 477 | for ( it.toBack(); it.hasPrevious(); ) { |
578 | 479 | std::shared_ptr<ms::PromptSession> promptSession = it.previous(); | 478 | std::shared_ptr<ms::PromptSession> promptSession = it.previous(); |
580 | 480 | qCDebug(QTMIR_SESSIONS) << "Session::stopPromptSessions - promptSession=" << promptSession.get(); | 479 | DEBUG_MSG << " - promptSession=" << promptSession.get(); |
581 | 481 | 480 | ||
582 | 482 | m_promptSessionManager->stop_prompt_session(promptSession); | 481 | m_promptSessionManager->stop_prompt_session(promptSession); |
583 | 483 | } | 482 | } |
584 | @@ -500,7 +499,7 @@ | |||
585 | 500 | void Session::deleteIfZombieAndEmpty() | 499 | void Session::deleteIfZombieAndEmpty() |
586 | 501 | { | 500 | { |
587 | 502 | if (!m_live && m_children->rowCount() == 0 && m_surfaceList.isEmpty()) { | 501 | if (!m_live && m_children->rowCount() == 0 && m_surfaceList.isEmpty()) { |
589 | 503 | qCDebug(QTMIR_SESSIONS).nospace() << "Session::deleteIfZombieAndEmpty[" << name() << "] - deleteLater()"; | 502 | DEBUG_MSG << " - deleteLater()"; |
590 | 504 | deleteLater(); | 503 | deleteLater(); |
591 | 505 | } | 504 | } |
592 | 506 | } | 505 | } |
593 | 507 | 506 | ||
594 | === modified file 'src/modules/Unity/Application/sessionmanager.h' | |||
595 | --- src/modules/Unity/Application/sessionmanager.h 2015-08-11 12:08:32 +0000 | |||
596 | +++ src/modules/Unity/Application/sessionmanager.h 2016-06-06 19:37:34 +0000 | |||
597 | @@ -81,7 +81,6 @@ | |||
598 | 81 | ApplicationManager* m_applicationManager; | 81 | ApplicationManager* m_applicationManager; |
599 | 82 | static SessionManager *the_session_manager; | 82 | static SessionManager *the_session_manager; |
600 | 83 | 83 | ||
601 | 84 | QList<Session*> m_sessions; | ||
602 | 85 | QHash<const mir::scene::PromptSession *, SessionInterface *> m_mirPromptToSessionHash; | 84 | QHash<const mir::scene::PromptSession *, SessionInterface *> m_mirPromptToSessionHash; |
603 | 86 | }; | 85 | }; |
604 | 87 | 86 | ||
605 | 88 | 87 | ||
606 | === modified file 'src/modules/Unity/Application/ubuntukeyboardinfo.cpp' | |||
607 | --- src/modules/Unity/Application/ubuntukeyboardinfo.cpp 2015-08-11 12:08:32 +0000 | |||
608 | +++ src/modules/Unity/Application/ubuntukeyboardinfo.cpp 2016-06-06 19:37:34 +0000 | |||
609 | @@ -36,6 +36,8 @@ | |||
610 | 36 | UbuntuKeyboardInfo::UbuntuKeyboardInfo(QObject *parent) | 36 | UbuntuKeyboardInfo::UbuntuKeyboardInfo(QObject *parent) |
611 | 37 | : QObject(parent), | 37 | : QObject(parent), |
612 | 38 | m_consecutiveAttempts(0), | 38 | m_consecutiveAttempts(0), |
613 | 39 | m_lastX(0), | ||
614 | 40 | m_lastY(0), | ||
615 | 39 | m_lastWidth(0), | 41 | m_lastWidth(0), |
616 | 40 | m_lastHeight(0) | 42 | m_lastHeight(0) |
617 | 41 | { | 43 | { |
618 | 42 | 44 | ||
619 | === modified file 'src/modules/Unity/Application/upstart/taskcontroller.cpp' | |||
620 | --- src/modules/Unity/Application/upstart/taskcontroller.cpp 2016-05-04 16:35:50 +0000 | |||
621 | +++ src/modules/Unity/Application/upstart/taskcontroller.cpp 2016-06-06 19:37:34 +0000 | |||
622 | @@ -127,8 +127,8 @@ | |||
623 | 127 | TaskController::Error error; | 127 | TaskController::Error error; |
624 | 128 | switch(failureType) | 128 | switch(failureType) |
625 | 129 | { | 129 | { |
628 | 130 | case UBUNTU_APP_LAUNCH_APP_FAILED_CRASH: error = TaskController::Error::APPLICATION_CRASHED; | 130 | case UBUNTU_APP_LAUNCH_APP_FAILED_CRASH: error = TaskController::Error::APPLICATION_CRASHED; break; |
629 | 131 | case UBUNTU_APP_LAUNCH_APP_FAILED_START_FAILURE: error = TaskController::Error::APPLICATION_FAILED_TO_START; | 131 | case UBUNTU_APP_LAUNCH_APP_FAILED_START_FAILURE: error = TaskController::Error::APPLICATION_FAILED_TO_START; break; |
630 | 132 | } | 132 | } |
631 | 133 | 133 | ||
632 | 134 | auto thiz = static_cast<TaskController*>(userData); | 134 | auto thiz = static_cast<TaskController*>(userData); |
633 | 135 | 135 | ||
634 | === modified file 'src/modules/Unity/Screens/CMakeLists.txt' | |||
635 | --- src/modules/Unity/Screens/CMakeLists.txt 2016-01-28 22:33:35 +0000 | |||
636 | +++ src/modules/Unity/Screens/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
637 | @@ -1,5 +1,9 @@ | |||
638 | 1 | include_directories( | 1 | include_directories( |
639 | 2 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | 2 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
640 | 3 | ) | ||
641 | 4 | |||
642 | 5 | include_directories( | ||
643 | 6 | SYSTEM | ||
644 | 3 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} | 7 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
645 | 4 | ${Qt5Quick_INCLUDE_DIRS} | 8 | ${Qt5Quick_INCLUDE_DIRS} |
646 | 5 | ${MIRSERVER_INCLUDE_DIRS} | 9 | ${MIRSERVER_INCLUDE_DIRS} |
647 | 6 | 10 | ||
648 | === modified file 'src/platforms/mirserver/CMakeLists.txt' | |||
649 | --- src/platforms/mirserver/CMakeLists.txt 2016-05-25 13:54:30 +0000 | |||
650 | +++ src/platforms/mirserver/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
651 | @@ -26,6 +26,10 @@ | |||
652 | 26 | include_directories( | 26 | include_directories( |
653 | 27 | ${CMAKE_SOURCE_DIR}/src/common | 27 | ${CMAKE_SOURCE_DIR}/src/common |
654 | 28 | 28 | ||
655 | 29 | ) | ||
656 | 30 | |||
657 | 31 | include_directories( | ||
658 | 32 | SYSTEM | ||
659 | 29 | ${MIRCOMMON_INCLUDE_DIRS} | 33 | ${MIRCOMMON_INCLUDE_DIRS} |
660 | 30 | ${MIRSERVER_INCLUDE_DIRS} | 34 | ${MIRSERVER_INCLUDE_DIRS} |
661 | 31 | ${MIRRENDERERGLDEV_INCLUDE_DIRS} | 35 | ${MIRRENDERERGLDEV_INCLUDE_DIRS} |
662 | @@ -82,6 +86,7 @@ | |||
663 | 82 | tracepoints.c | 86 | tracepoints.c |
664 | 83 | # We need to run moc on these headers | 87 | # We need to run moc on these headers |
665 | 84 | ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/Mir.h | 88 | ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/Mir.h |
666 | 89 | ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/MirMousePointerInterface.h | ||
667 | 85 | ) | 90 | ) |
668 | 86 | 91 | ||
669 | 87 | add_library(qpa-mirserver SHARED | 92 | add_library(qpa-mirserver SHARED |
670 | 88 | 93 | ||
671 | === modified file 'src/platforms/mirserver/mirwindowmanager.cpp' | |||
672 | --- src/platforms/mirserver/mirwindowmanager.cpp 2016-04-28 12:48:48 +0000 | |||
673 | +++ src/platforms/mirserver/mirwindowmanager.cpp 2016-06-06 19:37:34 +0000 | |||
674 | @@ -196,7 +196,7 @@ | |||
675 | 196 | const std::shared_ptr<mir::scene::Surface>& surface, | 196 | const std::shared_ptr<mir::scene::Surface>& surface, |
676 | 197 | const mir::shell::SurfaceSpecification& modifications) | 197 | const mir::shell::SurfaceSpecification& modifications) |
677 | 198 | { | 198 | { |
679 | 199 | QMutexLocker(&SurfaceObserver::mutex); | 199 | QMutexLocker locker(&SurfaceObserver::mutex); |
680 | 200 | SurfaceObserver *observer = SurfaceObserver::observerForSurface(surface.get()); | 200 | SurfaceObserver *observer = SurfaceObserver::observerForSurface(surface.get()); |
681 | 201 | if (observer) { | 201 | if (observer) { |
682 | 202 | observer->notifySurfaceModifications(modifications); | 202 | observer->notifySurfaceModifications(modifications); |
683 | 203 | 203 | ||
684 | === modified file 'tests/framework/CMakeLists.txt' | |||
685 | --- tests/framework/CMakeLists.txt 2016-05-24 20:13:10 +0000 | |||
686 | +++ tests/framework/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
687 | @@ -1,7 +1,11 @@ | |||
688 | 1 | include_directories( | 1 | include_directories( |
689 | 2 | ${APPLICATION_API_INCLUDE_DIRS} | ||
690 | 3 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | 2 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
691 | 4 | ${CMAKE_SOURCE_DIR}/src/modules | 3 | ${CMAKE_SOURCE_DIR}/src/modules |
692 | 4 | ) | ||
693 | 5 | |||
694 | 6 | include_directories( | ||
695 | 7 | SYSTEM | ||
696 | 8 | ${APPLICATION_API_INCLUDE_DIRS} | ||
697 | 5 | ${MIRSERVER_INCLUDE_DIRS} | 9 | ${MIRSERVER_INCLUDE_DIRS} |
698 | 6 | ${MIRRENDERERGLDEV_INCLUDE_DIRS} | 10 | ${MIRRENDERERGLDEV_INCLUDE_DIRS} |
699 | 7 | 11 | ||
700 | 8 | 12 | ||
701 | === modified file 'tests/framework/mock_mir_session.cpp' | |||
702 | --- tests/framework/mock_mir_session.cpp 2015-10-19 10:45:42 +0000 | |||
703 | +++ tests/framework/mock_mir_session.cpp 2016-06-06 19:37:34 +0000 | |||
704 | @@ -22,6 +22,7 @@ | |||
705 | 22 | { | 22 | { |
706 | 23 | 23 | ||
707 | 24 | MockSession::MockSession() | 24 | MockSession::MockSession() |
708 | 25 | : m_sessionId(-1) | ||
709 | 25 | { | 26 | { |
710 | 26 | } | 27 | } |
711 | 27 | 28 | ||
712 | 28 | 29 | ||
713 | === modified file 'tests/mirserver/Clipboard/CMakeLists.txt' | |||
714 | --- tests/mirserver/Clipboard/CMakeLists.txt 2014-12-03 08:56:35 +0000 | |||
715 | +++ tests/mirserver/Clipboard/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
716 | @@ -6,6 +6,10 @@ | |||
717 | 6 | 6 | ||
718 | 7 | include_directories( | 7 | include_directories( |
719 | 8 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | 8 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
720 | 9 | ) | ||
721 | 10 | |||
722 | 11 | include_directories( | ||
723 | 12 | SYSTEM | ||
724 | 9 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} | 13 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
725 | 10 | ${MIRSERVER_INCLUDE_DIRS} | 14 | ${MIRSERVER_INCLUDE_DIRS} |
726 | 11 | ) | 15 | ) |
727 | 12 | 16 | ||
728 | === modified file 'tests/mirserver/QtEventFeeder/CMakeLists.txt' | |||
729 | --- tests/mirserver/QtEventFeeder/CMakeLists.txt 2014-12-03 08:56:35 +0000 | |||
730 | +++ tests/mirserver/QtEventFeeder/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
731 | @@ -7,6 +7,10 @@ | |||
732 | 7 | include_directories( | 7 | include_directories( |
733 | 8 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | 8 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
734 | 9 | ${CMAKE_SOURCE_DIR}/src/common | 9 | ${CMAKE_SOURCE_DIR}/src/common |
735 | 10 | ) | ||
736 | 11 | |||
737 | 12 | include_directories( | ||
738 | 13 | SYSTEM | ||
739 | 10 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} | 14 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
740 | 11 | ${MIRSERVER_INCLUDE_DIRS} | 15 | ${MIRSERVER_INCLUDE_DIRS} |
741 | 12 | ) | 16 | ) |
742 | 13 | 17 | ||
743 | === modified file 'tests/mirserver/QtEventFeeder/mock_qtwindowsystem.h' | |||
744 | --- tests/mirserver/QtEventFeeder/mock_qtwindowsystem.h 2016-01-07 11:37:55 +0000 | |||
745 | +++ tests/mirserver/QtEventFeeder/mock_qtwindowsystem.h 2016-06-06 19:37:34 +0000 | |||
746 | @@ -28,7 +28,6 @@ | |||
747 | 28 | MOCK_METHOD1(getWindowForTouchPoint, QWindow*(const QPoint &point)); | 28 | MOCK_METHOD1(getWindowForTouchPoint, QWindow*(const QPoint &point)); |
748 | 29 | MOCK_METHOD0(lastWindow, QWindow*()); | 29 | MOCK_METHOD0(lastWindow, QWindow*()); |
749 | 30 | MOCK_METHOD0(focusedWindow, QWindow*()); | 30 | MOCK_METHOD0(focusedWindow, QWindow*()); |
750 | 31 | MOCK_METHOD1(registerTouchDevice, void(QTouchDevice* device)); | ||
751 | 32 | 31 | ||
752 | 33 | // Wanted to use GMock, but MOCK_METHOD11 not implemented | 32 | // Wanted to use GMock, but MOCK_METHOD11 not implemented |
753 | 34 | void handleExtendedKeyEvent(QWindow */*window*/, ulong /*timestamp*/, QEvent::Type /*type*/, int /*key*/, | 33 | void handleExtendedKeyEvent(QWindow */*window*/, ulong /*timestamp*/, QEvent::Type /*type*/, int /*key*/, |
754 | @@ -43,6 +42,18 @@ | |||
755 | 43 | Qt::KeyboardModifiers mods)); | 42 | Qt::KeyboardModifiers mods)); |
756 | 44 | MOCK_METHOD4(handleMouseEvent, void(ulong timestamp, QPointF point, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)); | 43 | MOCK_METHOD4(handleMouseEvent, void(ulong timestamp, QPointF point, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)); |
757 | 45 | MOCK_METHOD3(handleWheelEvent, void(ulong timestamp, QPoint angleDelta, Qt::KeyboardModifiers mods)); | 44 | MOCK_METHOD3(handleWheelEvent, void(ulong timestamp, QPoint angleDelta, Qt::KeyboardModifiers mods)); |
758 | 45 | |||
759 | 46 | ~MockQtWindowSystem() | ||
760 | 47 | { | ||
761 | 48 | qDeleteAll(m_devices); | ||
762 | 49 | } | ||
763 | 50 | |||
764 | 51 | void registerTouchDevice(QTouchDevice* device) | ||
765 | 52 | { | ||
766 | 53 | m_devices << device; | ||
767 | 54 | } | ||
768 | 55 | |||
769 | 56 | QVector<QTouchDevice*> m_devices; | ||
770 | 46 | }; | 57 | }; |
771 | 47 | 58 | ||
772 | 48 | namespace testing | 59 | namespace testing |
773 | 49 | 60 | ||
774 | === modified file 'tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp' | |||
775 | --- tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp 2016-04-29 15:41:00 +0000 | |||
776 | +++ tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp 2016-06-06 19:37:34 +0000 | |||
777 | @@ -78,11 +78,11 @@ | |||
778 | 78 | mockWindowSystem = new MockQtWindowSystem; | 78 | mockWindowSystem = new MockQtWindowSystem; |
779 | 79 | auto screens = QSharedPointer<ScreensModel>(); | 79 | auto screens = QSharedPointer<ScreensModel>(); |
780 | 80 | 80 | ||
782 | 81 | EXPECT_CALL(*mockWindowSystem, registerTouchDevice(_)); | 81 | ASSERT_TRUE(mockWindowSystem->m_devices.count() == 0); |
783 | 82 | 82 | ||
784 | 83 | qtEventFeeder = new QtEventFeeder(screens, mockWindowSystem); | 83 | qtEventFeeder = new QtEventFeeder(screens, mockWindowSystem); |
785 | 84 | 84 | ||
787 | 85 | ASSERT_TRUE(Mock::VerifyAndClearExpectations(mockWindowSystem)); | 85 | ASSERT_TRUE(mockWindowSystem->m_devices.count() == 1); |
788 | 86 | 86 | ||
789 | 87 | int argc = 0; | 87 | int argc = 0; |
790 | 88 | char **argv = nullptr; | 88 | char **argv = nullptr; |
791 | 89 | 89 | ||
792 | === modified file 'tests/mirserver/Screen/CMakeLists.txt' | |||
793 | --- tests/mirserver/Screen/CMakeLists.txt 2015-11-11 10:43:36 +0000 | |||
794 | +++ tests/mirserver/Screen/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
795 | @@ -8,6 +8,10 @@ | |||
796 | 8 | ${CMAKE_SOURCE_DIR}/tests/framework | 8 | ${CMAKE_SOURCE_DIR}/tests/framework |
797 | 9 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | 9 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
798 | 10 | ${CMAKE_SOURCE_DIR}/src/common | 10 | ${CMAKE_SOURCE_DIR}/src/common |
799 | 11 | ) | ||
800 | 12 | |||
801 | 13 | include_directories( | ||
802 | 14 | SYSTEM | ||
803 | 11 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} | 15 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
804 | 12 | ${MIRSERVER_INCLUDE_DIRS} | 16 | ${MIRSERVER_INCLUDE_DIRS} |
805 | 13 | ) | 17 | ) |
806 | 14 | 18 | ||
807 | === modified file 'tests/mirserver/ScreensModel/CMakeLists.txt' | |||
808 | --- tests/mirserver/ScreensModel/CMakeLists.txt 2016-02-16 11:48:35 +0000 | |||
809 | +++ tests/mirserver/ScreensModel/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
810 | @@ -11,6 +11,10 @@ | |||
811 | 11 | ${CMAKE_SOURCE_DIR}/tests/framework | 11 | ${CMAKE_SOURCE_DIR}/tests/framework |
812 | 12 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | 12 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
813 | 13 | ${CMAKE_SOURCE_DIR}/src/common | 13 | ${CMAKE_SOURCE_DIR}/src/common |
814 | 14 | ) | ||
815 | 15 | |||
816 | 16 | include_directories( | ||
817 | 17 | SYSTEM | ||
818 | 14 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} | 18 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
819 | 15 | ${MIRSERVER_INCLUDE_DIRS} | 19 | ${MIRSERVER_INCLUDE_DIRS} |
820 | 16 | ${MIRRENDERERGLDEV_INCLUDE_DIRS} | 20 | ${MIRRENDERERGLDEV_INCLUDE_DIRS} |
821 | 17 | 21 | ||
822 | === modified file 'tests/mirserver/ScreensModel/screensmodel_test.cpp' | |||
823 | --- tests/mirserver/ScreensModel/screensmodel_test.cpp 2016-04-29 15:41:00 +0000 | |||
824 | +++ tests/mirserver/ScreensModel/screensmodel_test.cpp 2016-06-06 19:37:34 +0000 | |||
825 | @@ -64,6 +64,7 @@ | |||
826 | 64 | void ScreensModelTest::TearDown() | 64 | void ScreensModelTest::TearDown() |
827 | 65 | { | 65 | { |
828 | 66 | delete screensModel; | 66 | delete screensModel; |
829 | 67 | delete app; | ||
830 | 67 | } | 68 | } |
831 | 68 | 69 | ||
832 | 69 | TEST_F(ScreensModelTest, SingleScreenFound) | 70 | TEST_F(ScreensModelTest, SingleScreenFound) |
833 | 70 | 71 | ||
834 | === modified file 'tests/mirserver/WindowManager/CMakeLists.txt' | |||
835 | --- tests/mirserver/WindowManager/CMakeLists.txt 2016-03-10 11:55:28 +0000 | |||
836 | +++ tests/mirserver/WindowManager/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
837 | @@ -1,5 +1,9 @@ | |||
838 | 1 | include_directories( | 1 | include_directories( |
839 | 2 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | 2 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
840 | 3 | ) | ||
841 | 4 | |||
842 | 5 | include_directories( | ||
843 | 6 | SYSTEM | ||
844 | 3 | ${MIRSERVER_INCLUDE_DIRS} | 7 | ${MIRSERVER_INCLUDE_DIRS} |
845 | 4 | ) | 8 | ) |
846 | 5 | 9 | ||
847 | 6 | 10 | ||
848 | === modified file 'tests/modules/Application/CMakeLists.txt' | |||
849 | --- tests/modules/Application/CMakeLists.txt 2015-12-15 10:03:32 +0000 | |||
850 | +++ tests/modules/Application/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
851 | @@ -7,8 +7,11 @@ | |||
852 | 7 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | 7 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
853 | 8 | ${CMAKE_SOURCE_DIR}/src/modules | 8 | ${CMAKE_SOURCE_DIR}/src/modules |
854 | 9 | ${CMAKE_SOURCE_DIR}/tests/framework | 9 | ${CMAKE_SOURCE_DIR}/tests/framework |
855 | 10 | ) | ||
856 | 11 | |||
857 | 12 | include_directories( | ||
858 | 13 | SYSTEM | ||
859 | 10 | ${MIRSERVER_INCLUDE_DIRS} | 14 | ${MIRSERVER_INCLUDE_DIRS} |
860 | 11 | |||
861 | 12 | ${Qt5Core_INCLUDE_DIRS} | 15 | ${Qt5Core_INCLUDE_DIRS} |
862 | 13 | ${Qt5GUI_INCLUDE_DIRS} | 16 | ${Qt5GUI_INCLUDE_DIRS} |
863 | 14 | ${Qt5Quick_INCLUDE_DIRS} | 17 | ${Qt5Quick_INCLUDE_DIRS} |
864 | 15 | 18 | ||
865 | === modified file 'tests/modules/Application/application_test.cpp' | |||
866 | --- tests/modules/Application/application_test.cpp 2016-05-02 12:57:40 +0000 | |||
867 | +++ tests/modules/Application/application_test.cpp 2016-06-06 19:37:34 +0000 | |||
868 | @@ -590,6 +590,38 @@ | |||
869 | 590 | EXPECT_EQ(Application::InternalState::StoppedResumable, application->internalState()); | 590 | EXPECT_EQ(Application::InternalState::StoppedResumable, application->internalState()); |
870 | 591 | } | 591 | } |
871 | 592 | 592 | ||
872 | 593 | TEST_F(ApplicationTests, surfaceCountPropertyUpdates) | ||
873 | 594 | { | ||
874 | 595 | using namespace ::testing; | ||
875 | 596 | |||
876 | 597 | QScopedPointer<Application> application(createApplicationWithFakes()); | ||
877 | 598 | |||
878 | 599 | application->setProcessState(Application::ProcessRunning); | ||
879 | 600 | Session *session = createSessionWithFakes(); | ||
880 | 601 | |||
881 | 602 | application->setSession(session); | ||
882 | 603 | |||
883 | 604 | QSignalSpy surfaceCountChangedSpy(application.data(), &Application::surfaceCountChanged); | ||
884 | 605 | |||
885 | 606 | EXPECT_EQ(application->surfaceCount(), 0); | ||
886 | 607 | EXPECT_EQ(surfaceCountChangedSpy.count(), 0); | ||
887 | 608 | |||
888 | 609 | FakeMirSurface *surface = new FakeMirSurface; | ||
889 | 610 | session->registerSurface(surface); | ||
890 | 611 | surface->drawFirstFrame(); | ||
891 | 612 | |||
892 | 613 | EXPECT_EQ(application->surfaceCount(), 1); | ||
893 | 614 | EXPECT_EQ(surfaceCountChangedSpy.count(), 1); | ||
894 | 615 | |||
895 | 616 | FakeMirSurface *surface2 = new FakeMirSurface; | ||
896 | 617 | session->registerSurface(surface2); | ||
897 | 618 | surface2->drawFirstFrame(); | ||
898 | 619 | |||
899 | 620 | EXPECT_EQ(application->surfaceCount(), 2); | ||
900 | 621 | EXPECT_EQ(surfaceCountChangedSpy.count(), 2); | ||
901 | 622 | |||
902 | 623 | } | ||
903 | 624 | |||
904 | 593 | /* | 625 | /* |
905 | 594 | Regression test for bug "App respawns if manually closed while it's launching" | 626 | Regression test for bug "App respawns if manually closed while it's launching" |
906 | 595 | https://bugs.launchpad.net/ubuntu/+source/qtmir/+bug/1575577 | 627 | https://bugs.launchpad.net/ubuntu/+source/qtmir/+bug/1575577 |
907 | 596 | 628 | ||
908 | === modified file 'tests/modules/ApplicationManager/CMakeLists.txt' | |||
909 | --- tests/modules/ApplicationManager/CMakeLists.txt 2015-09-30 15:45:17 +0000 | |||
910 | +++ tests/modules/ApplicationManager/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
911 | @@ -5,10 +5,14 @@ | |||
912 | 5 | ) | 5 | ) |
913 | 6 | 6 | ||
914 | 7 | include_directories( | 7 | include_directories( |
915 | 8 | ${APPLICATION_API_INCLUDE_DIRS} | ||
916 | 9 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | 8 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
917 | 10 | ${CMAKE_SOURCE_DIR}/src/modules | 9 | ${CMAKE_SOURCE_DIR}/src/modules |
918 | 11 | ${CMAKE_SOURCE_DIR}/tests/framework | 10 | ${CMAKE_SOURCE_DIR}/tests/framework |
919 | 11 | ) | ||
920 | 12 | |||
921 | 13 | include_directories( | ||
922 | 14 | SYSTEM | ||
923 | 15 | ${APPLICATION_API_INCLUDE_DIRS} | ||
924 | 12 | ${MIRSERVER_INCLUDE_DIRS} | 16 | ${MIRSERVER_INCLUDE_DIRS} |
925 | 13 | ) | 17 | ) |
926 | 14 | 18 | ||
927 | 15 | 19 | ||
928 | === modified file 'tests/modules/ApplicationManager/application_manager_test.cpp' | |||
929 | --- tests/modules/ApplicationManager/application_manager_test.cpp 2016-05-03 15:27:26 +0000 | |||
930 | +++ tests/modules/ApplicationManager/application_manager_test.cpp 2016-06-06 19:37:34 +0000 | |||
931 | @@ -118,6 +118,8 @@ | |||
932 | 118 | 118 | ||
933 | 119 | EXPECT_FALSE(authed); | 119 | EXPECT_FALSE(authed); |
934 | 120 | EXPECT_EQ(application, applicationManager.findApplication(dialer_app_id)); | 120 | EXPECT_EQ(application, applicationManager.findApplication(dialer_app_id)); |
935 | 121 | |||
936 | 122 | delete surface; | ||
937 | 121 | } | 123 | } |
938 | 122 | 124 | ||
939 | 123 | TEST_F(ApplicationManagerTests,application_dies_while_starting) | 125 | TEST_F(ApplicationManagerTests,application_dies_while_starting) |
940 | @@ -271,6 +273,10 @@ | |||
941 | 271 | 273 | ||
942 | 272 | TEST_F(ApplicationManagerTests,two_session_on_one_application) | 274 | TEST_F(ApplicationManagerTests,two_session_on_one_application) |
943 | 273 | { | 275 | { |
944 | 276 | int argc = 0; | ||
945 | 277 | char* argv[0]; | ||
946 | 278 | QCoreApplication qtApp(argc, argv); // app for deleteLater event | ||
947 | 279 | |||
948 | 274 | using namespace ::testing; | 280 | using namespace ::testing; |
949 | 275 | const pid_t a_procId = 5921; | 281 | const pid_t a_procId = 5921; |
950 | 276 | const char an_app_id[] = "some_app"; | 282 | const char an_app_id[] = "some_app"; |
951 | @@ -293,10 +299,18 @@ | |||
952 | 293 | 299 | ||
953 | 294 | EXPECT_EQ(true, authed); | 300 | EXPECT_EQ(true, authed); |
954 | 295 | EXPECT_EQ(second_session, the_app->session()->session()); | 301 | EXPECT_EQ(second_session, the_app->session()->session()); |
955 | 302 | |||
956 | 303 | onSessionStopping(first_session); | ||
957 | 304 | onSessionStopping(second_session); | ||
958 | 305 | qtApp.sendPostedEvents(nullptr, QEvent::DeferredDelete); | ||
959 | 296 | } | 306 | } |
960 | 297 | 307 | ||
961 | 298 | TEST_F(ApplicationManagerTests,two_session_on_one_application_after_starting) | 308 | TEST_F(ApplicationManagerTests,two_session_on_one_application_after_starting) |
962 | 299 | { | 309 | { |
963 | 310 | int argc = 0; | ||
964 | 311 | char* argv[0]; | ||
965 | 312 | QCoreApplication qtApp(argc, argv); // app for deleteLater event | ||
966 | 313 | |||
967 | 300 | using namespace ::testing; | 314 | using namespace ::testing; |
968 | 301 | const pid_t a_procId = 5921; | 315 | const pid_t a_procId = 5921; |
969 | 302 | const char an_app_id[] = "some_app"; | 316 | const char an_app_id[] = "some_app"; |
970 | @@ -323,6 +337,11 @@ | |||
971 | 323 | EXPECT_EQ(true, authed); | 337 | EXPECT_EQ(true, authed); |
972 | 324 | EXPECT_EQ(Application::Running, the_app->state()); | 338 | EXPECT_EQ(Application::Running, the_app->state()); |
973 | 325 | EXPECT_EQ(first_session, the_app->session()->session()); | 339 | EXPECT_EQ(first_session, the_app->session()->session()); |
974 | 340 | |||
975 | 341 | onSessionStopping(first_session); | ||
976 | 342 | onSessionStopping(second_session); | ||
977 | 343 | delete aSurface; | ||
978 | 344 | qtApp.sendPostedEvents(nullptr, QEvent::DeferredDelete); | ||
979 | 326 | } | 345 | } |
980 | 327 | 346 | ||
981 | 328 | TEST_F(ApplicationManagerTests,starting_app_is_suspended_when_it_gets_ready_if_requested) | 347 | TEST_F(ApplicationManagerTests,starting_app_is_suspended_when_it_gets_ready_if_requested) |
982 | @@ -357,6 +376,8 @@ | |||
983 | 357 | 376 | ||
984 | 358 | // now that its ready, suspend process should have begun | 377 | // now that its ready, suspend process should have begun |
985 | 359 | EXPECT_EQ(Application::InternalState::SuspendingWaitSession, app->internalState()); | 378 | EXPECT_EQ(Application::InternalState::SuspendingWaitSession, app->internalState()); |
986 | 379 | |||
987 | 380 | delete aSurface; | ||
988 | 360 | } | 381 | } |
989 | 361 | 382 | ||
990 | 362 | TEST_F(ApplicationManagerTests,requestFocusApplication) | 383 | TEST_F(ApplicationManagerTests,requestFocusApplication) |
991 | @@ -746,6 +767,8 @@ | |||
992 | 746 | // Check application state is correctly set | 767 | // Check application state is correctly set |
993 | 747 | Application *theApp = applicationManager.findApplication(appId); | 768 | Application *theApp = applicationManager.findApplication(appId); |
994 | 748 | EXPECT_EQ(theApp->state(), Application::Running); | 769 | EXPECT_EQ(theApp->state(), Application::Running); |
995 | 770 | |||
996 | 771 | delete surface; | ||
997 | 749 | } | 772 | } |
998 | 750 | 773 | ||
999 | 751 | /* | 774 | /* |
1000 | @@ -879,6 +902,8 @@ | |||
1001 | 879 | 902 | ||
1002 | 880 | EXPECT_EQ(2, countSpy.count()); //FIXME(greyback) | 903 | EXPECT_EQ(2, countSpy.count()); //FIXME(greyback) |
1003 | 881 | EXPECT_EQ(0, applicationManager.count()); | 904 | EXPECT_EQ(0, applicationManager.count()); |
1004 | 905 | |||
1005 | 906 | delete surface; | ||
1006 | 882 | } | 907 | } |
1007 | 883 | 908 | ||
1008 | 884 | /* | 909 | /* |
1009 | @@ -921,6 +946,8 @@ | |||
1010 | 921 | 946 | ||
1011 | 922 | EXPECT_EQ(countSpy.count(), 2); //FIXME(greyback) | 947 | EXPECT_EQ(countSpy.count(), 2); //FIXME(greyback) |
1012 | 923 | EXPECT_EQ(applicationManager.count(), 0); | 948 | EXPECT_EQ(applicationManager.count(), 0); |
1013 | 949 | |||
1014 | 950 | delete surface; | ||
1015 | 924 | } | 951 | } |
1016 | 925 | 952 | ||
1017 | 926 | /* | 953 | /* |
1018 | @@ -971,6 +998,8 @@ | |||
1019 | 971 | 998 | ||
1020 | 972 | EXPECT_EQ(0, countSpy.count()); | 999 | EXPECT_EQ(0, countSpy.count()); |
1021 | 973 | EXPECT_EQ(1, applicationManager.count()); | 1000 | EXPECT_EQ(1, applicationManager.count()); |
1022 | 1001 | |||
1023 | 1002 | delete surface; | ||
1024 | 974 | } | 1003 | } |
1025 | 975 | 1004 | ||
1026 | 976 | /* | 1005 | /* |
1027 | @@ -1023,6 +1052,8 @@ | |||
1028 | 1023 | 1052 | ||
1029 | 1024 | EXPECT_EQ(countSpy.count(), 0); | 1053 | EXPECT_EQ(countSpy.count(), 0); |
1030 | 1025 | EXPECT_EQ(applicationManager.count(), 1); | 1054 | EXPECT_EQ(applicationManager.count(), 1); |
1031 | 1055 | |||
1032 | 1056 | delete surface; | ||
1033 | 1026 | } | 1057 | } |
1034 | 1027 | 1058 | ||
1035 | 1028 | /* | 1059 | /* |
1036 | @@ -1092,6 +1123,8 @@ | |||
1037 | 1092 | 1123 | ||
1038 | 1093 | EXPECT_EQ(countSpy.count(), 2); //FIXME(greyback) | 1124 | EXPECT_EQ(countSpy.count(), 2); //FIXME(greyback) |
1039 | 1094 | EXPECT_EQ(applicationManager.count(), 0); | 1125 | EXPECT_EQ(applicationManager.count(), 0); |
1040 | 1126 | |||
1041 | 1127 | delete surface; | ||
1042 | 1095 | } | 1128 | } |
1043 | 1096 | 1129 | ||
1044 | 1097 | /* | 1130 | /* |
1045 | @@ -1133,6 +1166,8 @@ | |||
1046 | 1133 | 1166 | ||
1047 | 1134 | Application *app = applicationManager.findApplication(appId); | 1167 | Application *app = applicationManager.findApplication(appId); |
1048 | 1135 | EXPECT_EQ(nullptr, app); | 1168 | EXPECT_EQ(nullptr, app); |
1049 | 1169 | |||
1050 | 1170 | delete surface; | ||
1051 | 1136 | } | 1171 | } |
1052 | 1137 | 1172 | ||
1053 | 1138 | /* | 1173 | /* |
1054 | @@ -1187,6 +1222,8 @@ | |||
1055 | 1187 | EXPECT_EQ(1, applicationManager.count()); | 1222 | EXPECT_EQ(1, applicationManager.count()); |
1056 | 1188 | 1223 | ||
1057 | 1189 | EXPECT_EQ(Application::Stopped, app->state()); | 1224 | EXPECT_EQ(Application::Stopped, app->state()); |
1058 | 1225 | |||
1059 | 1226 | delete surface; | ||
1060 | 1190 | } | 1227 | } |
1061 | 1191 | 1228 | ||
1062 | 1192 | /* | 1229 | /* |
1063 | @@ -1236,6 +1273,10 @@ | |||
1064 | 1236 | */ | 1273 | */ |
1065 | 1237 | TEST_F(ApplicationManagerTests,unexpectedStopOfForegroundWebapp) | 1274 | TEST_F(ApplicationManagerTests,unexpectedStopOfForegroundWebapp) |
1066 | 1238 | { | 1275 | { |
1067 | 1276 | int argc = 0; | ||
1068 | 1277 | char* argv[0]; | ||
1069 | 1278 | QCoreApplication qtApp(argc, argv); // app for deleteLater event | ||
1070 | 1279 | |||
1071 | 1239 | using namespace ::testing; | 1280 | using namespace ::testing; |
1072 | 1240 | const QString appId("webapp"); | 1281 | const QString appId("webapp"); |
1073 | 1241 | const pid_t procId1 = 5551; | 1282 | const pid_t procId1 = 5551; |
1074 | @@ -1279,6 +1320,10 @@ | |||
1075 | 1279 | 1320 | ||
1076 | 1280 | EXPECT_EQ(countSpy.count(), 2); //FIXME(greyback) | 1321 | EXPECT_EQ(countSpy.count(), 2); //FIXME(greyback) |
1077 | 1281 | EXPECT_EQ(applicationManager.count(), 0); | 1322 | EXPECT_EQ(applicationManager.count(), 0); |
1078 | 1323 | |||
1079 | 1324 | delete surface; | ||
1080 | 1325 | |||
1081 | 1326 | qtApp.sendPostedEvents(nullptr, QEvent::DeferredDelete); | ||
1082 | 1282 | } | 1327 | } |
1083 | 1283 | 1328 | ||
1084 | 1284 | /* | 1329 | /* |
1085 | @@ -1287,6 +1332,10 @@ | |||
1086 | 1287 | */ | 1332 | */ |
1087 | 1288 | TEST_F(ApplicationManagerTests,unexpectedStopOfBackgroundWebapp) | 1333 | TEST_F(ApplicationManagerTests,unexpectedStopOfBackgroundWebapp) |
1088 | 1289 | { | 1334 | { |
1089 | 1335 | int argc = 0; | ||
1090 | 1336 | char* argv[0]; | ||
1091 | 1337 | QCoreApplication qtApp(argc, argv); // app for deleteLater event | ||
1092 | 1338 | |||
1093 | 1290 | using namespace ::testing; | 1339 | using namespace ::testing; |
1094 | 1291 | const QString appId("webapp"); | 1340 | const QString appId("webapp"); |
1095 | 1292 | const pid_t procId1 = 5551; | 1341 | const pid_t procId1 = 5551; |
1096 | @@ -1336,6 +1385,11 @@ | |||
1097 | 1336 | onSessionStopping(session1); | 1385 | onSessionStopping(session1); |
1098 | 1337 | 1386 | ||
1099 | 1338 | EXPECT_EQ(0, countSpy.count()); | 1387 | EXPECT_EQ(0, countSpy.count()); |
1100 | 1388 | |||
1101 | 1389 | delete surface1; | ||
1102 | 1390 | delete surface2; | ||
1103 | 1391 | |||
1104 | 1392 | qtApp.sendPostedEvents(nullptr, QEvent::DeferredDelete); | ||
1105 | 1339 | } | 1393 | } |
1106 | 1340 | 1394 | ||
1107 | 1341 | /* | 1395 | /* |
1108 | @@ -1460,6 +1514,8 @@ | |||
1109 | 1460 | 1514 | ||
1110 | 1461 | EXPECT_EQ(Application::Running, the_app->state()); | 1515 | EXPECT_EQ(Application::Running, the_app->state()); |
1111 | 1462 | ASSERT_EQ(Application::InternalState::Running, the_app->internalState()); | 1516 | ASSERT_EQ(Application::InternalState::Running, the_app->internalState()); |
1112 | 1517 | |||
1113 | 1518 | delete surface; | ||
1114 | 1463 | } | 1519 | } |
1115 | 1464 | 1520 | ||
1116 | 1465 | /* | 1521 | /* |
1117 | @@ -1499,6 +1555,8 @@ | |||
1118 | 1499 | EXPECT_FALSE(sharedWakelock.enabled()); | 1555 | EXPECT_FALSE(sharedWakelock.enabled()); |
1119 | 1500 | ASSERT_EQ(Application::InternalState::RunningInBackground, application->internalState()); | 1556 | ASSERT_EQ(Application::InternalState::RunningInBackground, application->internalState()); |
1120 | 1501 | EXPECT_EQ(Application::Running, application->state()); | 1557 | EXPECT_EQ(Application::Running, application->state()); |
1121 | 1558 | |||
1122 | 1559 | delete surface; | ||
1123 | 1502 | } | 1560 | } |
1124 | 1503 | 1561 | ||
1125 | 1504 | /* | 1562 | /* |
1126 | @@ -1628,6 +1686,8 @@ | |||
1127 | 1628 | 1686 | ||
1128 | 1629 | EXPECT_EQ(0, applicationManager.count()); | 1687 | EXPECT_EQ(0, applicationManager.count()); |
1129 | 1630 | EXPECT_TRUE(dir.exists()); | 1688 | EXPECT_TRUE(dir.exists()); |
1130 | 1689 | |||
1131 | 1690 | delete aSurface; | ||
1132 | 1631 | } | 1691 | } |
1133 | 1632 | 1692 | ||
1134 | 1633 | /* | 1693 | /* |
1135 | @@ -1652,6 +1712,8 @@ | |||
1136 | 1652 | applicationManager.stopApplication(appId); | 1712 | applicationManager.stopApplication(appId); |
1137 | 1653 | 1713 | ||
1138 | 1654 | EXPECT_EQ(1, spy.count()); | 1714 | EXPECT_EQ(1, spy.count()); |
1139 | 1715 | |||
1140 | 1716 | delete surface; | ||
1141 | 1655 | } | 1717 | } |
1142 | 1656 | 1718 | ||
1143 | 1657 | 1719 | ||
1144 | @@ -1899,4 +1961,6 @@ | |||
1145 | 1899 | surface->requestFocus(); | 1961 | surface->requestFocus(); |
1146 | 1900 | 1962 | ||
1147 | 1901 | EXPECT_EQ(1, focusRequestedSpy.count()); | 1963 | EXPECT_EQ(1, focusRequestedSpy.count()); |
1148 | 1964 | |||
1149 | 1965 | delete surface; | ||
1150 | 1902 | } | 1966 | } |
1151 | 1903 | 1967 | ||
1152 | === modified file 'tests/modules/SessionManager/CMakeLists.txt' | |||
1153 | --- tests/modules/SessionManager/CMakeLists.txt 2015-09-30 15:45:17 +0000 | |||
1154 | +++ tests/modules/SessionManager/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
1155 | @@ -6,10 +6,14 @@ | |||
1156 | 6 | ) | 6 | ) |
1157 | 7 | 7 | ||
1158 | 8 | include_directories( | 8 | include_directories( |
1159 | 9 | ${APPLICATION_API_INCLUDE_DIRS} | ||
1160 | 10 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | 9 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
1161 | 11 | ${CMAKE_SOURCE_DIR}/src/modules | 10 | ${CMAKE_SOURCE_DIR}/src/modules |
1162 | 12 | ${CMAKE_SOURCE_DIR}/tests/framework | 11 | ${CMAKE_SOURCE_DIR}/tests/framework |
1163 | 12 | ) | ||
1164 | 13 | |||
1165 | 14 | include_directories( | ||
1166 | 15 | SYSTEM | ||
1167 | 16 | ${APPLICATION_API_INCLUDE_DIRS} | ||
1168 | 13 | ${MIRSERVER_INCLUDE_DIRS} | 17 | ${MIRSERVER_INCLUDE_DIRS} |
1169 | 14 | ) | 18 | ) |
1170 | 15 | 19 | ||
1171 | 16 | 20 | ||
1172 | === modified file 'tests/modules/SessionManager/session_test.cpp' | |||
1173 | --- tests/modules/SessionManager/session_test.cpp 2016-05-24 21:32:06 +0000 | |||
1174 | +++ tests/modules/SessionManager/session_test.cpp 2016-06-06 19:37:34 +0000 | |||
1175 | @@ -62,6 +62,8 @@ | |||
1176 | 62 | 62 | ||
1177 | 63 | surface->drawFirstFrame(); | 63 | surface->drawFirstFrame(); |
1178 | 64 | EXPECT_EQ(Session::Running, session->state()); | 64 | EXPECT_EQ(Session::Running, session->state()); |
1179 | 65 | |||
1180 | 66 | delete surface; | ||
1181 | 65 | } | 67 | } |
1182 | 66 | 68 | ||
1183 | 67 | TEST_F(SessionTests, AddChildSession) | 69 | TEST_F(SessionTests, AddChildSession) |
1184 | @@ -220,6 +222,7 @@ | |||
1185 | 220 | FakeMirSurface *surface = new FakeMirSurface; | 222 | FakeMirSurface *surface = new FakeMirSurface; |
1186 | 221 | session->registerSurface(surface); | 223 | session->registerSurface(surface); |
1187 | 222 | surface->drawFirstFrame(); | 224 | surface->drawFirstFrame(); |
1188 | 225 | delete surface; | ||
1189 | 223 | } | 226 | } |
1190 | 224 | EXPECT_EQ(Session::Running, session->state()); | 227 | EXPECT_EQ(Session::Running, session->state()); |
1191 | 225 | 228 | ||
1192 | @@ -251,6 +254,7 @@ | |||
1193 | 251 | FakeMirSurface *surface = new FakeMirSurface; | 254 | FakeMirSurface *surface = new FakeMirSurface; |
1194 | 252 | session->registerSurface(surface); | 255 | session->registerSurface(surface); |
1195 | 253 | surface->drawFirstFrame(); | 256 | surface->drawFirstFrame(); |
1196 | 257 | delete surface; | ||
1197 | 254 | } | 258 | } |
1198 | 255 | EXPECT_EQ(Session::Running, session->state()); | 259 | EXPECT_EQ(Session::Running, session->state()); |
1199 | 256 | 260 | ||
1200 | @@ -296,6 +300,7 @@ | |||
1201 | 296 | FakeMirSurface *surface = new FakeMirSurface; | 300 | FakeMirSurface *surface = new FakeMirSurface; |
1202 | 297 | session->registerSurface(surface); | 301 | session->registerSurface(surface); |
1203 | 298 | surface->drawFirstFrame(); | 302 | surface->drawFirstFrame(); |
1204 | 303 | delete surface; | ||
1205 | 299 | } | 304 | } |
1206 | 300 | EXPECT_EQ(Session::Running, session->state()); | 305 | EXPECT_EQ(Session::Running, session->state()); |
1207 | 301 | 306 | ||
1208 | 302 | 307 | ||
1209 | === modified file 'tests/modules/SharedWakelock/CMakeLists.txt' | |||
1210 | --- tests/modules/SharedWakelock/CMakeLists.txt 2015-09-30 15:45:17 +0000 | |||
1211 | +++ tests/modules/SharedWakelock/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
1212 | @@ -5,6 +5,10 @@ | |||
1213 | 5 | 5 | ||
1214 | 6 | include_directories( | 6 | include_directories( |
1215 | 7 | ${CMAKE_SOURCE_DIR}/src/modules | 7 | ${CMAKE_SOURCE_DIR}/src/modules |
1216 | 8 | ) | ||
1217 | 9 | |||
1218 | 10 | include_directories( | ||
1219 | 11 | SYSTEM | ||
1220 | 8 | ${QTDBUSTEST_INCLUDE_DIRS} | 12 | ${QTDBUSTEST_INCLUDE_DIRS} |
1221 | 9 | ${QTDBUSMOCK_INCLUDE_DIRS} | 13 | ${QTDBUSMOCK_INCLUDE_DIRS} |
1222 | 10 | ) | 14 | ) |
1223 | 11 | 15 | ||
1224 | === modified file 'tests/modules/SurfaceManager/CMakeLists.txt' | |||
1225 | --- tests/modules/SurfaceManager/CMakeLists.txt 2016-05-24 20:13:10 +0000 | |||
1226 | +++ tests/modules/SurfaceManager/CMakeLists.txt 2016-06-06 19:37:34 +0000 | |||
1227 | @@ -9,6 +9,10 @@ | |||
1228 | 9 | ${CMAKE_SOURCE_DIR}/src/modules | 9 | ${CMAKE_SOURCE_DIR}/src/modules |
1229 | 10 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver | 10 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
1230 | 11 | ${CMAKE_SOURCE_DIR}/tests/framework | 11 | ${CMAKE_SOURCE_DIR}/tests/framework |
1231 | 12 | ) | ||
1232 | 13 | |||
1233 | 14 | include_directories( | ||
1234 | 15 | SYSTEM | ||
1235 | 12 | ${MIRSERVER_INCLUDE_DIRS} | 16 | ${MIRSERVER_INCLUDE_DIRS} |
1236 | 13 | ${Qt5Quick_PRIVATE_INCLUDE_DIRS} | 17 | ${Qt5Quick_PRIVATE_INCLUDE_DIRS} |
1237 | 14 | ) | 18 | ) |