Merge lp:~aacid/qtmir/clazy_run into lp:qtmir

Proposed by Albert Astals Cid
Status: Superseded
Proposed branch: lp:~aacid/qtmir/clazy_run
Merge into: lp:qtmir
Prerequisite: lp:~ci-train-bot/qtmir/qtmir-ubuntu-yakkety-landing-025
Diff against target: 1410 lines (+206/-155)
61 files modified
CMakeLists.txt (+4/-6)
demos/qml-demo-client/CMakeLists.txt (+3/-6)
demos/qml-demo-shell/CMakeLists.txt (+3/-6)
src/common/debughelpers.cpp (+12/-12)
src/modules/Unity/Application/CMakeLists.txt (+6/-2)
src/modules/Unity/Application/application.cpp (+5/-5)
src/modules/Unity/Application/application.h (+1/-1)
src/modules/Unity/Application/application_manager.cpp (+9/-9)
src/modules/Unity/Application/application_manager.h (+1/-1)
src/modules/Unity/Application/dbuswindowstack.cpp (+4/-3)
src/modules/Unity/Application/mirbuffersgtexture.cpp (+1/-1)
src/modules/Unity/Application/mirbuffersgtexture.h (+1/-1)
src/modules/Unity/Application/mirsurface.cpp (+1/-1)
src/modules/Unity/Application/mirsurfaceitem.cpp (+6/-6)
src/modules/Unity/Application/mirsurfaceitem.h (+1/-1)
src/modules/Unity/Application/mirsurfacemanager.cpp (+2/-2)
src/modules/Unity/Application/mirsurfacemanager.h (+1/-1)
src/modules/Unity/Application/proc_info.cpp (+1/-1)
src/modules/Unity/Application/session.cpp (+8/-8)
src/modules/Unity/Application/session.h (+3/-3)
src/modules/Unity/Application/session_interface.h (+2/-2)
src/modules/Unity/Application/sessionmanager.cpp (+1/-1)
src/modules/Unity/Application/sharedwakelock.cpp (+4/-4)
src/modules/Unity/Application/ubuntukeyboardinfo.cpp (+1/-1)
src/modules/Unity/Application/upstart/taskcontroller.cpp (+1/-1)
src/modules/Unity/Screens/CMakeLists.txt (+4/-0)
src/modules/Unity/Screens/qquickscreenwindow.cpp (+1/-1)
src/platforms/mirserver/CMakeLists.txt (+4/-0)
src/platforms/mirserver/clipboard.cpp (+3/-2)
src/platforms/mirserver/creationhints.cpp (+1/-1)
src/platforms/mirserver/creationhints.h (+1/-1)
src/platforms/mirserver/cursor.cpp (+25/-25)
src/platforms/mirserver/cursor.h (+1/-0)
src/platforms/mirserver/mircursorimages.cpp (+1/-1)
src/platforms/mirserver/nativeinterface.cpp (+2/-2)
src/platforms/mirserver/nativeinterface.h (+2/-1)
src/platforms/mirserver/plugin.cpp (+1/-1)
src/platforms/mirserver/qteventfeeder.cpp (+1/-1)
src/platforms/mirserver/screen.cpp (+7/-7)
src/platforms/mirserver/screenscontroller.cpp (+2/-2)
src/platforms/mirserver/screenscontroller.h (+1/-1)
src/platforms/mirserver/screensmodel.cpp (+7/-7)
src/platforms/mirserver/screensmodel.h (+1/-1)
src/platforms/mirserver/sessionlistener.cpp (+1/-1)
src/platforms/mirserver/sessionlistener.h (+1/-1)
src/platforms/mirserver/surfaceobserver.cpp (+2/-2)
src/platforms/mirserver/surfaceobserver.h (+2/-2)
tests/framework/CMakeLists.txt (+5/-1)
tests/framework/fake_session.cpp (+2/-2)
tests/framework/fake_session.h (+2/-2)
tests/framework/mock_session.h (+2/-2)
tests/mirserver/Clipboard/CMakeLists.txt (+4/-0)
tests/mirserver/QtEventFeeder/CMakeLists.txt (+4/-0)
tests/mirserver/Screen/CMakeLists.txt (+4/-0)
tests/mirserver/ScreensModel/CMakeLists.txt (+4/-0)
tests/mirserver/WindowManager/CMakeLists.txt (+4/-0)
tests/modules/Application/CMakeLists.txt (+4/-1)
tests/modules/ApplicationManager/CMakeLists.txt (+5/-1)
tests/modules/SessionManager/CMakeLists.txt (+5/-1)
tests/modules/SharedWakelock/CMakeLists.txt (+4/-0)
tests/modules/SurfaceManager/CMakeLists.txt (+4/-0)
To merge this branch: bzr merge lp:~aacid/qtmir/clazy_run
Reviewer Review Type Date Requested Status
Unity8 CI Bot (community) continuous-integration Needs Fixing
PS Jenkins bot continuous-integration Pending
Mir development team Pending
Review via email: mp+296596@code.launchpad.net

This proposal supersedes a proposal from 2015-09-08.

This proposal has been superseded by a proposal from 2016-06-06.

Commit message

Improvements from running clazy over the code

* Use QStringLiterals for literals
* Add some QLatin1Strings
* Add some reserve() calls
* Change a QList to QVector since QList is not optimal on big items
* Add some const &
* Add one override
* Fix some struct/class mistmatches

clazy: https://quickgit.kde.org/?p=scratch%2Fsmartins%2Fclazy.git
Run over the src folder

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Was this all done by the script? We've a couple of big things to land, and this will conflict with them all. Would prefer to do this when things more quiet.

Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

This is manual (acting on the tool warnings):
 * Add some reserve() calls
 * Change a QList to QVector since QList is not optimal on big items
 * Add some const &
 * Add one override
 * Fix some struct/class mistmatches

This is automatic:
 * Use QStringLiterals for literals
 * Add some QLatin1Strings

We're working on some improvements on the tool so that QLatin1String is used in places it is better than QStringLiteral so may make sense wait for that to land.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:378
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-1-ci/10/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-1-ci/10/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

So what's the fate of this branch?

Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Gerry always says he wants it in when I complain, but then nothing happens. I guess at this point it probably doesn't merge correctly? I can update it if there's real desire to merge it in.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:519
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/261/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/1884/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1910
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1846
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1846
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1846
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1837/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/261/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:520
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/263/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/1885/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1911
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1847
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1847
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1847
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1838/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/263/rebuild

review: Needs Fixing (continuous-integration)
lp:~aacid/qtmir/clazy_run updated
521. By Albert Astals Cid

Merge trunk

522. By Albert Astals Cid

Merge

523. By Albert Astals Cid

Merge

524. By Albert Astals Cid

Merge

525. By Albert Astals Cid

wops, remove

526. By Albert Astals Cid

spacing

527. By Albert Astals Cid

Remove change that conflicts with other branch removing this code

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-06-06 19:34:36 +0000
+++ CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -85,21 +85,19 @@
85pkg_check_modules(QTDBUSMOCK libqtdbusmock-1 REQUIRED)85pkg_check_modules(QTDBUSMOCK libqtdbusmock-1 REQUIRED)
86pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=18)86pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=18)
8787
88include_directories(${APPLICATION_API_INCLUDE_DIRS})88include_directories(SYSTEM ${APPLICATION_API_INCLUDE_DIRS})
8989
90add_definitions(-DMIR_REQUIRE_DEPRECATED_EVENT_OPT_IN=1)90add_definitions(-DMIR_REQUIRE_DEPRECATED_EVENT_OPT_IN=1)
9191
92# Use the fast string builder92# Use the fast string builder
93add_definitions(-DQT_USE_QSTRINGBUILDER)93add_definitions(-DQT_USE_QSTRINGBUILDER)
9494
95include_directories( ${APPLICATION_API_INCLUDE_DIRS} )
96
97# We expect this to be set via debian/rules for GLES builds95# We expect this to be set via debian/rules for GLES builds
98if ("${USE_OPENGLES}" STREQUAL 1)96if ("${USE_OPENGLES}" STREQUAL 1)
99 message(STATUS "Qt5 determined to be compiled with GLES support")97 message(STATUS "Qt5 determined to be compiled with GLES support")
100 pkg_check_modules(GLESv2 glesv2)98 pkg_check_modules(GLESv2 glesv2)
101 add_definitions(-DQT_USING_GLES)99 add_definitions(-DQT_USING_GLES)
102 include_directories (${GLESv2_INCLUDE_DIRS})100 include_directories (SYSTEM ${GLESv2_INCLUDE_DIRS})
103 set (GL_LIBRARIES "${GLESv2_LIBRARIES}")101 set (GL_LIBRARIES "${GLESv2_LIBRARIES}")
104# Because qt/gl and qt/gles are not parallel installable we have a difficulty102# Because qt/gl and qt/gles are not parallel installable we have a difficulty
105# building qtmir-desktop on armhf. We would like to link against opengl and bind the103# building qtmir-desktop on armhf. We would like to link against opengl and bind the
@@ -110,13 +108,13 @@
110 message(STATUS "Linking against OpenGL ES but binding OpenGL API")108 message(STATUS "Linking against OpenGL ES but binding OpenGL API")
111 pkg_check_modules(GLESv2 glesv2)109 pkg_check_modules(GLESv2 glesv2)
112 add_definitions(-DQT_USING_GL)110 add_definitions(-DQT_USING_GL)
113 include_directories (${GLESv2_INCLUDE_DIRS})111 include_directories (SYSTEM ${GLESv2_INCLUDE_DIRS})
114 set (GL_LIBRARIES "${GLESv2_LIBRARIES}")112 set (GL_LIBRARIES "${GLESv2_LIBRARIES}")
115else()113else()
116 message(STATUS "Qt5 determined to be compiled with OpenGL support")114 message(STATUS "Qt5 determined to be compiled with OpenGL support")
117 pkg_check_modules(GL gl)115 pkg_check_modules(GL gl)
118 add_definitions(-DQT_USING_OPENGL)116 add_definitions(-DQT_USING_OPENGL)
119 include_directories (${GL_INCLUDE_DIRS})117 include_directories (SYSTEM ${GL_INCLUDE_DIRS})
120endif()118endif()
121119
122# Standard install paths120# Standard install paths
123121
=== modified file 'demos/qml-demo-client/CMakeLists.txt'
--- demos/qml-demo-client/CMakeLists.txt 2015-09-01 16:16:47 +0000
+++ demos/qml-demo-client/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -2,19 +2,16 @@
2configure_file(${DEMO_CLIENT}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${DEMO_CLIENT}.desktop @ONLY)2configure_file(${DEMO_CLIENT}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${DEMO_CLIENT}.desktop @ONLY)
33
4include_directories(4include_directories(
5 SYSTEM
5 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}6 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
7 ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
8 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
6)9)
710
8add_executable(${DEMO_CLIENT}11add_executable(${DEMO_CLIENT}
9 main.cpp12 main.cpp
10)13)
1114
12include_directories(
13 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
14 ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
15 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
16)
17
18target_link_libraries(15target_link_libraries(
19 ${DEMO_CLIENT}16 ${DEMO_CLIENT}
20 Qt5::Core17 Qt5::Core
2118
=== modified file 'demos/qml-demo-shell/CMakeLists.txt'
--- demos/qml-demo-shell/CMakeLists.txt 2015-09-01 16:16:47 +0000
+++ demos/qml-demo-shell/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -1,19 +1,16 @@
1set(DEMO_SHELL qtmir-demo-shell)1set(DEMO_SHELL qtmir-demo-shell)
22
3include_directories(3include_directories(
4 SYSTEM
4 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}5 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
6 ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
7 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
5)8)
69
7add_executable(${DEMO_SHELL}10add_executable(${DEMO_SHELL}
8 main.cpp11 main.cpp
9)12)
1013
11include_directories(
12 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
13 ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
14 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
15)
16
17target_link_libraries(14target_link_libraries(
18 ${DEMO_SHELL}15 ${DEMO_SHELL}
19 Qt5::Core16 Qt5::Core
2017
=== modified file 'src/common/debughelpers.cpp'
--- src/common/debughelpers.cpp 2016-06-06 19:34:36 +0000
+++ src/common/debughelpers.cpp 2016-06-06 19:34:36 +0000
@@ -63,7 +63,7 @@
6363
64 const QTouchEvent::TouchPoint& touchPoint = ev->touchPoints().at(i);64 const QTouchEvent::TouchPoint& touchPoint = ev->touchPoints().at(i);
65 message.append(65 message.append(
66 QString("(id:%1, state:%2, scenePos:(%3,%4), pos:(%5,%6)) ")66 QStringLiteral("(id:%1, state:%2, scenePos:(%3,%4), pos:(%5,%6)) ")
67 .arg(touchPoint.id())67 .arg(touchPoint.id())
68 .arg(touchPointStateToString(touchPoint.state()))68 .arg(touchPointStateToString(touchPoint.state()))
69 .arg(touchPoint.scenePos().x())69 .arg(touchPoint.scenePos().x())
@@ -82,30 +82,30 @@
8282
83 switch (attrib) {83 switch (attrib) {
84 case mir_surface_attrib_type:84 case mir_surface_attrib_type:
85 str = QString("type=%1").arg(mirSurfaceTypeToStr(value));85 str = QStringLiteral("type=%1").arg(mirSurfaceTypeToStr(value));
86 break;86 break;
8787
88 case mir_surface_attrib_state:88 case mir_surface_attrib_state:
89 str = QString("state=%1").arg(mirSurfaceStateToStr(value));89 str = QStringLiteral("state=%1").arg(mirSurfaceStateToStr(value));
90 break;90 break;
9191
92 case mir_surface_attrib_swapinterval:92 case mir_surface_attrib_swapinterval:
93 str = QString("swapinterval=%1").arg(value);93 str = QStringLiteral("swapinterval=%1").arg(value);
94 break;94 break;
9595
96 case mir_surface_attrib_focus:96 case mir_surface_attrib_focus:
97 str = QString("focus=%1").arg(mirSurfaceFocusStateToStr(value));97 str = QStringLiteral("focus=%1").arg(mirSurfaceFocusStateToStr(value));
98 break;98 break;
9999
100 case mir_surface_attrib_dpi:100 case mir_surface_attrib_dpi:
101 str = QString("dpi=%1").arg(value);101 str = QStringLiteral("dpi=%1").arg(value);
102 break;102 break;
103103
104 case mir_surface_attrib_visibility:104 case mir_surface_attrib_visibility:
105 str = QString("visibility=%1").arg(mirSurfaceVisibilityToStr(value));105 str = QStringLiteral("visibility=%1").arg(mirSurfaceVisibilityToStr(value));
106 break;106 break;
107 default:107 default:
108 str = QString("type'%1'=%2").arg((int)attrib).arg(value);108 str = QStringLiteral("type'%1'=%2").arg((int)attrib).arg(value);
109 }109 }
110110
111 return str;111 return str;
@@ -211,7 +211,7 @@
211211
212QString mirPointerEventToString(MirPointerEvent const* event)212QString mirPointerEventToString(MirPointerEvent const* event)
213{213{
214 QString string = QString("MirPointerEvent(x=%1,y=%2,relative_x=%3,relative_y=%4)")214 QString string = QStringLiteral("MirPointerEvent(x=%1,y=%2,relative_x=%3,relative_y=%4)")
215 .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_x))215 .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_x))
216 .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_y))216 .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_y))
217 .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_relative_x))217 .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_relative_x))
@@ -224,7 +224,7 @@
224{224{
225 const int pointerCount = mir_touch_event_point_count(event);225 const int pointerCount = mir_touch_event_point_count(event);
226226
227 QString string("MirTouchEvent(");227 QString string(QStringLiteral("MirTouchEvent("));
228228
229 for (int i = 0; i < pointerCount; ++i) {229 for (int i = 0; i < pointerCount; ++i) {
230230
@@ -234,7 +234,7 @@
234234
235 MirTouchAction touchAction = mir_touch_event_action(event, i);235 MirTouchAction touchAction = mir_touch_event_action(event, i);
236236
237 QString touchStr = QString("(id=%1,action=%2,x=%3,y=%4)")237 QString touchStr = QStringLiteral("(id=%1,action=%2,x=%3,y=%4)")
238 .arg(mir_touch_event_id(event, i))238 .arg(mir_touch_event_id(event, i))
239 .arg(mirTouchActionToString(touchAction))239 .arg(mirTouchActionToString(touchAction))
240 .arg(mir_touch_event_axis_value(event, i, mir_touch_axis_x))240 .arg(mir_touch_event_axis_value(event, i, mir_touch_axis_x))
@@ -291,7 +291,7 @@
291291
292 xkb_keysym_t keyCode = mir_keyboard_event_key_code(event);292 xkb_keysym_t keyCode = mir_keyboard_event_key_code(event);
293293
294 return QString("MirKeyboardEvent(action=%1,key_code=0x%2)")294 return QStringLiteral("MirKeyboardEvent(action=%1,key_code=0x%2)")
295 .arg(mirKeyboardActionToString(keyboardAction))295 .arg(mirKeyboardActionToString(keyboardAction))
296 .arg(keyCode, 4, 16, QLatin1Char('0'));296 .arg(keyCode, 4, 16, QLatin1Char('0'));
297}297}
298298
=== modified file 'src/modules/Unity/Application/CMakeLists.txt'
--- src/modules/Unity/Application/CMakeLists.txt 2016-04-26 08:56:36 +0000
+++ src/modules/Unity/Application/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -1,4 +1,10 @@
1include_directories(1include_directories(
2 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
3 ${CMAKE_SOURCE_DIR}/src/common
4)
5
6include_directories(
7 SYSTEM
2 ${GLIB_INCLUDE_DIRS}8 ${GLIB_INCLUDE_DIRS}
3 ${GIO_INCLUDE_DIRS}9 ${GIO_INCLUDE_DIRS}
4 ${GIO_UNIX_INCLUDE_DIRS}10 ${GIO_UNIX_INCLUDE_DIRS}
@@ -7,8 +13,6 @@
7 ${PROCESS_CPP_INCLUDE_DIRS}13 ${PROCESS_CPP_INCLUDE_DIRS}
8 ${UBUNTU_PLATFORM_API_INCLUDE_DIRS}14 ${UBUNTU_PLATFORM_API_INCLUDE_DIRS}
9 ${UBUNTU_APP_LAUNCH_INCLUDE_DIRS}15 ${UBUNTU_APP_LAUNCH_INCLUDE_DIRS}
10 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
11 ${CMAKE_SOURCE_DIR}/src/common
12 ${GSETTINGS_QT_INCLUDE_DIRS}16 ${GSETTINGS_QT_INCLUDE_DIRS}
1317
14 ${LTTNG_INCLUDE_DIRS}18 ${LTTNG_INCLUDE_DIRS}
1519
=== modified file 'src/modules/Unity/Application/application.cpp'
--- src/modules/Unity/Application/application.cpp 2016-06-06 19:34:36 +0000
+++ src/modules/Unity/Application/application.cpp 2016-06-06 19:34:36 +0000
@@ -174,8 +174,8 @@
174 color.setAlpha(255);174 color.setAlpha(255);
175 } else {175 } else {
176 color.setRgba(qRgba(0, 0, 0, 0));176 color.setRgba(qRgba(0, 0, 0, 0));
177 qCWarning(QTMIR_APPLICATIONS) << QString("Invalid %1: \"%2\"")177 qCWarning(QTMIR_APPLICATIONS) << QStringLiteral("Invalid %1: \"%2\"")
178 .arg(colorName).arg(colorString);178 .arg(colorName, colorString);
179 }179 }
180 }180 }
181181
@@ -466,7 +466,7 @@
466 m_pid = pid;466 m_pid = pid;
467}467}
468468
469void Application::setArguments(const QStringList arguments)469void Application::setArguments(const QStringList &arguments)
470{470{
471 m_arguments = arguments;471 m_arguments = arguments;
472}472}
@@ -738,7 +738,7 @@
738738
739void Application::acquireWakelock() const739void Application::acquireWakelock() const
740{740{
741 if (appId() == "unity8-dash")741 if (appId() == QLatin1String("unity8-dash"))
742 return;742 return;
743743
744 m_sharedWakelock->acquire(this);744 m_sharedWakelock->acquire(this);
@@ -746,7 +746,7 @@
746746
747void Application::releaseWakelock() const747void Application::releaseWakelock() const
748{748{
749 if (appId() == "unity8-dash")749 if (appId() == QLatin1String("unity8-dash"))
750 return;750 return;
751751
752 m_sharedWakelock->release(this);752 m_sharedWakelock->release(this);
753753
=== modified file 'src/modules/Unity/Application/application.h'
--- src/modules/Unity/Application/application.h 2016-06-06 19:34:36 +0000
+++ src/modules/Unity/Application/application.h 2016-06-06 19:34:36 +0000
@@ -160,7 +160,7 @@
160 void acquireWakelock() const;160 void acquireWakelock() const;
161 void releaseWakelock() const;161 void releaseWakelock() const;
162 void setPid(pid_t pid);162 void setPid(pid_t pid);
163 void setArguments(const QStringList arguments);163 void setArguments(const QStringList &arguments);
164 void setInternalState(InternalState state);164 void setInternalState(InternalState state);
165 void wipeQMLCache();165 void wipeQMLCache();
166 void suspend();166 void suspend();
167167
=== modified file 'src/modules/Unity/Application/application_manager.cpp'
--- src/modules/Unity/Application/application_manager.cpp 2016-05-06 08:41:15 +0000
+++ src/modules/Unity/Application/application_manager.cpp 2016-06-06 19:34:36 +0000
@@ -64,12 +64,12 @@
6464
65// FIXME: To be removed once shell has fully adopted short appIds!!65// FIXME: To be removed once shell has fully adopted short appIds!!
66QString toShortAppIdIfPossible(const QString &appId) {66QString toShortAppIdIfPossible(const QString &appId) {
67 QRegExp longAppIdMask("[a-z0-9][a-z0-9+.-]+_[a-zA-Z0-9+.-]+_[0-9][a-zA-Z0-9.+:~-]*");67 QRegExp longAppIdMask(QStringLiteral("[a-z0-9][a-z0-9+.-]+_[a-zA-Z0-9+.-]+_[0-9][a-zA-Z0-9.+:~-]*"));
68 if (longAppIdMask.exactMatch(appId)) {68 if (longAppIdMask.exactMatch(appId)) {
69 qWarning() << "WARNING: long App ID encountered:" << appId;69 qWarning() << "WARNING: long App ID encountered:" << appId;
70 // input string a long AppId, chop the version string off the end70 // input string a long AppId, chop the version string off the end
71 QStringList parts = appId.split("_");71 QStringList parts = appId.split(QStringLiteral("_"));
72 return QString("%1_%2").arg(parts.first()).arg(parts.at(1));72 return QStringLiteral("%1_%2").arg(parts.first(), parts.at(1));
73 }73 }
74 return appId;74 return appId;
75}75}
@@ -183,7 +183,7 @@
183 , m_settings(settings)183 , m_settings(settings)
184{184{
185 qCDebug(QTMIR_APPLICATIONS) << "ApplicationManager::ApplicationManager (this=%p)" << this;185 qCDebug(QTMIR_APPLICATIONS) << "ApplicationManager::ApplicationManager (this=%p)" << this;
186 setObjectName("qtmir::ApplicationManager");186 setObjectName(QStringLiteral("qtmir::ApplicationManager"));
187187
188 /*188 /*
189 All begin[...]Rows() and end[...]Rows() functions cause signal emissions which can189 All begin[...]Rows() and end[...]Rows() functions cause signal emissions which can
@@ -532,7 +532,7 @@
532532
533 qCDebug(QTMIR_APPLICATIONS) << "ApplicationManager::authorizeSession - pid=" << pid;533 qCDebug(QTMIR_APPLICATIONS) << "ApplicationManager::authorizeSession - pid=" << pid;
534534
535 for (Application *app : m_applications) {535 Q_FOREACH (Application *app, m_applications) {
536 if (app->state() == Application::Starting) {536 if (app->state() == Application::Starting) {
537 tracepoint(qtmir, appIdHasProcessId_start);537 tracepoint(qtmir, appIdHasProcessId_start);
538 if (m_taskController->appIdHasProcessId(app->appId(), pid)) {538 if (m_taskController->appIdHasProcessId(app->appId(), pid)) {
@@ -572,7 +572,7 @@
572 }572 }
573573
574 // Guess appId from the desktop file hint574 // Guess appId from the desktop file hint
575 const QString appId = toShortAppIdIfPossible(desktopFileName.split('/').last().remove(QRegExp(".desktop$")));575 const QString appId = toShortAppIdIfPossible(desktopFileName.split('/').last().remove(QRegExp(QStringLiteral(".desktop$"))));
576576
577 qCDebug(QTMIR_APPLICATIONS) << "Process supplied desktop_file_hint, loading:" << appId;577 qCDebug(QTMIR_APPLICATIONS) << "Process supplied desktop_file_hint, loading:" << appId;
578578
@@ -598,7 +598,7 @@
598 Application::Stage stage = Application::MainStage;598 Application::Stage stage = Application::MainStage;
599 QString stageParam = info->getParameter("--stage_hint=");599 QString stageParam = info->getParameter("--stage_hint=");
600600
601 if (stageParam == "side_stage") {601 if (stageParam == QLatin1String("side_stage")) {
602 stage = Application::SideStage;602 stage = Application::SideStage;
603 }603 }
604604
@@ -654,7 +654,7 @@
654 return findApplicationWithPid(session->process_id());654 return findApplicationWithPid(session->process_id());
655}655}
656656
657Application* ApplicationManager::findApplicationWithPid(const pid_t pid)657Application* ApplicationManager::findApplicationWithPid(const pid_t pid) const
658{658{
659 if (pid <= 0)659 if (pid <= 0)
660 return nullptr;660 return nullptr;
@@ -878,7 +878,7 @@
878878
879Application *ApplicationManager::findApplication(qtmir::MirSurfaceInterface* surface)879Application *ApplicationManager::findApplication(qtmir::MirSurfaceInterface* surface)
880{880{
881 for (Application *app : m_applications) {881 Q_FOREACH (Application *app, m_applications) {
882 if (app->session() == surface->session()) {882 if (app->session() == surface->session()) {
883 return app;883 return app;
884 }884 }
885885
=== modified file 'src/modules/Unity/Application/application_manager.h'
--- src/modules/Unity/Application/application_manager.h 2016-05-05 15:02:01 +0000
+++ src/modules/Unity/Application/application_manager.h 2016-06-06 19:34:36 +0000
@@ -96,7 +96,7 @@
96 bool isEmpty() const { return rowCount() == 0; }96 bool isEmpty() const { return rowCount() == 0; }
9797
98 const QList<Application*> &list() const { return m_applications; }98 const QList<Application*> &list() const { return m_applications; }
99 qtmir::Application* findApplicationWithPid(const pid_t pid);99 qtmir::Application* findApplicationWithPid(const pid_t pid) const;
100100
101public Q_SLOTS:101public Q_SLOTS:
102 void authorizeSession(const pid_t pid, bool &authorized);102 void authorizeSession(const pid_t pid, bool &authorized);
103103
=== modified file 'src/modules/Unity/Application/dbuswindowstack.cpp'
--- src/modules/Unity/Application/dbuswindowstack.cpp 2016-01-20 21:36:39 +0000
+++ src/modules/Unity/Application/dbuswindowstack.cpp 2016-06-06 19:34:36 +0000
@@ -33,9 +33,9 @@
33 qDBusRegisterMetaType<WindowInfo>();33 qDBusRegisterMetaType<WindowInfo>();
34 qDBusRegisterMetaType< QList<WindowInfo> >();34 qDBusRegisterMetaType< QList<WindowInfo> >();
3535
36 QDBusConnection::sessionBus().registerService("com.canonical.Unity.WindowStack");36 QDBusConnection::sessionBus().registerService(QStringLiteral("com.canonical.Unity.WindowStack"));
37 // TODO ExportScriptableSlots shouldn't be needed but without it i don't get the methods :-/37 // TODO ExportScriptableSlots shouldn't be needed but without it i don't get the methods :-/
38 QDBusConnection::sessionBus().registerObject("/com/canonical/Unity/WindowStack", this, QDBusConnection::ExportAllSignals | QDBusConnection::ExportScriptableSlots |QDBusConnection::ExportScriptableInvokables );38 QDBusConnection::sessionBus().registerObject(QStringLiteral("/com/canonical/Unity/WindowStack"), this, QDBusConnection::ExportAllSignals | QDBusConnection::ExportScriptableSlots |QDBusConnection::ExportScriptableInvokables );
39}39}
4040
41DBusWindowStack::~DBusWindowStack()41DBusWindowStack::~DBusWindowStack()
@@ -49,7 +49,7 @@
49 const Application *app = appMgr->findApplicationWithPid(pid);49 const Application *app = appMgr->findApplicationWithPid(pid);
50 if (app) {50 if (app) {
51 res.app_id = app->appId();51 res.app_id = app->appId();
52 res.desktop_file = "";52 res.desktop_file = QString();
53 }53 }
54 return res;54 return res;
55}55}
@@ -59,6 +59,7 @@
59 QList<WindowInfo> res;59 QList<WindowInfo> res;
60 ApplicationManager *appMgr = static_cast<ApplicationManager*>(parent());60 ApplicationManager *appMgr = static_cast<ApplicationManager*>(parent());
61 const QList<Application*> &applications = appMgr->list();61 const QList<Application*> &applications = appMgr->list();
62 res.reserve(applications.count());
62 Q_FOREACH(Application* app, applications) {63 Q_FOREACH(Application* app, applications) {
63 WindowInfo wi;64 WindowInfo wi;
64 wi.window_id = 0;65 wi.window_id = 0;
6566
=== modified file 'src/modules/Unity/Application/mirbuffersgtexture.cpp'
--- src/modules/Unity/Application/mirbuffersgtexture.cpp 2015-12-10 13:08:43 +0000
+++ src/modules/Unity/Application/mirbuffersgtexture.cpp 2016-06-06 19:34:36 +0000
@@ -51,7 +51,7 @@
51 m_height = 0;51 m_height = 0;
52}52}
5353
54void MirBufferSGTexture::setBuffer(std::shared_ptr<mir::graphics::Buffer> buffer)54void MirBufferSGTexture::setBuffer(const std::shared_ptr<mir::graphics::Buffer>& buffer)
55{55{
56 m_mirBuffer = buffer;56 m_mirBuffer = buffer;
57 mg::Size size = buffer->size();57 mg::Size size = buffer->size();
5858
=== modified file 'src/modules/Unity/Application/mirbuffersgtexture.h'
--- src/modules/Unity/Application/mirbuffersgtexture.h 2015-09-28 09:57:18 +0000
+++ src/modules/Unity/Application/mirbuffersgtexture.h 2016-06-06 19:34:36 +0000
@@ -32,7 +32,7 @@
32 MirBufferSGTexture();32 MirBufferSGTexture();
33 virtual ~MirBufferSGTexture();33 virtual ~MirBufferSGTexture();
3434
35 void setBuffer(std::shared_ptr<mir::graphics::Buffer> buffer);35 void setBuffer(const std::shared_ptr<mir::graphics::Buffer>& buffer);
36 void freeBuffer();36 void freeBuffer();
37 bool hasBuffer() const;37 bool hasBuffer() const;
3838
3939
=== modified file 'src/modules/Unity/Application/mirsurface.cpp'
--- src/modules/Unity/Application/mirsurface.cpp 2016-05-25 13:54:52 +0000
+++ src/modules/Unity/Application/mirsurface.cpp 2016-06-06 19:34:36 +0000
@@ -835,7 +835,7 @@
835835
836void MirSurface::applyKeymap()836void MirSurface::applyKeymap()
837{837{
838 QStringList stringList = m_keymap.split("+", QString::SkipEmptyParts);838 QStringList stringList = m_keymap.split('+', QString::SkipEmptyParts);
839839
840 QString layout = stringList[0];840 QString layout = stringList[0];
841 QString variant;841 QString variant;
842842
=== modified file 'src/modules/Unity/Application/mirsurfaceitem.cpp'
--- src/modules/Unity/Application/mirsurfaceitem.cpp 2016-05-24 20:13:10 +0000
+++ src/modules/Unity/Application/mirsurfaceitem.cpp 2016-06-06 19:34:36 +0000
@@ -61,7 +61,7 @@
61{61{
62 Q_OBJECT62 Q_OBJECT
63public:63public:
64 MirTextureProvider(QSharedPointer<QSGTexture> texture) : t(texture) {}64 MirTextureProvider(const QSharedPointer<QSGTexture>& texture) : t(texture) {}
65 QSGTexture *texture() const {65 QSGTexture *texture() const {
66 if (t)66 if (t)
67 t->setFiltering(smooth ? QSGTexture::Linear : QSGTexture::Nearest);67 t->setFiltering(smooth ? QSGTexture::Linear : QSGTexture::Nearest);
@@ -74,7 +74,7 @@
74 t.reset();74 t.reset();
75 }75 }
7676
77 void setTexture(QSharedPointer<QSGTexture> newTexture) {77 void setTexture(const QSharedPointer<QSGTexture>& newTexture) {
78 t = newTexture;78 t = newTexture;
79 }79 }
8080
@@ -242,7 +242,7 @@
242 }242 }
243243
244 if (m_surface->numBuffersReadyForCompositor() > 0) {244 if (m_surface->numBuffersReadyForCompositor() > 0) {
245 QTimer::singleShot(0, this, SLOT(update()));245 QTimer::singleShot(0, this, &MirSurfaceItem::update);
246 }246 }
247247
248 m_textureProvider->smooth = smooth();248 m_textureProvider->smooth = smooth();
@@ -388,7 +388,7 @@
388 if (m_surface) {388 if (m_surface) {
389 return m_surface->appId();389 return m_surface->appId();
390 } else {390 } else {
391 return QString("-");391 return QStringLiteral("-");
392 }392 }
393}393}
394394
@@ -433,7 +433,7 @@
433 Qt::TouchPointStates touchPointStates)433 Qt::TouchPointStates touchPointStates)
434{434{
435 if (eventType == QEvent::TouchBegin && m_lastTouchEvent && m_lastTouchEvent->type != QEvent::TouchEnd) {435 if (eventType == QEvent::TouchBegin && m_lastTouchEvent && m_lastTouchEvent->type != QEvent::TouchEnd) {
436 qCWarning(QTMIR_SURFACES) << qPrintable(QString("MirSurfaceItem(%1) - Got a QEvent::TouchBegin while "436 qCWarning(QTMIR_SURFACES) << qPrintable(QStringLiteral("MirSurfaceItem(%1) - Got a QEvent::TouchBegin while "
437 "there's still an active/unfinished touch sequence.").arg(appId()));437 "there's still an active/unfinished touch sequence.").arg(appId()));
438 // Qt forgot to end the last touch sequence. Let's do it ourselves.438 // Qt forgot to end the last touch sequence. Let's do it ourselves.
439 endCurrentTouchSequence(timestamp);439 endCurrentTouchSequence(timestamp);
@@ -749,7 +749,7 @@
749 }749 }
750}750}
751751
752void MirSurfaceItem::onActualSurfaceSizeChanged(const QSize &size)752void MirSurfaceItem::onActualSurfaceSizeChanged(QSize size)
753{753{
754 setImplicitSize(size.width(), size.height());754 setImplicitSize(size.width(), size.height());
755}755}
756756
=== modified file 'src/modules/Unity/Application/mirsurfaceitem.h'
--- src/modules/Unity/Application/mirsurfaceitem.h 2016-05-24 20:13:10 +0000
+++ src/modules/Unity/Application/mirsurfaceitem.h 2016-06-06 19:34:36 +0000
@@ -119,7 +119,7 @@
119 void updateMirSurfaceActiveFocus();119 void updateMirSurfaceActiveFocus();
120 void updateMirSurfaceVisibility();120 void updateMirSurfaceVisibility();
121121
122 void onActualSurfaceSizeChanged(const QSize &size);122 void onActualSurfaceSizeChanged(QSize size);
123 void onCompositorSwappedBuffers();123 void onCompositorSwappedBuffers();
124124
125 void onWindowChanged(QQuickWindow *window);125 void onWindowChanged(QQuickWindow *window);
126126
=== modified file 'src/modules/Unity/Application/mirsurfacemanager.cpp'
--- src/modules/Unity/Application/mirsurfacemanager.cpp 2016-05-06 08:41:15 +0000
+++ src/modules/Unity/Application/mirsurfacemanager.cpp 2016-06-06 19:34:36 +0000
@@ -85,7 +85,7 @@
85 , m_sessionManager(sessionManager)85 , m_sessionManager(sessionManager)
86{86{
87 qCDebug(QTMIR_SURFACES) << "MirSurfaceManager::MirSurfaceManager - this=" << this;87 qCDebug(QTMIR_SURFACES) << "MirSurfaceManager::MirSurfaceManager - this=" << this;
88 setObjectName("qtmir::SurfaceManager");88 setObjectName(QStringLiteral("qtmir::SurfaceManager"));
89}89}
9090
91MirSurfaceManager::~MirSurfaceManager()91MirSurfaceManager::~MirSurfaceManager()
@@ -98,7 +98,7 @@
98void MirSurfaceManager::onSessionCreatedSurface(const mir::scene::Session *mirSession,98void MirSurfaceManager::onSessionCreatedSurface(const mir::scene::Session *mirSession,
99 const std::shared_ptr<mir::scene::Surface> &surface,99 const std::shared_ptr<mir::scene::Surface> &surface,
100 const std::shared_ptr<SurfaceObserver> &observer,100 const std::shared_ptr<SurfaceObserver> &observer,
101 qtmir::CreationHints creationHints)101 const qtmir::CreationHints &creationHints)
102{102{
103 qCDebug(QTMIR_SURFACES) << "MirSurfaceManager::onSessionCreatedSurface - mirSession=" << mirSession103 qCDebug(QTMIR_SURFACES) << "MirSurfaceManager::onSessionCreatedSurface - mirSession=" << mirSession
104 << "surface=" << surface.get() << "surface.name=" << surface->name().c_str()104 << "surface=" << surface.get() << "surface.name=" << surface->name().c_str()
105105
=== modified file 'src/modules/Unity/Application/mirsurfacemanager.h'
--- src/modules/Unity/Application/mirsurfacemanager.h 2016-05-06 08:28:44 +0000
+++ src/modules/Unity/Application/mirsurfacemanager.h 2016-06-06 19:34:36 +0000
@@ -75,7 +75,7 @@
75 void onSessionCreatedSurface(const mir::scene::Session *,75 void onSessionCreatedSurface(const mir::scene::Session *,
76 const std::shared_ptr<mir::scene::Surface> &,76 const std::shared_ptr<mir::scene::Surface> &,
77 std::shared_ptr<SurfaceObserver> const&,77 std::shared_ptr<SurfaceObserver> const&,
78 qtmir::CreationHints);78 const qtmir::CreationHints &);
79 void onSessionDestroyingSurface(const mir::scene::Session *, const std::shared_ptr<mir::scene::Surface> &);79 void onSessionDestroyingSurface(const mir::scene::Session *, const std::shared_ptr<mir::scene::Surface> &);
8080
81protected:81protected:
8282
=== modified file 'src/modules/Unity/Application/proc_info.cpp'
--- src/modules/Unity/Application/proc_info.cpp 2015-10-08 11:20:30 +0000
+++ src/modules/Unity/Application/proc_info.cpp 2016-06-06 19:34:36 +0000
@@ -27,7 +27,7 @@
27}27}
2828
29std::unique_ptr<ProcInfo::CommandLine> ProcInfo::commandLine(pid_t pid) {29std::unique_ptr<ProcInfo::CommandLine> ProcInfo::commandLine(pid_t pid) {
30 QFile cmdline(QString("/proc/%1/cmdline").arg(pid));30 QFile cmdline(QStringLiteral("/proc/%1/cmdline").arg(pid));
31 if (!cmdline.open(QIODevice::ReadOnly | QIODevice::Text)) {31 if (!cmdline.open(QIODevice::ReadOnly | QIODevice::Text)) {
32 return nullptr;32 return nullptr;
33 }33 }
3434
=== modified file 'src/modules/Unity/Application/session.cpp'
--- src/modules/Unity/Application/session.cpp 2016-06-06 19:34:36 +0000
+++ src/modules/Unity/Application/session.cpp 2016-06-06 19:34:36 +0000
@@ -89,7 +89,7 @@
89 DEBUG_MSG << "()";89 DEBUG_MSG << "()";
90 stopPromptSessions();90 stopPromptSessions();
9191
92 QList<SessionInterface*> children(m_children->list());92 const QList<SessionInterface*> children(m_children->list());
93 for (SessionInterface* child : children) {93 for (SessionInterface* child : children) {
94 delete child;94 delete child;
95 }95 }
@@ -438,9 +438,9 @@
438 deleteIfZombieAndEmpty();438 deleteIfZombieAndEmpty();
439}439}
440440
441void Session::foreachChildSession(std::function<void(SessionInterface* session)> f) const441void Session::foreachChildSession(const std::function<void(SessionInterface* session)>& f) const
442{442{
443 QList<SessionInterface*> children(m_children->list());443 const QList<SessionInterface*> children(m_children->list());
444 for (SessionInterface* child : children) {444 for (SessionInterface* child : children) {
445 f(child);445 f(child);
446 }446 }
@@ -467,13 +467,13 @@
467467
468void Session::stopPromptSessions()468void Session::stopPromptSessions()
469{469{
470 QList<SessionInterface*> children(m_children->list());470 const QList<SessionInterface*> children(m_children->list());
471 for (SessionInterface* child : children) {471 for (SessionInterface* child : children) {
472 static_cast<Session*>(child)->stopPromptSessions();472 static_cast<Session*>(child)->stopPromptSessions();
473 }473 }
474474
475 QList<std::shared_ptr<ms::PromptSession>> copy(m_promptSessions);475 QVector<std::shared_ptr<ms::PromptSession>> copy(m_promptSessions);
476 QListIterator<std::shared_ptr<ms::PromptSession>> it(copy);476 QVectorIterator<std::shared_ptr<ms::PromptSession>> it(copy);
477 for ( it.toBack(); it.hasPrevious(); ) {477 for ( it.toBack(); it.hasPrevious(); ) {
478 std::shared_ptr<ms::PromptSession> promptSession = it.previous();478 std::shared_ptr<ms::PromptSession> promptSession = it.previous();
479 DEBUG_MSG << " - promptSession=" << promptSession.get();479 DEBUG_MSG << " - promptSession=" << promptSession.get();
@@ -489,9 +489,9 @@
489 return nullptr;489 return nullptr;
490}490}
491491
492void Session::foreachPromptSession(std::function<void(const std::shared_ptr<ms::PromptSession>&)> f) const492void Session::foreachPromptSession(const std::function<void(const std::shared_ptr<ms::PromptSession>&)>& f) const
493{493{
494 for (std::shared_ptr<ms::PromptSession> promptSession : m_promptSessions) {494 Q_FOREACH (std::shared_ptr<ms::PromptSession> promptSession, m_promptSessions) {
495 f(promptSession);495 f(promptSession);
496 }496 }
497}497}
498498
=== modified file 'src/modules/Unity/Application/session.h'
--- src/modules/Unity/Application/session.h 2016-05-17 19:18:44 +0000
+++ src/modules/Unity/Application/session.h 2016-06-06 19:34:36 +0000
@@ -70,12 +70,12 @@
70 void addChildSession(SessionInterface* session) override;70 void addChildSession(SessionInterface* session) override;
71 void insertChildSession(uint index, SessionInterface* session) override;71 void insertChildSession(uint index, SessionInterface* session) override;
72 void removeChildSession(SessionInterface* session) override;72 void removeChildSession(SessionInterface* session) override;
73 void foreachChildSession(std::function<void(SessionInterface* session)> f) const override;73 void foreachChildSession(const std::function<void(SessionInterface* session)> &f) const override;
7474
75 std::shared_ptr<mir::scene::Session> session() const override;75 std::shared_ptr<mir::scene::Session> session() const override;
7676
77 std::shared_ptr<mir::scene::PromptSession> activePromptSession() const override;77 std::shared_ptr<mir::scene::PromptSession> activePromptSession() const override;
78 void foreachPromptSession(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> f) const override;78 void foreachPromptSession(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> &f) const override;
7979
80 SessionModel* childSessions() const override;80 SessionModel* childSessions() const override;
8181
@@ -115,7 +115,7 @@
115 State m_state;115 State m_state;
116 bool m_live;116 bool m_live;
117 AbstractTimer* m_suspendTimer{nullptr};117 AbstractTimer* m_suspendTimer{nullptr};
118 QList<std::shared_ptr<mir::scene::PromptSession>> m_promptSessions;118 QVector<std::shared_ptr<mir::scene::PromptSession>> m_promptSessions;
119 std::shared_ptr<mir::scene::PromptSessionManager> const m_promptSessionManager;119 std::shared_ptr<mir::scene::PromptSessionManager> const m_promptSessionManager;
120 QList<MirSurfaceInterface*> m_closingSurfaces;120 QList<MirSurfaceInterface*> m_closingSurfaces;
121 bool m_hadSurface{false};121 bool m_hadSurface{false};
122122
=== modified file 'src/modules/Unity/Application/session_interface.h'
--- src/modules/Unity/Application/session_interface.h 2016-05-17 19:18:44 +0000
+++ src/modules/Unity/Application/session_interface.h 2016-06-06 19:34:36 +0000
@@ -97,10 +97,10 @@
97 virtual void addChildSession(SessionInterface* session) = 0;97 virtual void addChildSession(SessionInterface* session) = 0;
98 virtual void insertChildSession(uint index, SessionInterface* session) = 0;98 virtual void insertChildSession(uint index, SessionInterface* session) = 0;
99 virtual void removeChildSession(SessionInterface* session) = 0;99 virtual void removeChildSession(SessionInterface* session) = 0;
100 virtual void foreachChildSession(std::function<void(SessionInterface* session)> f) const = 0;100 virtual void foreachChildSession(const std::function<void(SessionInterface* session)>& f) const = 0;
101101
102 virtual std::shared_ptr<mir::scene::PromptSession> activePromptSession() const = 0;102 virtual std::shared_ptr<mir::scene::PromptSession> activePromptSession() const = 0;
103 virtual void foreachPromptSession(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> f) const = 0;103 virtual void foreachPromptSession(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)>& f) const = 0;
104104
105 virtual void setFullscreen(bool fullscreen) = 0;105 virtual void setFullscreen(bool fullscreen) = 0;
106 virtual void setLive(const bool) = 0;106 virtual void setLive(const bool) = 0;
107107
=== modified file 'src/modules/Unity/Application/sessionmanager.cpp'
--- src/modules/Unity/Application/sessionmanager.cpp 2016-05-06 08:41:15 +0000
+++ src/modules/Unity/Application/sessionmanager.cpp 2016-06-06 19:34:36 +0000
@@ -92,7 +92,7 @@
92 , m_applicationManager(applicationManager)92 , m_applicationManager(applicationManager)
93{93{
94 qCDebug(QTMIR_SESSIONS) << "SessionManager::SessionManager - this=" << this;94 qCDebug(QTMIR_SESSIONS) << "SessionManager::SessionManager - this=" << this;
95 setObjectName("qtmir::SessionManager");95 setObjectName(QStringLiteral("qtmir::SessionManager"));
96}96}
9797
98SessionManager::~SessionManager()98SessionManager::~SessionManager()
9999
=== modified file 'src/modules/Unity/Application/sharedwakelock.cpp'
--- src/modules/Unity/Application/sharedwakelock.cpp 2015-03-05 23:40:52 +0000
+++ src/modules/Unity/Application/sharedwakelock.cpp 2016-06-06 19:34:36 +0000
@@ -37,7 +37,7 @@
37 Q_OBJECT37 Q_OBJECT
38public:38public:
39 Wakelock(const QDBusConnection &connection) noexcept39 Wakelock(const QDBusConnection &connection) noexcept
40 : AbstractDBusServiceMonitor("com.canonical.powerd", "/com/canonical/powerd", "com.canonical.powerd", connection)40 : AbstractDBusServiceMonitor(QStringLiteral("com.canonical.powerd"), QStringLiteral("/com/canonical/powerd"), QStringLiteral("com.canonical.powerd"), connection)
41 , m_wakelockEnabled(false)41 , m_wakelockEnabled(false)
42 {42 {
43 // (re-)acquire wake lock when powerd (re-)appears on the bus43 // (re-)acquire wake lock when powerd (re-)appears on the bus
@@ -90,7 +90,7 @@
90 }90 }
9191
92 if (!m_cookie.isEmpty()) {92 if (!m_cookie.isEmpty()) {
93 dbusInterface()->asyncCall("clearSysState", QString(m_cookie));93 dbusInterface()->asyncCall(QStringLiteral("clearSysState"), QString(m_cookie));
94 qCDebug(QTMIR_SESSIONS) << "Wakelock released" << m_cookie;94 qCDebug(QTMIR_SESSIONS) << "Wakelock released" << m_cookie;
95 m_cookie.clear();95 m_cookie.clear();
96 }96 }
@@ -132,7 +132,7 @@
132132
133 if (!m_wakelockEnabled || !m_cookie.isEmpty()) {133 if (!m_wakelockEnabled || !m_cookie.isEmpty()) {
134 // notified wakelock was created, but we either don't want it, or already have one - release it immediately134 // notified wakelock was created, but we either don't want it, or already have one - release it immediately
135 dbusInterface()->asyncCall("clearSysState", QString(cookie));135 dbusInterface()->asyncCall(QStringLiteral("clearSysState"), QString(cookie));
136 return;136 return;
137 }137 }
138138
@@ -155,7 +155,7 @@
155 return;155 return;
156 }156 }
157157
158 QDBusPendingCall pcall = dbusInterface()->asyncCall("requestSysState", "active", POWERD_SYS_STATE_ACTIVE);158 QDBusPendingCall pcall = dbusInterface()->asyncCall(QStringLiteral("requestSysState"), "active", POWERD_SYS_STATE_ACTIVE);
159159
160 QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall, this);160 QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall, this);
161 QObject::connect(watcher, &QDBusPendingCallWatcher::finished,161 QObject::connect(watcher, &QDBusPendingCallWatcher::finished,
162162
=== modified file 'src/modules/Unity/Application/ubuntukeyboardinfo.cpp'
--- src/modules/Unity/Application/ubuntukeyboardinfo.cpp 2016-06-06 19:34:36 +0000
+++ src/modules/Unity/Application/ubuntukeyboardinfo.cpp 2016-06-06 19:34:36 +0000
@@ -166,7 +166,7 @@
166 if (xdgRuntimeDir) {166 if (xdgRuntimeDir) {
167 m_socketFilePath = QDir(xdgRuntimeDir).filePath(gServerName);167 m_socketFilePath = QDir(xdgRuntimeDir).filePath(gServerName);
168 } else {168 } else {
169 m_socketFilePath = QDir("/tmp").filePath(gServerName);169 m_socketFilePath = QDir(QStringLiteral("/tmp")).filePath(gServerName);
170 }170 }
171}171}
172172
173173
=== modified file 'src/modules/Unity/Application/upstart/taskcontroller.cpp'
--- src/modules/Unity/Application/upstart/taskcontroller.cpp 2016-06-06 19:34:36 +0000
+++ src/modules/Unity/Application/upstart/taskcontroller.cpp 2016-06-06 19:34:36 +0000
@@ -59,7 +59,7 @@
59 gchar *package, *application;59 gchar *package, *application;
60 if (ubuntu_app_launch_app_id_parse(appId.toLatin1().constData(), &package, &application, nullptr)) {60 if (ubuntu_app_launch_app_id_parse(appId.toLatin1().constData(), &package, &application, nullptr)) {
61 // is long appId, so assemble its short appId61 // is long appId, so assemble its short appId
62 QString shortAppId = QString("%1_%2").arg(package).arg(application);62 QString shortAppId = QStringLiteral("%1_%2").arg(package, application);
63 g_free(package);63 g_free(package);
64 g_free(application);64 g_free(application);
65 return shortAppId;65 return shortAppId;
6666
=== modified file 'src/modules/Unity/Screens/CMakeLists.txt'
--- src/modules/Unity/Screens/CMakeLists.txt 2016-01-28 22:33:35 +0000
+++ src/modules/Unity/Screens/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -1,5 +1,9 @@
1include_directories(1include_directories(
2 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver2 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
3)
4
5include_directories(
6 SYSTEM
3 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}7 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
4 ${Qt5Quick_INCLUDE_DIRS}8 ${Qt5Quick_INCLUDE_DIRS}
5 ${MIRSERVER_INCLUDE_DIRS}9 ${MIRSERVER_INCLUDE_DIRS}
610
=== modified file 'src/modules/Unity/Screens/qquickscreenwindow.cpp'
--- src/modules/Unity/Screens/qquickscreenwindow.cpp 2016-04-22 18:01:05 +0000
+++ src/modules/Unity/Screens/qquickscreenwindow.cpp 2016-06-06 19:34:36 +0000
@@ -50,7 +50,7 @@
50 , m_scale(-1.0) // start with invalid initial state, fetch correct value on first invokation50 , m_scale(-1.0) // start with invalid initial state, fetch correct value on first invokation
51 , m_formFactor(Screens::FormFactorUnknown)51 , m_formFactor(Screens::FormFactorUnknown)
52{52{
53 if (qGuiApp->platformName() == "mirserver") {53 if (qGuiApp->platformName() == QLatin1String("mirserver")) {
54 connect(qGuiApp->platformNativeInterface(), &QPlatformNativeInterface::windowPropertyChanged,54 connect(qGuiApp->platformNativeInterface(), &QPlatformNativeInterface::windowPropertyChanged,
55 this, &QQuickScreenWindow::nativePropertyChanged);55 this, &QQuickScreenWindow::nativePropertyChanged);
56 //m_scale = getScaleNativeProperty(); DO NOT CALL HERE - see note above56 //m_scale = getScaleNativeProperty(); DO NOT CALL HERE - see note above
5757
=== modified file 'src/platforms/mirserver/CMakeLists.txt'
--- src/platforms/mirserver/CMakeLists.txt 2016-06-06 19:34:36 +0000
+++ src/platforms/mirserver/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -26,6 +26,10 @@
26include_directories(26include_directories(
27 ${CMAKE_SOURCE_DIR}/src/common27 ${CMAKE_SOURCE_DIR}/src/common
2828
29)
30
31include_directories(
32 SYSTEM
29 ${MIRCOMMON_INCLUDE_DIRS}33 ${MIRCOMMON_INCLUDE_DIRS}
30 ${MIRSERVER_INCLUDE_DIRS}34 ${MIRSERVER_INCLUDE_DIRS}
31 ${MIRRENDERERGLDEV_INCLUDE_DIRS}35 ${MIRRENDERERGLDEV_INCLUDE_DIRS}
3236
=== modified file 'src/platforms/mirserver/clipboard.cpp'
--- src/platforms/mirserver/clipboard.cpp 2016-05-03 19:45:51 +0000
+++ src/platforms/mirserver/clipboard.cpp 2016-06-06 19:34:36 +0000
@@ -65,12 +65,13 @@
65 int offset = headerSize;65 int offset = headerSize;
66 header[0] = formatCount;66 header[0] = formatCount;
67 for (int i = 0; i < formatCount; i++) {67 for (int i = 0; i < formatCount; i++) {
68 const QByteArray data = mimeData->data(formats[i]);
68 const int formatOffset = offset;69 const int formatOffset = offset;
69 const int formatSize = formats[i].size();70 const int formatSize = formats[i].size();
70 const int dataOffset = offset + formatSize;71 const int dataOffset = offset + formatSize;
71 const int dataSize = mimeData->data(formats[i]).size();72 const int dataSize = data.size();
72 memcpy(&buffer[formatOffset], formats[i].toLatin1().data(), formatSize);73 memcpy(&buffer[formatOffset], formats[i].toLatin1().data(), formatSize);
73 memcpy(&buffer[dataOffset], mimeData->data(formats[i]).data(), dataSize);74 memcpy(&buffer[dataOffset], data.data(), dataSize);
74 header[i*4+1] = formatOffset;75 header[i*4+1] = formatOffset;
75 header[i*4+2] = formatSize;76 header[i*4+2] = formatSize;
76 header[i*4+3] = dataOffset;77 header[i*4+3] = dataOffset;
7778
=== modified file 'src/platforms/mirserver/creationhints.cpp'
--- src/platforms/mirserver/creationhints.cpp 2016-03-18 12:15:54 +0000
+++ src/platforms/mirserver/creationhints.cpp 2016-06-06 19:34:36 +0000
@@ -56,7 +56,7 @@
5656
57QString CreationHints::toString() const57QString CreationHints::toString() const
58{58{
59 return QString("CreationHints(minW=%1,minH=%2,maxW=%3,maxH=%4,wIncr=%5,hInc=%6,shellChrome=%7)")59 return QStringLiteral("CreationHints(minW=%1,minH=%2,maxW=%3,maxH=%4,wIncr=%5,hInc=%6,shellChrome=%7)")
60 .arg(minWidth)60 .arg(minWidth)
61 .arg(minHeight)61 .arg(minHeight)
62 .arg(maxWidth)62 .arg(maxWidth)
6363
=== modified file 'src/platforms/mirserver/creationhints.h'
--- src/platforms/mirserver/creationhints.h 2016-03-10 11:55:28 +0000
+++ src/platforms/mirserver/creationhints.h 2016-06-06 19:34:36 +0000
@@ -24,7 +24,7 @@
2424
25namespace mir {25namespace mir {
26 namespace scene {26 namespace scene {
27 class SurfaceCreationParameters;27 struct SurfaceCreationParameters;
28 }28 }
29}29}
3030
3131
=== modified file 'src/platforms/mirserver/cursor.cpp'
--- src/platforms/mirserver/cursor.cpp 2015-11-25 15:38:50 +0000
+++ src/platforms/mirserver/cursor.cpp 2016-06-06 19:34:36 +0000
@@ -27,28 +27,28 @@
2727
28Cursor::Cursor()28Cursor::Cursor()
29{29{
30 m_shapeToCursorName[Qt::ArrowCursor] = "left_ptr";30 m_shapeToCursorName[Qt::ArrowCursor] = QStringLiteral("left_ptr");
31 m_shapeToCursorName[Qt::UpArrowCursor] = "up_arrow";31 m_shapeToCursorName[Qt::UpArrowCursor] = QStringLiteral("up_arrow");
32 m_shapeToCursorName[Qt::CrossCursor] = "cross";32 m_shapeToCursorName[Qt::CrossCursor] = QStringLiteral("cross");
33 m_shapeToCursorName[Qt::WaitCursor] = "watch";33 m_shapeToCursorName[Qt::WaitCursor] = QStringLiteral("watch");
34 m_shapeToCursorName[Qt::IBeamCursor] = "xterm";34 m_shapeToCursorName[Qt::IBeamCursor] = QStringLiteral("xterm");
35 m_shapeToCursorName[Qt::SizeVerCursor] = "size_ver";35 m_shapeToCursorName[Qt::SizeVerCursor] = QStringLiteral("size_ver");
36 m_shapeToCursorName[Qt::SizeHorCursor] = "size_hor";36 m_shapeToCursorName[Qt::SizeHorCursor] = QStringLiteral("size_hor");
37 m_shapeToCursorName[Qt::SizeBDiagCursor] = "size_bdiag";37 m_shapeToCursorName[Qt::SizeBDiagCursor] = QStringLiteral("size_bdiag");
38 m_shapeToCursorName[Qt::SizeFDiagCursor] = "size_fdiag";38 m_shapeToCursorName[Qt::SizeFDiagCursor] = QStringLiteral("size_fdiag");
39 m_shapeToCursorName[Qt::SizeAllCursor] = "size_all";39 m_shapeToCursorName[Qt::SizeAllCursor] = QStringLiteral("size_all");
40 m_shapeToCursorName[Qt::BlankCursor] = "blank";40 m_shapeToCursorName[Qt::BlankCursor] = QStringLiteral("blank");
41 m_shapeToCursorName[Qt::SplitVCursor] = "split_v";41 m_shapeToCursorName[Qt::SplitVCursor] = QStringLiteral("split_v");
42 m_shapeToCursorName[Qt::SplitHCursor] = "split_h";42 m_shapeToCursorName[Qt::SplitHCursor] = QStringLiteral("split_h");
43 m_shapeToCursorName[Qt::PointingHandCursor] = "hand";43 m_shapeToCursorName[Qt::PointingHandCursor] = QStringLiteral("hand");
44 m_shapeToCursorName[Qt::ForbiddenCursor] = "forbidden";44 m_shapeToCursorName[Qt::ForbiddenCursor] = QStringLiteral("forbidden");
45 m_shapeToCursorName[Qt::WhatsThisCursor] = "whats_this";45 m_shapeToCursorName[Qt::WhatsThisCursor] = QStringLiteral("whats_this");
46 m_shapeToCursorName[Qt::BusyCursor] = "left_ptr_watch";46 m_shapeToCursorName[Qt::BusyCursor] = QStringLiteral("left_ptr_watch");
47 m_shapeToCursorName[Qt::OpenHandCursor] = "openhand";47 m_shapeToCursorName[Qt::OpenHandCursor] = QStringLiteral("openhand");
48 m_shapeToCursorName[Qt::ClosedHandCursor] = "closedhand";48 m_shapeToCursorName[Qt::ClosedHandCursor] = QStringLiteral("closedhand");
49 m_shapeToCursorName[Qt::DragCopyCursor] = "dnd-copy";49 m_shapeToCursorName[Qt::DragCopyCursor] = QStringLiteral("dnd-copy");
50 m_shapeToCursorName[Qt::DragMoveCursor] = "dnd-move";50 m_shapeToCursorName[Qt::DragMoveCursor] = QStringLiteral("dnd-move");
51 m_shapeToCursorName[Qt::DragLinkCursor] = "dnd-link";51 m_shapeToCursorName[Qt::DragLinkCursor] = QStringLiteral("dnd-link");
5252
53 connect(Mir::instance(), &Mir::cursorNameChanged, this, &Cursor::setMirCursorName);53 connect(Mir::instance(), &Mir::cursorNameChanged, this, &Cursor::setMirCursorName);
54}54}
@@ -61,10 +61,10 @@
6161
62 if (windowCursor) {62 if (windowCursor) {
63 if (windowCursor->pixmap().isNull()) {63 if (windowCursor->pixmap().isNull()) {
64 m_qtCursorName = m_shapeToCursorName.value(windowCursor->shape(), QLatin1String("left_ptr"));64 m_qtCursorName = m_shapeToCursorName.value(windowCursor->shape(), QStringLiteral("left_ptr"));
65 m_mousePointer->setCustomCursor(QCursor());65 m_mousePointer->setCustomCursor(QCursor());
66 } else {66 } else {
67 m_qtCursorName = QLatin1String("custom");67 m_qtCursorName = QStringLiteral("custom");
68 m_mousePointer->setCustomCursor(*windowCursor);68 m_mousePointer->setCustomCursor(*windowCursor);
69 }69 }
70 } else {70 } else {
@@ -170,7 +170,7 @@
170170
171 if (m_mirCursorName.isEmpty()) {171 if (m_mirCursorName.isEmpty()) {
172 if (m_qtCursorName.isEmpty()) {172 if (m_qtCursorName.isEmpty()) {
173 m_mousePointer->setCursorName("left_ptr");173 m_mousePointer->setCursorName(QStringLiteral("left_ptr"));
174 } else {174 } else {
175 m_mousePointer->setCursorName(m_qtCursorName);175 m_mousePointer->setCursorName(m_qtCursorName);
176 }176 }
177177
=== modified file 'src/platforms/mirserver/cursor.h'
--- src/platforms/mirserver/cursor.h 2015-11-19 14:17:54 +0000
+++ src/platforms/mirserver/cursor.h 2016-06-06 19:34:36 +0000
@@ -28,6 +28,7 @@
2828
29class Cursor : public MirPlatformCursor29class Cursor : public MirPlatformCursor
30{30{
31 Q_OBJECT
31public:32public:
32 Cursor();33 Cursor();
3334
3435
=== modified file 'src/platforms/mirserver/mircursorimages.cpp'
--- src/platforms/mirserver/mircursorimages.cpp 2015-11-10 11:07:23 +0000
+++ src/platforms/mirserver/mircursorimages.cpp 2016-06-06 19:34:36 +0000
@@ -20,7 +20,7 @@
20using namespace qtmir;20using namespace qtmir;
2121
22std::shared_ptr<mir::graphics::CursorImage> MirCursorImages::image(const std::string &cursor_name,22std::shared_ptr<mir::graphics::CursorImage> MirCursorImages::image(const std::string &cursor_name,
23 const mir::geometry::Size&)23 const mir::geometry::Size &)
24{24{
25 // We are not responsible for loading cursors. This is left for shell to do as it's drawing its own QML cursor.25 // We are not responsible for loading cursors. This is left for shell to do as it's drawing its own QML cursor.
26 // So here we work around Mir API by storing just the cursor name in the CursorImage.26 // So here we work around Mir API by storing just the cursor name in the CursorImage.
2727
=== modified file 'src/platforms/mirserver/nativeinterface.cpp'
--- src/platforms/mirserver/nativeinterface.cpp 2016-05-05 14:17:14 +0000
+++ src/platforms/mirserver/nativeinterface.cpp 2016-06-06 19:34:36 +0000
@@ -56,8 +56,8 @@
56 auto w = static_cast<ScreenWindow*>(window);56 auto w = static_cast<ScreenWindow*>(window);
57 auto s = static_cast<Screen*>(w->screen());57 auto s = static_cast<Screen*>(w->screen());
58 if (s) {58 if (s) {
59 propertyMap.insert("scale", s->scale());59 propertyMap.insert(QStringLiteral("scale"), s->scale());
60 propertyMap.insert("formFactor", s->formFactor());60 propertyMap.insert(QStringLiteral("formFactor"), s->formFactor());
61 }61 }
62 return propertyMap;62 return propertyMap;
63}63}
6464
=== modified file 'src/platforms/mirserver/nativeinterface.h'
--- src/platforms/mirserver/nativeinterface.h 2016-05-05 14:17:14 +0000
+++ src/platforms/mirserver/nativeinterface.h 2016-06-06 19:34:36 +0000
@@ -27,10 +27,11 @@
2727
28class NativeInterface : public QPlatformNativeInterface28class NativeInterface : public QPlatformNativeInterface
29{29{
30 Q_OBJECT
30public:31public:
31 NativeInterface(QMirServer *);32 NativeInterface(QMirServer *);
3233
33 virtual void *nativeResourceForIntegration(const QByteArray &resource);34 void *nativeResourceForIntegration(const QByteArray &resource) override;
3435
35 QVariantMap windowProperties(QPlatformWindow *window) const override;36 QVariantMap windowProperties(QPlatformWindow *window) const override;
36 QVariant windowProperty(QPlatformWindow *window, const QString &name) const override;37 QVariant windowProperty(QPlatformWindow *window, const QString &name) const override;
3738
=== modified file 'src/platforms/mirserver/plugin.cpp'
--- src/platforms/mirserver/plugin.cpp 2015-10-19 21:17:18 +0000
+++ src/platforms/mirserver/plugin.cpp 2016-06-06 19:34:36 +0000
@@ -20,7 +20,7 @@
20QPlatformIntegration *MirServerIntegrationPlugin::create(const QString &system, const QStringList &/*paramList*/,20QPlatformIntegration *MirServerIntegrationPlugin::create(const QString &system, const QStringList &/*paramList*/,
21 int &argc, char **argv)21 int &argc, char **argv)
22{22{
23 if (system.toLower() == "mirserver")23 if (system.toLower() == QLatin1String("mirserver"))
24 return new MirServerIntegration(argc, argv);24 return new MirServerIntegration(argc, argv);
25 return 0;25 return 0;
26}26}
2727
=== modified file 'src/platforms/mirserver/qteventfeeder.cpp'
--- src/platforms/mirserver/qteventfeeder.cpp 2016-05-06 08:41:15 +0000
+++ src/platforms/mirserver/qteventfeeder.cpp 2016-06-06 19:34:36 +0000
@@ -852,7 +852,7 @@
852 result.append(",");852 result.append(",");
853 }853 }
854 const struct QWindowSystemInterface::TouchPoint &point = points.at(i);854 const struct QWindowSystemInterface::TouchPoint &point = points.at(i);
855 result.append(QString("(id=%1,state=%2,normalPosition=(%3,%4))")855 result.append(QStringLiteral("(id=%1,state=%2,normalPosition=(%3,%4))")
856 .arg(point.id)856 .arg(point.id)
857 .arg(touchPointStateToString(point.state))857 .arg(touchPointStateToString(point.state))
858 .arg(point.normalPosition.x())858 .arg(point.normalPosition.x())
859859
=== modified file 'src/platforms/mirserver/screen.cpp'
--- src/platforms/mirserver/screen.cpp 2016-05-06 08:41:15 +0000
+++ src/platforms/mirserver/screen.cpp 2016-06-06 19:34:36 +0000
@@ -169,15 +169,15 @@
169169
170 if (!skipDBusRegistration) {170 if (!skipDBusRegistration) {
171 // FIXME This is a unity8 specific dbus call and shouldn't be in qtmir171 // FIXME This is a unity8 specific dbus call and shouldn't be in qtmir
172 m_unityScreen = new QDBusInterface("com.canonical.Unity.Screen",172 m_unityScreen = new QDBusInterface(QStringLiteral("com.canonical.Unity.Screen"),
173 "/com/canonical/Unity/Screen",173 QStringLiteral("/com/canonical/Unity/Screen"),
174 "com.canonical.Unity.Screen",174 QStringLiteral("com.canonical.Unity.Screen"),
175 QDBusConnection::systemBus(), this);175 QDBusConnection::systemBus(), this);
176176
177 m_unityScreen->connection().connect("com.canonical.Unity.Screen",177 m_unityScreen->connection().connect(QStringLiteral("com.canonical.Unity.Screen"),
178 "/com/canonical/Unity/Screen",178 QStringLiteral("/com/canonical/Unity/Screen"),
179 "com.canonical.Unity.Screen",179 QStringLiteral("com.canonical.Unity.Screen"),
180 "DisplayPowerStateChange",180 QStringLiteral("DisplayPowerStateChange"),
181 this,181 this,
182 SLOT(onDisplayPowerStateChanged(int, int)));182 SLOT(onDisplayPowerStateChanged(int, int)));
183 }183 }
184184
=== modified file 'src/platforms/mirserver/screenscontroller.cpp'
--- src/platforms/mirserver/screenscontroller.cpp 2016-01-29 16:49:06 +0000
+++ src/platforms/mirserver/screenscontroller.cpp 2016-06-06 19:34:36 +0000
@@ -54,13 +54,13 @@
54 return list;54 return list;
55}55}
5656
57bool ScreensController::setConfiguration(CustomScreenConfigurationList newConfig)57bool ScreensController::setConfiguration(const CustomScreenConfigurationList &newConfig)
58{58{
59 using namespace mir::geometry;59 using namespace mir::geometry;
6060
61 auto displayConfiguration = m_display->configuration();61 auto displayConfiguration = m_display->configuration();
6262
63 Q_FOREACH (auto config, newConfig) {63 Q_FOREACH (const auto &config, newConfig) {
64 displayConfiguration->for_each_output(64 displayConfiguration->for_each_output(
65 [&config](mg::UserDisplayConfigurationOutput &outputConfig)65 [&config](mg::UserDisplayConfigurationOutput &outputConfig)
66 {66 {
6767
=== modified file 'src/platforms/mirserver/screenscontroller.h'
--- src/platforms/mirserver/screenscontroller.h 2016-01-29 16:49:06 +0000
+++ src/platforms/mirserver/screenscontroller.h 2016-06-06 19:34:36 +0000
@@ -43,7 +43,7 @@
43 QObject *parent = 0);43 QObject *parent = 0);
4444
45 CustomScreenConfigurationList configuration();45 CustomScreenConfigurationList configuration();
46 bool setConfiguration(CustomScreenConfigurationList newConfig);46 bool setConfiguration(const CustomScreenConfigurationList &newConfig);
4747
48private:48private:
49 const QSharedPointer<ScreensModel> m_screensModel;49 const QSharedPointer<ScreensModel> m_screensModel;
5050
=== modified file 'src/platforms/mirserver/screensmodel.cpp'
--- src/platforms/mirserver/screensmodel.cpp 2016-05-06 08:41:15 +0000
+++ src/platforms/mirserver/screensmodel.cpp 2016-06-06 19:34:36 +0000
@@ -144,7 +144,7 @@
144 );144 );
145145
146 // Announce new Screens to Qt146 // Announce new Screens to Qt
147 for (auto screen : newScreenList) {147 Q_FOREACH (auto screen, newScreenList) {
148 Q_EMIT screenAdded(screen);148 Q_EMIT screenAdded(screen);
149 }149 }
150150
@@ -157,7 +157,7 @@
157 }157 }
158158
159 // Delete any old & unused Screens159 // Delete any old & unused Screens
160 for (auto screen: oldScreenList) {160 Q_FOREACH (auto screen, oldScreenList) {
161 qCDebug(QTMIR_SCREENS) << "Removed Screen with id" << screen->m_outputId.as_value()161 qCDebug(QTMIR_SCREENS) << "Removed Screen with id" << screen->m_outputId.as_value()
162 << "and geometry" << screen->geometry();162 << "and geometry" << screen->geometry();
163 auto window = static_cast<ScreenWindow *>(screen->window());163 auto window = static_cast<ScreenWindow *>(screen->window());
@@ -180,7 +180,7 @@
180 buffer.view_area().size.width.as_int(),180 buffer.view_area().size.width.as_int(),
181 buffer.view_area().size.height.as_int());181 buffer.view_area().size.height.as_int());
182182
183 for (auto screen : m_screenList) {183 Q_FOREACH (auto screen, m_screenList) {
184 if (dbGeom == screen->geometry()) {184 if (dbGeom == screen->geometry()) {
185 screen->setMirDisplayBuffer(&buffer, &group);185 screen->setMirDisplayBuffer(&buffer, &group);
186 break;186 break;
@@ -190,7 +190,7 @@
190 });190 });
191191
192 qCDebug(QTMIR_SCREENS) << "=======================================";192 qCDebug(QTMIR_SCREENS) << "=======================================";
193 for (auto screen: m_screenList) {193 Q_FOREACH (auto screen, m_screenList) {
194 qCDebug(QTMIR_SCREENS) << screen << "- id:" << screen->m_outputId.as_value()194 qCDebug(QTMIR_SCREENS) << screen << "- id:" << screen->m_outputId.as_value()
195 << "geometry:" << screen->geometry()195 << "geometry:" << screen->geometry()
196 << "window:" << screen->window()196 << "window:" << screen->window()
@@ -217,7 +217,7 @@
217217
218void ScreensModel::allWindowsSetExposed(bool exposed)218void ScreensModel::allWindowsSetExposed(bool exposed)
219{219{
220 for (const auto screen : m_screenList) {220 Q_FOREACH (const auto screen, m_screenList) {
221 const auto window = static_cast<ScreenWindow *>(screen->window());221 const auto window = static_cast<ScreenWindow *>(screen->window());
222 if (window && window->window()) {222 if (window && window->window()) {
223 window->setExposed(exposed);223 window->setExposed(exposed);
@@ -240,7 +240,7 @@
240 return nullptr;240 return nullptr;
241}241}
242242
243QWindow* ScreensModel::getWindowForPoint(const QPoint &point) //FIXME - not thread safe & not efficient243QWindow* ScreensModel::getWindowForPoint(QPoint point) //FIXME - not thread safe & not efficient
244{244{
245 // This is a part optimization, and a part work-around for AP generated input events occasionally245 // This is a part optimization, and a part work-around for AP generated input events occasionally
246 // appearing outside the screen borders: https://bugs.launchpad.net/qtmir/+bug/1508415246 // appearing outside the screen borders: https://bugs.launchpad.net/qtmir/+bug/1508415
@@ -248,7 +248,7 @@
248 return m_screenList.first()->window()->window();248 return m_screenList.first()->window()->window();
249 }249 }
250250
251 for (Screen *screen : m_screenList) {251 Q_FOREACH (Screen *screen, m_screenList) {
252 if (screen->window() && screen->geometry().contains(point)) {252 if (screen->window() && screen->geometry().contains(point)) {
253 return screen->window()->window();253 return screen->window()->window();
254 }254 }
255255
=== modified file 'src/platforms/mirserver/screensmodel.h'
--- src/platforms/mirserver/screensmodel.h 2016-04-29 15:41:00 +0000
+++ src/platforms/mirserver/screensmodel.h 2016-06-06 19:34:36 +0000
@@ -62,7 +62,7 @@
62 QList<Screen*> screens() const { return m_screenList; }62 QList<Screen*> screens() const { return m_screenList; }
63 bool compositing() const { return m_compositing; }63 bool compositing() const { return m_compositing; }
6464
65 QWindow* getWindowForPoint(const QPoint &point);65 QWindow* getWindowForPoint(QPoint point);
6666
67Q_SIGNALS:67Q_SIGNALS:
68 void screenAdded(Screen *screen);68 void screenAdded(Screen *screen);
6969
=== modified file 'src/platforms/mirserver/sessionlistener.cpp'
--- src/platforms/mirserver/sessionlistener.cpp 2016-03-10 11:55:28 +0000
+++ src/platforms/mirserver/sessionlistener.cpp 2016-06-06 19:34:36 +0000
@@ -90,7 +90,7 @@
90 Q_EMIT sessionDestroyingSurface(&session, surface);90 Q_EMIT sessionDestroyingSurface(&session, surface);
91}91}
9292
93void SessionListener::surfaceAboutToBeCreated(mir::scene::Session& session, qtmir::CreationHints creationHints)93void SessionListener::surfaceAboutToBeCreated(mir::scene::Session& session, const qtmir::CreationHints &creationHints)
94{94{
95 m_creationHintsForNewSurface[&session] = creationHints;95 m_creationHintsForNewSurface[&session] = creationHints;
96}96}
9797
=== modified file 'src/platforms/mirserver/sessionlistener.h'
--- src/platforms/mirserver/sessionlistener.h 2016-03-10 11:55:28 +0000
+++ src/platforms/mirserver/sessionlistener.h 2016-06-06 19:34:36 +0000
@@ -42,7 +42,7 @@
42 void surface_created(mir::scene::Session&, std::shared_ptr<mir::scene::Surface> const&) override;42 void surface_created(mir::scene::Session&, std::shared_ptr<mir::scene::Surface> const&) override;
43 void destroying_surface(mir::scene::Session&, std::shared_ptr<mir::scene::Surface> const&) override;43 void destroying_surface(mir::scene::Session&, std::shared_ptr<mir::scene::Surface> const&) override;
4444
45 void surfaceAboutToBeCreated(mir::scene::Session&, qtmir::CreationHints creationHints);45 void surfaceAboutToBeCreated(mir::scene::Session&, const qtmir::CreationHints &creationHints);
4646
47Q_SIGNALS:47Q_SIGNALS:
48 void sessionStarting(std::shared_ptr<mir::scene::Session> const& session);48 void sessionStarting(std::shared_ptr<mir::scene::Session> const& session);
4949
=== modified file 'src/platforms/mirserver/surfaceobserver.cpp'
--- src/platforms/mirserver/surfaceobserver.cpp 2016-05-05 14:18:30 +0000
+++ src/platforms/mirserver/surfaceobserver.cpp 2016-06-06 19:34:36 +0000
@@ -28,7 +28,7 @@
28#include <mir/geometry/size.h>28#include <mir/geometry/size.h>
29#include <mir/shell/surface_specification.h>29#include <mir/shell/surface_specification.h>
3030
31QMap<const mir::scene::Surface*, SurfaceObserver*> SurfaceObserver::m_surfaceToObserverMap;31QHash<const mir::scene::Surface*, SurfaceObserver*> SurfaceObserver::m_surfaceToObserverMap;
32QMutex SurfaceObserver::mutex;32QMutex SurfaceObserver::mutex;
3333
34SurfaceObserver::SurfaceObserver()34SurfaceObserver::SurfaceObserver()
@@ -83,7 +83,7 @@
83SurfaceObserver::~SurfaceObserver()83SurfaceObserver::~SurfaceObserver()
84{84{
85 QMutexLocker locker(&mutex);85 QMutexLocker locker(&mutex);
86 QMutableMapIterator<const mir::scene::Surface*, SurfaceObserver*> i(m_surfaceToObserverMap);86 QMutableHashIterator<const mir::scene::Surface*, SurfaceObserver*> i(m_surfaceToObserverMap);
87 while (i.hasNext()) {87 while (i.hasNext()) {
88 i.next();88 i.next();
89 if (i.value() == this) {89 if (i.value() == this) {
9090
=== modified file 'src/platforms/mirserver/surfaceobserver.h'
--- src/platforms/mirserver/surfaceobserver.h 2016-05-05 14:17:14 +0000
+++ src/platforms/mirserver/surfaceobserver.h 2016-06-06 19:34:36 +0000
@@ -30,7 +30,7 @@
30 class Surface;30 class Surface;
31 }31 }
32 namespace shell {32 namespace shell {
33 class SurfaceSpecification;33 struct SurfaceSpecification;
34 }34 }
35}35}
3636
@@ -90,7 +90,7 @@
90 QObject *m_listener;90 QObject *m_listener;
91 bool m_framesPosted;91 bool m_framesPosted;
92 QMap<QByteArray, Qt::CursorShape> m_cursorNameToShape;92 QMap<QByteArray, Qt::CursorShape> m_cursorNameToShape;
93 static QMap<const mir::scene::Surface*, SurfaceObserver*> m_surfaceToObserverMap;93 static QHash<const mir::scene::Surface*, SurfaceObserver*> m_surfaceToObserverMap;
94};94};
9595
96#endif96#endif
9797
=== modified file 'tests/framework/CMakeLists.txt'
--- tests/framework/CMakeLists.txt 2016-05-24 20:13:10 +0000
+++ tests/framework/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -1,7 +1,11 @@
1include_directories(1include_directories(
2 ${APPLICATION_API_INCLUDE_DIRS}
3 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver2 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
4 ${CMAKE_SOURCE_DIR}/src/modules3 ${CMAKE_SOURCE_DIR}/src/modules
4)
5
6include_directories(
7 SYSTEM
8 ${APPLICATION_API_INCLUDE_DIRS}
5 ${MIRSERVER_INCLUDE_DIRS}9 ${MIRSERVER_INCLUDE_DIRS}
6 ${MIRRENDERERGLDEV_INCLUDE_DIRS}10 ${MIRRENDERERGLDEV_INCLUDE_DIRS}
711
812
=== modified file 'tests/framework/fake_session.cpp'
--- tests/framework/fake_session.cpp 2016-05-24 20:13:10 +0000
+++ tests/framework/fake_session.cpp 2016-06-06 19:34:36 +0000
@@ -92,14 +92,14 @@
9292
93void FakeSession::removeChildSession(SessionInterface *) {}93void FakeSession::removeChildSession(SessionInterface *) {}
9494
95void FakeSession::foreachChildSession(std::function<void (SessionInterface *)>) const {}95void FakeSession::foreachChildSession(const std::function<void (SessionInterface *)> &) const {}
9696
97std::shared_ptr<mir::scene::PromptSession> FakeSession::activePromptSession() const97std::shared_ptr<mir::scene::PromptSession> FakeSession::activePromptSession() const
98{98{
99 return std::shared_ptr<mir::scene::PromptSession>();99 return std::shared_ptr<mir::scene::PromptSession>();
100}100}
101101
102void FakeSession::foreachPromptSession(std::function<void (const std::shared_ptr<mir::scene::PromptSession> &)>) const {}102void FakeSession::foreachPromptSession(const std::function<void (const std::shared_ptr<mir::scene::PromptSession> &)> &) const {}
103103
104void FakeSession::setFullscreen(bool) {}104void FakeSession::setFullscreen(bool) {}
105105
106106
=== modified file 'tests/framework/fake_session.h'
--- tests/framework/fake_session.h 2016-05-24 20:13:10 +0000
+++ tests/framework/fake_session.h 2016-06-06 19:34:36 +0000
@@ -63,10 +63,10 @@
63 void addChildSession(SessionInterface*) override;63 void addChildSession(SessionInterface*) override;
64 void insertChildSession(uint, SessionInterface*) override;64 void insertChildSession(uint, SessionInterface*) override;
65 void removeChildSession(SessionInterface*) override;65 void removeChildSession(SessionInterface*) override;
66 void foreachChildSession(std::function<void(SessionInterface* session)>) const override;66 void foreachChildSession(const std::function<void(SessionInterface* session)> &) const override;
6767
68 std::shared_ptr<mir::scene::PromptSession> activePromptSession() const override;68 std::shared_ptr<mir::scene::PromptSession> activePromptSession() const override;
69 void foreachPromptSession(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)>) const override;69 void foreachPromptSession(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> &) const override;
7070
71 void setFullscreen(bool) override;71 void setFullscreen(bool) override;
72 void setLive(const bool) override;72 void setLive(const bool) override;
7373
=== modified file 'tests/framework/mock_session.h'
--- tests/framework/mock_session.h 2016-03-28 18:02:26 +0000
+++ tests/framework/mock_session.h 2016-06-06 19:34:36 +0000
@@ -57,10 +57,10 @@
57 MOCK_METHOD1(addChildSession, void(SessionInterface* session));57 MOCK_METHOD1(addChildSession, void(SessionInterface* session));
58 MOCK_METHOD2(insertChildSession, void(uint index, SessionInterface* session));58 MOCK_METHOD2(insertChildSession, void(uint index, SessionInterface* session));
59 MOCK_METHOD1(removeChildSession, void(SessionInterface* session));59 MOCK_METHOD1(removeChildSession, void(SessionInterface* session));
60 MOCK_CONST_METHOD1(foreachChildSession, void(std::function<void(SessionInterface* session)> f));60 MOCK_CONST_METHOD1(foreachChildSession, void(const std::function<void(SessionInterface* session)> &f));
6161
62 MOCK_CONST_METHOD0(activePromptSession, std::shared_ptr<mir::scene::PromptSession>());62 MOCK_CONST_METHOD0(activePromptSession, std::shared_ptr<mir::scene::PromptSession>());
63 MOCK_CONST_METHOD1(foreachPromptSession, void(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> f));63 MOCK_CONST_METHOD1(foreachPromptSession, void(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> &f));
6464
65 void setState(State state);65 void setState(State state);
6666
6767
=== modified file 'tests/mirserver/Clipboard/CMakeLists.txt'
--- tests/mirserver/Clipboard/CMakeLists.txt 2014-12-03 08:56:35 +0000
+++ tests/mirserver/Clipboard/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -6,6 +6,10 @@
66
7include_directories(7include_directories(
8 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver8 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
9)
10
11include_directories(
12 SYSTEM
9 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}13 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
10 ${MIRSERVER_INCLUDE_DIRS}14 ${MIRSERVER_INCLUDE_DIRS}
11)15)
1216
=== modified file 'tests/mirserver/QtEventFeeder/CMakeLists.txt'
--- tests/mirserver/QtEventFeeder/CMakeLists.txt 2014-12-03 08:56:35 +0000
+++ tests/mirserver/QtEventFeeder/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -7,6 +7,10 @@
7include_directories(7include_directories(
8 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver8 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
9 ${CMAKE_SOURCE_DIR}/src/common9 ${CMAKE_SOURCE_DIR}/src/common
10)
11
12include_directories(
13 SYSTEM
10 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}14 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
11 ${MIRSERVER_INCLUDE_DIRS}15 ${MIRSERVER_INCLUDE_DIRS}
12)16)
1317
=== modified file 'tests/mirserver/Screen/CMakeLists.txt'
--- tests/mirserver/Screen/CMakeLists.txt 2015-11-11 10:43:36 +0000
+++ tests/mirserver/Screen/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -8,6 +8,10 @@
8 ${CMAKE_SOURCE_DIR}/tests/framework8 ${CMAKE_SOURCE_DIR}/tests/framework
9 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver9 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
10 ${CMAKE_SOURCE_DIR}/src/common10 ${CMAKE_SOURCE_DIR}/src/common
11)
12
13include_directories(
14 SYSTEM
11 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}15 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
12 ${MIRSERVER_INCLUDE_DIRS}16 ${MIRSERVER_INCLUDE_DIRS}
13)17)
1418
=== modified file 'tests/mirserver/ScreensModel/CMakeLists.txt'
--- tests/mirserver/ScreensModel/CMakeLists.txt 2016-02-16 11:48:35 +0000
+++ tests/mirserver/ScreensModel/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -11,6 +11,10 @@
11 ${CMAKE_SOURCE_DIR}/tests/framework11 ${CMAKE_SOURCE_DIR}/tests/framework
12 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver12 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
13 ${CMAKE_SOURCE_DIR}/src/common13 ${CMAKE_SOURCE_DIR}/src/common
14)
15
16include_directories(
17 SYSTEM
14 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}18 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
15 ${MIRSERVER_INCLUDE_DIRS}19 ${MIRSERVER_INCLUDE_DIRS}
16 ${MIRRENDERERGLDEV_INCLUDE_DIRS}20 ${MIRRENDERERGLDEV_INCLUDE_DIRS}
1721
=== modified file 'tests/mirserver/WindowManager/CMakeLists.txt'
--- tests/mirserver/WindowManager/CMakeLists.txt 2016-03-10 11:55:28 +0000
+++ tests/mirserver/WindowManager/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -1,5 +1,9 @@
1include_directories(1include_directories(
2 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver2 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
3)
4
5include_directories(
6 SYSTEM
3 ${MIRSERVER_INCLUDE_DIRS}7 ${MIRSERVER_INCLUDE_DIRS}
4)8)
59
610
=== modified file 'tests/modules/Application/CMakeLists.txt'
--- tests/modules/Application/CMakeLists.txt 2015-12-15 10:03:32 +0000
+++ tests/modules/Application/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -7,8 +7,11 @@
7 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver7 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
8 ${CMAKE_SOURCE_DIR}/src/modules8 ${CMAKE_SOURCE_DIR}/src/modules
9 ${CMAKE_SOURCE_DIR}/tests/framework9 ${CMAKE_SOURCE_DIR}/tests/framework
10)
11
12include_directories(
13 SYSTEM
10 ${MIRSERVER_INCLUDE_DIRS}14 ${MIRSERVER_INCLUDE_DIRS}
11
12 ${Qt5Core_INCLUDE_DIRS}15 ${Qt5Core_INCLUDE_DIRS}
13 ${Qt5GUI_INCLUDE_DIRS}16 ${Qt5GUI_INCLUDE_DIRS}
14 ${Qt5Quick_INCLUDE_DIRS}17 ${Qt5Quick_INCLUDE_DIRS}
1518
=== modified file 'tests/modules/ApplicationManager/CMakeLists.txt'
--- tests/modules/ApplicationManager/CMakeLists.txt 2015-09-30 15:45:17 +0000
+++ tests/modules/ApplicationManager/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -5,10 +5,14 @@
5)5)
66
7include_directories(7include_directories(
8 ${APPLICATION_API_INCLUDE_DIRS}
9 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver8 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
10 ${CMAKE_SOURCE_DIR}/src/modules9 ${CMAKE_SOURCE_DIR}/src/modules
11 ${CMAKE_SOURCE_DIR}/tests/framework10 ${CMAKE_SOURCE_DIR}/tests/framework
11)
12
13include_directories(
14 SYSTEM
15 ${APPLICATION_API_INCLUDE_DIRS}
12 ${MIRSERVER_INCLUDE_DIRS}16 ${MIRSERVER_INCLUDE_DIRS}
13)17)
1418
1519
=== modified file 'tests/modules/SessionManager/CMakeLists.txt'
--- tests/modules/SessionManager/CMakeLists.txt 2015-09-30 15:45:17 +0000
+++ tests/modules/SessionManager/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -6,10 +6,14 @@
6)6)
77
8include_directories(8include_directories(
9 ${APPLICATION_API_INCLUDE_DIRS}
10 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver9 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
11 ${CMAKE_SOURCE_DIR}/src/modules10 ${CMAKE_SOURCE_DIR}/src/modules
12 ${CMAKE_SOURCE_DIR}/tests/framework11 ${CMAKE_SOURCE_DIR}/tests/framework
12)
13
14include_directories(
15 SYSTEM
16 ${APPLICATION_API_INCLUDE_DIRS}
13 ${MIRSERVER_INCLUDE_DIRS}17 ${MIRSERVER_INCLUDE_DIRS}
14)18)
1519
1620
=== modified file 'tests/modules/SharedWakelock/CMakeLists.txt'
--- tests/modules/SharedWakelock/CMakeLists.txt 2015-09-30 15:45:17 +0000
+++ tests/modules/SharedWakelock/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -5,6 +5,10 @@
55
6include_directories(6include_directories(
7 ${CMAKE_SOURCE_DIR}/src/modules7 ${CMAKE_SOURCE_DIR}/src/modules
8)
9
10include_directories(
11 SYSTEM
8 ${QTDBUSTEST_INCLUDE_DIRS}12 ${QTDBUSTEST_INCLUDE_DIRS}
9 ${QTDBUSMOCK_INCLUDE_DIRS}13 ${QTDBUSMOCK_INCLUDE_DIRS}
10)14)
1115
=== modified file 'tests/modules/SurfaceManager/CMakeLists.txt'
--- tests/modules/SurfaceManager/CMakeLists.txt 2016-05-24 20:13:10 +0000
+++ tests/modules/SurfaceManager/CMakeLists.txt 2016-06-06 19:34:36 +0000
@@ -9,6 +9,10 @@
9 ${CMAKE_SOURCE_DIR}/src/modules9 ${CMAKE_SOURCE_DIR}/src/modules
10 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver10 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
11 ${CMAKE_SOURCE_DIR}/tests/framework11 ${CMAKE_SOURCE_DIR}/tests/framework
12)
13
14include_directories(
15 SYSTEM
12 ${MIRSERVER_INCLUDE_DIRS}16 ${MIRSERVER_INCLUDE_DIRS}
13 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}17 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
14)18)

Subscribers

People subscribed via source and target branches