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

Proposed by Albert Astals Cid on 2015-09-08
Status: Superseded
Proposed branch: lp:~aacid/qtmir/clazy_run
Merge into: lp:qtmir
Diff against target: 2284 lines (+439/-206)
74 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 (+13/-12)
src/modules/Unity/Application/CMakeLists.txt (+6/-2)
src/modules/Unity/Application/application.cpp (+21/-17)
src/modules/Unity/Application/application.h (+6/-5)
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/mirsurfacelistmodel.cpp (+30/-4)
src/modules/Unity/Application/mirsurfacelistmodel.h (+3/-0)
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 (+29/-30)
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/sessionmanager.h (+0/-1)
src/modules/Unity/Application/sharedwakelock.cpp (+4/-4)
src/modules/Unity/Application/ubuntukeyboardinfo.cpp (+3/-1)
src/modules/Unity/Application/upstart/taskcontroller.cpp (+3/-3)
src/modules/Unity/Screens/CMakeLists.txt (+4/-0)
src/modules/Unity/Screens/qquickscreenwindow.cpp (+1/-1)
src/platforms/mirserver/CMakeLists.txt (+5/-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/mirwindowmanager.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_mir_session.cpp (+1/-0)
tests/framework/mock_session.h (+2/-2)
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/clazy_run
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing on 2016-06-07
PS Jenkins bot continuous-integration Needs Fixing on 2015-12-14
Mir development team 2015-09-08 Pending
Review via email: mp+270398@code.launchpad.net

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.
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Gerry Boland (gerboland) wrote :

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.

Albert Astals Cid (aacid) wrote :

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.

lp:~aacid/qtmir/clazy_run updated on 2015-09-29
372. By Daniel van Vugt on 2015-09-14

Stop waking up every 200ms if there's nothing to wake up for.
It's just wasting battery.

This solves at least half of LP: #1479250. Although the regular
wakeup problem is solved by this, Unity8 continues to use noticeable
CPU while idle (obviously in much less frequent intervals now). Fixes: #1479250
Approved by: Gerry Boland

373. By Daniel d'Andrada on 2015-09-14

MirSurfaceItem gets dirty when it's set to draw a different (or no) surface Fixes: #1492185
Approved by: Gerry Boland

374. By Daniel d'Andrada on 2015-09-14

QtEventFeeder: log the pointer events it gets from Mir
Approved by: PS Jenkins bot, Gerry Boland

375. By CI Train Bot Account on 2015-09-14

Releasing 0.4.6+15.10.20150914-0ubuntu1

376. By Daniel d'Andrada on 2015-09-18

Update surface focus when a surface enters or leaves a MirSurfaceItem

+ Refactor MirSurfaceItem so that it talks to a MirSurfaceInterface
  instead of the concrete MirSurface class
+ Make MirSurface::setFocus() more robust Fixes: #1491034, #1495437
Approved by: PS Jenkins bot, Gerry Boland

377. By CI Train Bot Account on 2015-09-18

Releasing 0.4.6+15.10.20150918-0ubuntu1

378. By Cemil Azizoglu on 2015-09-23

Port gl_bind_to_texture to the new TextureSource interface.
Update for Mir 0.16 release.
Approved by: Alan Griffiths

379. By CI Train Bot Account on 2015-09-23

Releasing 0.4.6+15.10.20150923-0ubuntu1

380. By Michał Sawicz on 2015-09-25

Bump application API version
Approved by: Daniel d'Andrada

381. By CI Train Bot Account on 2015-09-25

Releasing 0.4.6+15.10.20150925-0ubuntu1

lp:~aacid/qtmir/clazy_run updated on 2015-10-26
382. By Daniel d'Andrada on 2015-09-30

MirSurfaceItem: texture must be manipulated only from the scene graph thread

Do not delete the texture from within the GUI thread ever, even if the
MirSurfaceItem is no longer holding the MirSurface that provided it.
Otherwise you run the risk of having the scene graph thread dereferencing
a pointer to a texture that no longer exists.

This also fixes fd leak LP: #1495871 (which was a texture/buffer leak). Fixes: #1495871, #1499388
Approved by: Gerry Boland, PS Jenkins bot

383. By Gerry Boland on 2015-09-30

Add "Closing" state to Application, use it to distinguish user-induced close from app-induced close. Don't clear QML cache if user-induced.

Much code taken from a partially-related branch by Nick Dedekind:
https://code.launchpad.net/~nick-dedekind/qtmir/polite-close/+merge/262188

Note there is 1 disabled test, which needs additional work to fix. Fixes: #1500372
Approved by: PS Jenkins bot

384. By CI Train Bot Account on 2015-09-30

Releasing 0.4.6+15.10.20150930.1-0ubuntu1

385. By Alexandros Frantzis on 2015-10-08

Update for Mir 0.17 changes

386. By CI Train Bot Account on 2015-10-08

Releasing 0.4.6+15.10.20151008.2-0ubuntu1

387. By Albert Astals Cid on 2015-10-21

Don't search for the element again

Approved by: Gerry Boland, PS Jenkins bot

388. By Daniel d'Andrada on 2015-10-21

Shell draws its own cursor using the new Cursor QML element
Approved by: Lukáš Tinkl, Gerry Boland

389. By Gerry Boland on 2015-10-21

Initial multimonitor support - react correctly to Mir DisplayConfiguration changes.

On Mir DisplayConfiguration changes, QtMir now correctly:
1. blocks Mir until it has stopped all renderers and has their GL contexts released
2. reads the new DisplayConfiguration, matches any existing ScreenWindows to new DisplayBuffers should they change (as Mir may destroy and create it on us)
3. restarts all renderers

This also solves shutdown crash issues due to raciness of mir destroying the GL context backing the shell's QWindow before its renderer had stopped.

Add Unity.Screens qml module to advertise current screen state to QML. Fixes: #1436735, #1488831, #1488863
Approved by: Daniel d'Andrada

390. By Michał Sawicz on 2015-10-21

MirSurfaceItem: Survive holding a surface with an empty texture

Survive having a surface whose texture holds no mir buffer at all.
Instead of crashing in such situation we simply don't render it.
Approved by: Gerry Boland

391. By Michał Sawicz on 2015-10-21

Improve multimonitor support

* Removed magic:
 - Don't automagically select the screen where a window will be show.
   Let shell decide.
 - Don't automagically focus a window. Let shell handle it.

* Let shell know when a screen is about to be removed so that it has
  the opportunity to move or destroy a window in it before it's too late.
  - Added QGuiApplication::onScreenAboutToBeRemoved

* Added logging to key events
Approved by: Michał Sawicz

392. By Alan Griffiths on 2015-10-21

Opaquify MirWindowManager to control visibility of upcoming Window Management work
Approved by: Gerry Boland, PS Jenkins bot

393. By Lukáš Tinkl on 2015-10-21

React to surface modifications (window caption)
Approved by: Daniel d'Andrada

394. By Nick Dedekind on 2015-10-21

Removed the manipulation of the CMAKE_INSTALL_PREFIX from debian/rules
Approved by: Gerry Boland

395. By Nick Dedekind on 2015-10-21

Added touch performance tracing and test.
Approved by: Gerry Boland

396. By Lukáš Tinkl on 2015-10-21

Implement support for mouse wheel events; correctly pass around buttons Fixes: #1497091
Approved by: Gerry Boland

397. By Gerry Boland on 2015-10-21

Workaround for AutoPilot input coordinate positioning being outside screen geometry

398. By CI Train Bot Account on 2015-10-21

Releasing 0.4.6+15.10.20151021-0ubuntu1

lp:~aacid/qtmir/clazy_run updated on 2015-12-10
399. By Michał Sawicz on 2015-11-02

Clean up packaging and fix autopkgtest on armhf
Approved by: Gerry Boland

400. By Michael Terry on 2015-11-02

Support new isTouchApp property to ApplicationInfoInterface and move lifecycle policy logic out of qtmir.

Now that qtmir won't decide policy for suspending anymore, we don't need all the lifecycleException handling in qtmir either. That can move to unity8.

But since the GSettings key for that was registered under the qtmir namespace (and there's no technical reason to migrate settings), I left the schema and classes dealing with GSettings alone, for future use.

401. By Nick Dedekind on 2015-11-02

Support server->client visibility change to stop rendering (lp:#1475678) Fixes: #1475678
Approved by: Daniel d'Andrada

402. By Alan Griffiths on 2015-11-02

Test harness for MirWindowManager (in preparation for more intelligent window management)
Approved by: Gerry Boland

403. By Nick Dedekind on 2015-11-02

Hand Qt millisecond timestamps rather than nanosecond. Fixes: #1510571, #1511076, #1511711
Approved by: Gerry Boland

404. By CI Train Bot Account on 2015-11-02

Releasing 0.4.6+16.04.20151102-0ubuntu1

405. By Nick Dedekind on 2015-11-10

Reverted occlusion detection (lp#1514556) Fixes: #1514556

406. By CI Train Bot Account on 2015-11-10

Releasing 0.4.6+16.04.20151110-0ubuntu1

407. By Gerry Boland on 2015-11-12

Fix armhf builds on Xenial by using -std=gnu99 instead of c99

Fixes this FTBFS on xenial:

In file included from /usr/include/lttng/tracepoint-rcu.h:26:0,
                 from /usr/include/lttng/tracepoint.h:29,
                 from /home/phablet/dev/projects/qtmir/qtmir/BUILD-xen/src/platforms/mirserver/tracepoints.h:10,
                 from /home/phablet/dev/projects/qtmir/qtmir/BUILD-xen/src/platforms/mirserver/tracepoints.c:7:
/usr/include/urcu/arch/generic.h: In function ‘caa_get_cycles’:
/usr/include/urcu/arch/generic.h:165:6: error: ‘CLOCK_MONOTONIC’ undeclared (first use in this function)
  if (caa_unlikely(clock_gettime(CLOCK_MONOTONIC, &ts)))
      ^
/usr/include/urcu/arch/generic.h:165:6: note: each undeclared identifier is reported only once for each function it appears in

Strictly should compile code with -std=gnu99 instead of -std=c99 to have the identifiers SIGEV_SIGNAL, sigeventStruct, and CLOCK_MONOTONIC available. These identifiers are declared when _POSIX_C_SOURCE is set to a value >= 199309L, which is the case with -std=gnu99. I could also have used -D_POSIX_C_SOURCE=199309L -std=c99 or have the macro defined in source code.

Did not impact wily as libuctu only started looking for CLOCK_MONOTONIC in Xenial release.
Approved by: Daniel d'Andrada

408. By CI Train Bot Account on 2015-11-12

Releasing 0.4.6+16.04.20151112-0ubuntu1

409. By Nick Dedekind on 2015-11-13

Update surface textures when dropping frames. Fixes: #1515356
Approved by: Gerry Boland

410. By CI Train Bot Account on 2015-11-13

Releasing 0.4.6+16.04.20151113-0ubuntu1

411. By Gerry Boland on 2015-11-19

Fix use of uninitialized variable
Approved by: Daniel d'Andrada, PS Jenkins bot

412. By Albert Astals Cid on 2015-11-19

Enable Efficient String Construction by default

See http://blog.qt.io/blog/2011/06/13/string-concatenation-with-qstringbuilder/
Approved by: Gerry Boland, PS Jenkins bot

413. By Michał Sawicz on 2015-11-19

Build with clang (tests/gmock fails and is unfixable on our side i'd say)
Approved by: Gerry Boland

414. By Gerry Boland on 2015-11-19

Use pid_t for PIDs.
Approved by: Daniel d'Andrada, PS Jenkins bot

415. By Loïc Molinari on 2015-11-19

Ensured Mir surface items with size less than or equal to zero are not rendered, as it's usually done for standard QtQuick items.
Approved by: Gerry Boland

416. By Nick Dedekind on 2015-11-19

Fix a crash when dropping a surface frame before Qt draws a surface item. Fixes: #1517139
Approved by: Gerry Boland

417. By CI Train Bot Account on 2015-11-19

Releasing 0.4.6+16.04.20151119-0ubuntu1

418. By Daniel d'Andrada on 2015-11-25

Implemented support for cursors set by client surfaces
Approved by: Lukáš Tinkl

419. By Gerry Boland on 2015-11-25

Manage frameSwapped signal/slot connection with MirSurface more strictly to avoid crash.

Direct Signal/slot connections across thread boundaries incur the same risks as any cross-thread calls. While connect/disconnect are thread safe methods, it is possible for a slot to be called while the slot owner is being deconstructed - and so not yet disconnected.

So watch for the Item's window change signal and disconnect signal immediately. Also move slot ownership to MirSurfaceItem to auto-disconnect more aggressively.
 Fixes: #1517571
Approved by: Daniel d'Andrada

420. By Daniel d'Andrada on 2015-11-25

Forward Mir mouse wheel events to the shell cursor Fixes: #1497091
Approved by: Lukáš Tinkl

421. By Daniel d'Andrada on 2015-11-25

Revert revision 415

The commit "Ensured Mir surface items with size less than or equal to zero are not rendered,
as it's usually done for standard QtQuick items." caused a regression.

MirSurface.size was being kept uninitialized, as QSize(-1,-1).

422. By CI Train Bot Account on 2015-11-25

Releasing 0.4.6+16.04.20151125-0ubuntu1

423. By Timo Jyrinki on 2015-12-01

Rebuild against Qt 5.5.1.

424. By Nick Dedekind on 2015-12-10

Politely asks processes to close before resorting to killing Fixes: #1434584
Approved by: Daniel d'Andrada

425. By Daniel d'Andrada on 2015-12-10

Add MirSurfaceItem.fillMode and ensure items and buffer are in sync

Ensure that by the time we enter the phase of updating the scene graph, all qml items are up to date regarding the size of the buffer about to be rendered.

NB: This rendering scheme needs triple buffering to work.
Approved by: Michael Zanetti

426. By Daniel d'Andrada on 2015-12-10

Make Session hold multiple surfaces

+ Standardize MirSurface debug messages and account for multiple surfaces per app
Approved by: Gerry Boland

427. By Michael Terry on 2015-12-10

Don't hold a wakelock on apps that are exempt from lifecycle management.

This supports the new exemptFromLifecycle flag for applications as well as bringing back the internal RunningInBackground state.

The tests were revived from the same branch that removed them when we removed RunningInBackground (revision 400) Fixes: #1518764

428. By CI Train Bot Account on 2015-12-10

Releasing 0.4.7+16.04.20151210-0ubuntu1

lp:~aacid/qtmir/clazy_run updated on 2016-01-04
429. By Cemil Azizoglu on 2015-12-17

compatibility branch for Mir 0.18
Approved by: Gerry Boland, Michał Sawicz

430. By CI Train Bot Account on 2015-12-17

Releasing 0.4.7+16.04.20151217-0ubuntu1

431. By Michał Sawicz on 2015-12-22

No-change rebuild to get -gles in sync
Approved by: Kevin DuBois

432. By CI Train Bot Account on 2015-12-22

Releasing 0.4.7+16.04.20151222-0ubuntu1

433. By Daniel d'Andrada on 2016-01-04

Update Session.fullscreen properties at the right time Fixes: #1525893
Approved by: Gerry Boland

434. By CI Train Bot Account on 2016-01-04

Releasing 0.4.7+16.04.20160104-0ubuntu1

Unity8 CI Bot (unity8-ci-bot) wrote :

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)
lp:~aacid/qtmir/clazy_run updated on 2016-03-22
435. By Nick Dedekind on 2016-01-22

Fixed issue where stopping the session while suspending was causing app close to stall. Fixes: #1536133

436. By CI Train Bot Account on 2016-01-22

Releasing 0.4.7+16.04.20160122-0ubuntu1

437. By Brandon Schaefer on 2016-01-27

Changes for mir 0.19.

438. By CI Train Bot Account on 2016-01-27

Releasing 0.4.7+16.04.20160127.1-0ubuntu1

439. By Nick Dedekind on 2016-02-08

Added fix and test for closing app during the StoppedResumable state. Fixes: #1541388
Approved by: Michael Zanetti

440. By CI Train Bot Account on 2016-02-08

Releasing 0.4.7+16.04.20160208-0ubuntu1

441. By Nick Dedekind on 2016-02-12

Moved test framework into a static library for quicker recompilation.
Approved by: Gerry Boland

442. By Daniel d'Andrada on 2016-02-12

Remove the useless TaskController

It was just forwarding calls between ApplicationManager and ApplicationCrontroller.
Had no logic of its own.

ApplicationCrontroller was then renamed to TaskController as the latter has a better API and it also keeps ApplicationManager code more or less untouched.

Tests have been improved a bit by better emulating TaskController behavior
Approved by: Nick Dedekind

443. By Daniel d'Andrada on 2016-02-12

Let shell decide the initial surface size Fixes: #1532974
Approved by: Nick Dedekind

444. By Daniel d'Andrada on 2016-02-12

Surface Size Hints
Approved by: Lukáš Tinkl

445. By Albert Astals Cid on 2016-02-12

Reset start time if the timestamp travels to the past
 Fixes: #1524488
Approved by: Nick Dedekind

446. By Albert Astals Cid on 2016-02-12

Provide branch prediction information to the if in compressTimestamp
Approved by: Gerry Boland

447. By Michał Sawicz on 2016-02-12

Use QStandardPaths to determine QML cache location

Also use temporary XDG_CACHE_HOME in ApplicationManagerTests so we don't pollute user's $HOME
Approved by: Unity8 CI Bot, Albert Astals Cid

448. By Daniel d'Andrada on 2016-02-12

Update mir version requirement
Approved by: Nick Dedekind

449. By Michał Sawicz on 2016-02-12

Bump unity-api dependencies
Approved by: Michael Terry

450. By CI Train Bot Account on 2016-02-12

Releasing 0.4.7+16.04.20160212-0ubuntu1

451. By Alan Griffiths on 2016-02-19

Mir 0.20 Release
Approved by: Cemil Azizoglu

452. By CI Train Bot Account on 2016-02-19

Releasing 0.4.7+16.04.20160219-0ubuntu1

453. By Gerry Boland on 2016-03-10

Allow Mir remove command line arguments it understands, before letting Qt process them.
Approved by: Daniel d'Andrada

454. By Alan Griffiths on 2016-03-10

Copy the Window Management work-in-progress from Mir examples.
Approved by: Gerry Boland

455. By Michael Zanetti on 2016-03-10

Add a dedicated property for the inputMethodSurface

When we're hot-plugging screens, the OSK ui might only be created after surfaceCreated() is emitted and we miss that signal. Fixes: #1545286
Approved by: Daniel d'Andrada

456. By Gerry Boland on 2016-03-10

Screen: only enable orientation sensor for internal display.

It's not great, but works around orientation sensor not working after device unplug from monitor. I believe this is because QtUbuntu-Sensors and Platform-api are not dealing properly with multiple accessors of the sensors. Instead only the last accessor gets correct state, and the earlier ones get nothing. Fixes: #1545286
Approved by: Unity8 CI Bot, Michael Zanetti

457. By Daniel d'Andrada on 2016-03-10

Ensure QmlEngine doesn't delete our MirSurfaces
Approved by: Gerry Boland, Unity8 CI Bot

458. By Gerry Boland on 2016-03-10

Ensure ScreenWindow geometry correctly set and used after moving Screen

NB: this will conflict with lp:~unity-team/qtmir/set-display-config, from which this is a cherry-pick Fixes: #1545286
Approved by: Gerry Boland, Unity8 CI Bot

459. By Michael Terry on 2016-03-10

Fix some mocks to use more realistic code paths.

Specifically, MockApplicationController::doAppIdHasProcessId() was returning -1 if the appId was unknown. But that function returns a bool, so the -1 got translated into a true value. So that mocked method returned true for appIds that hadn't been registered yet.

In order to fix that, I decided to rewrite doAppIdHasProcessId to call primaryPidForAppId so that it could be overridden easier in tests. And adjusted the affected tests to all set an ON_CALL(primaryPidForAppId).

(Because otherwise the test has no way to influence the pid used for children -- why do we actually fork off a while(true) process?)

There are several other fixes here for pieces of the mocks that I found were missing while exploring solutions for the above problem:

- I'm actually not 100% clear on why this started being called, but MockSession::name() couldn't create a default value for QString and the gtest framework was bailing when it was called. So I added a default.

- Similarly, if ApplicationManager::authorizeSession() tries to examine an app's commandline, gtest will abort because MockProcInfo::command_line() doesn't have a mock return value. So I added a default.

- And if authorizeSession() lasted long enough to see that the Application object already existed, it deleted the desktop reader object it had made. But the test mocks always returned the same object, so this caused a segfault. I retooled the ApplicationManager tests to return a new object each time DesktopFileReaderFactory::createInstance was called.
Approved by: Gerry Boland, Unity8 CI Bot

460. By Alberto Aguirre on 2016-03-10

Hook MirOpenGLContext::doneCurrent to Screen::doneCurrent

Actually unbind the opengl/egl context when requested.
Approved by: Gerry Boland

461. By Michał Sawicz on 2016-03-10

Drop dummy autopkgtest

It doesn't make sense after all - DEP-8 tests are meant to test packages as-installed, not rebuild them from scratch. This meant that new Mir releases got blocked on this, because old qtmir was trying to build against new Mir, which usually fails, as needs adaptation for API changes.
Approved by: Gerry Boland

462. By CI Train Bot Account on 2016-03-10

Releasing 0.4.7+16.04.20160310.1-0ubuntu1

463. By Nick Dedekind on 2016-03-22

Added setStage for sidestage redesign and removed ExecFlags
Approved by: Daniel d'Andrada

464. By Michał Sawicz on 2016-03-22

Add support for low shell chrome. Fixes: #1535397
Approved by: Gerry Boland

465. By Michał Sawicz on 2016-03-22

Support for switching keyboard layouts Fixes: #1491340, #1524400
Approved by: Michael Terry

466. By CI Train Bot Account on 2016-03-22

Releasing 0.4.8+16.04.20160322.1-0ubuntu1

Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
lp:~aacid/qtmir/clazy_run updated on 2016-04-29
467. By Daniel van Vugt on 2016-03-29

Don't use preferred_mode_index. Some devices like TVs don't provide a
preferred mode, so preferred_mode_index may be out of range (a clumsy
way to represent 'none'). Instead use the resolution of the current display mode, which should always be in range.

Fixes LP: #1560497 Fixes: #1560497
Approved by: Gerry Boland

468. By CI Train Bot Account on 2016-03-29

Releasing 0.4.8+16.04.20160329.1-0ubuntu1

469. By Michał Sawicz on 2016-03-30

Drop leftover Xs-Testsuite header
Approved by: Unity8 CI Bot, Gerry Boland

470. By CI Train Bot Account on 2016-03-30

Releasing 0.4.8+16.04.20160330-0ubuntu1

471. By Daniel d'Andrada on 2016-04-13

Logging of Qt's OpenGL debug messages now must be enabled via CMake option
Approved by: Gerry Boland

472. By Daniel d'Andrada on 2016-04-13

Application: improve debug logging

Minimize boilerplate in logging code, as well as standardise its format.
Approved by: Gerry Boland

473. By Daniel d'Andrada on 2016-04-13

Remove application screenshot provider

It's no longer needed now that QML provides a "item-snapshot" feature.

Besides, it has no purpose in a surface-based window management.
Approved by: Lukáš Tinkl, Gerry Boland

474. By Daniel d'Andrada on 2016-04-13

MirSurface: replace keymapLayout and keymapVariant with keymap

That's easier for unity8 to use, leads to declarative code.
Approved by: Lukáš Tinkl

475. By Daniel d'Andrada on 2016-04-13

Surface-based window management

- Session is no longer exported to QML. It's now an internal qtmir concept.
Approved by: Gerry Boland

476. By Michał Sawicz on 2016-04-13

Inline -gles packaging.
Approved by: Gerry Boland

477. By CI Train Bot Account on 2016-04-13

Releasing 0.4.8+16.04.20160413-0ubuntu1

478. By Alberto Aguirre on 2016-04-26

Mir 0.22 compatibility
Approved by: Cemil Azizoglu, Kevin DuBois, Brandon Schaefer

479. By CI Train Bot Account on 2016-04-26

Releasing 0.4.8+16.04.20160426-0ubuntu1

480. By Michael Terry on 2016-04-28

Use latest UbuntuAppLaunch API which supports libertine apps.
Approved by: Nick Dedekind

481. By Lukáš Tinkl on 2016-04-28

Regression fix: restore window title handling Fixes: #1563522
Approved by: Nick Dedekind

482. By CI Train Bot Account on 2016-04-28

Releasing 0.4.8+16.04.20160428-0ubuntu1

483. By Gerry Boland on 2016-04-29

Enhance ScreenController & the DisplayConfigurationPolicy to implement dynamic grid units.

- Rename ScreenController to ScreenModel, as it just reflects current screen state, does not offer means to configure it
- ScreenController can update state of existing Screens, based on Mir DisplayConfiguration changes.
- Expand Screen to include scale & form factor properties, with getter/notifier in NativeInterface. This enables the dynamic grid units in the shell
- Add a Unity.Screens qml module to give QML better information about connected screens, and allow basic reconfiguring.
- Implement a basic display configuration policy to set suitable scale and form factor on an external display (needed for dynamic grid units) Fixes: #1573532
Approved by: Unity8 CI Bot, Daniel d'Andrada

484. By CI Train Bot Account on 2016-04-29

Releasing 0.4.8+16.04.20160429.1-0ubuntu1

Daniel d'Andrada (dandrader) wrote :

So what's the fate of this branch?

Albert Astals Cid (aacid) wrote :

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.

lp:~aacid/qtmir/clazy_run updated on 2016-06-06
485. By Daniel d'Andrada on 2016-05-11

Session: Add a blank surface to the public list if it already has child prompt surfaces

A prompt session may come in too early, before its parent session got a chance
to draw its surface's first frame.

Normally that wouldn't be a problem and we could withhold that parent surface until
it's finally drawn to. But unfortunately the application process might be blocked,
unable to draw anything, until its child prompt session gets dismissed.

Because of that we have no option but to expose this blank surface to shell so that
it can display it along with the prompt surface on top of it, so that the user can
interact with it right away and finally unblock the application. Fixes: #1578665
Approved by: Unity8 CI Bot

486. By CI Train Bot Account on 2016-05-11

Releasing 0.4.8+16.04.20160511-0ubuntu1

487. By Daniel d'Andrada on 2016-05-18

Fix ProxySurfaceListModel::countChanged signal
Approved by: Unity8 CI Bot

488. By Daniel d'Andrada on 2016-05-18

Move prompt surfaces from MirSurface to Application and emit firstChanged signal

489. By CI Train Bot Account on 2016-05-18

Releasing 0.4.8+16.04.20160518.1-0ubuntu1

490. By Gerry Boland on 2016-05-20

UAL can throw on creating Application if invalid appId, catch instead of aborting Fixes: #1578258
Approved by: Unity8 CI Bot, Michael Terry

491. By Daniel d'Andrada on 2016-05-20

Application: Don't respawn if closed while still starting up

+ refactoring of Application::onSessionStateChanged to explicitly cover every single internal state on session stopping. Fixes: #1575577
Approved by: Gerry Boland, Unity8 CI Bot, Michael Terry

492. By Alan Griffiths on 2016-05-20

Reduce coupling to MirServer - it has been misused as a context object.
Approved by: Alan Griffiths, Unity8 CI Bot, Daniel d'Andrada

493. By Michał Sawicz on 2016-05-20

Centralize logging categories

The header part is already centralized. Make the cpp the same.

Moves all logging category symbols to the mirserver lib.

Enables mirserver to use logging categories that were previously declared in the Unity.Application module.
Approved by: Unity8 CI Bot, Michael Terry

494. By Daniel d'Andrada on 2016-05-20

Also interpret the cursor names used by Mir client API Fixes: #1447839
Approved by: Unity8 CI Bot, Michał Sawicz

495. By Timo Jyrinki on 2016-05-20

Use FindQt5PlatformSupport to find platform support, other methods not available on Qt 5.6 anymore. Fixes: #1554404
Approved by: Gerry Boland

496. By CI Train Bot Account on 2016-05-20

Releasing 0.4.8+16.10.20160520.1-0ubuntu1

497. By Daniel d'Andrada on 2016-05-25

Bump unity-api versions
Approved by: Lukáš Tinkl

498. By Alan Griffiths on 2016-05-25

Drop the (unused) prototype Window Management code
Approved by: Gerry Boland, Unity8 CI Bot

499. By Daniel d'Andrada on 2016-05-25

Fix mir::scene::Surface focus attribute updates
Approved by: Unity8 CI Bot

500. By Albert Astals Cid on 2016-05-25

Enable workaround_brokenFBOReadBack on various chipsets

Gives for impressive improvements in QSGDefaultDistanceFieldGlyphCache::storeGlyphs
impressive = 788ms -> 6ms

Copied from qtubuntu
 Fixes: #1581123
Approved by: Gerry Boland, Unity8 CI Bot

501. By Alan Griffiths on 2016-05-25

Remove workaround for lp:1502200
Approved by: Unity8 CI Bot, Daniel d'Andrada

502. By CI Train Bot Account on 2016-05-25

Releasing 0.4.8+16.10.20160525.2-0ubuntu1

503. By Michael Zanetti on 2016-06-06

Adding ApplicationInfo::surfaceCount property

504. By Albert Astals Cid on 2016-06-06

Add support for compiler sanitizers via ECM

505. By Albert Astals Cid on 2016-06-06

Compile with -fsanitize=undefined

506. By Albert Astals Cid on 2016-06-06

Fix leak in ScreensModelTest (LP: #1585502)

507. By Albert Astals Cid on 2016-06-06

Fix leak in SessionManager test (LP: #1585498)

508. By Albert Astals Cid on 2016-06-06

Remove unused m_sessions member

509. By Albert Astals Cid on 2016-06-06

Add missing breaks

510. By Albert Astals Cid on 2016-06-06

Initialize m_lastX and m_lastY

511. By Albert Astals Cid on 2016-06-06

Initialize m_sessionId

512. By Albert Astals Cid on 2016-06-06

Give the locker a name

513. By Albert Astals Cid on 2016-06-06

Fix memory leak in QtEventFeederTest (LP: #1585503)

514. By Albert Astals Cid on 2016-06-06

Fix leaks in application_manager_test (LP: #1585501)

515. By Daniel d'Andrada on 2016-06-06

Improve Session debug logging

516. By Daniel d'Andrada on 2016-06-06

MirSurfaceListModel: prepending a surface always causes firstChanged() emission

517. By CI Train Bot Account on 2016-06-06

Releasing 0.4.8+16.10.20160606.1-0ubuntu1

518. By Albert Astals Cid on 2016-06-06

Merge system_includes

519. By Albert Astals Cid on 2016-06-06

clazy_fixes

520. By Albert Astals Cid on 2016-06-06

build++

Unity8 CI Bot (unity8-ci-bot) wrote :

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)
lp:~aacid/qtmir/clazy_run updated on 2016-08-08
521. By Albert Astals Cid on 2016-06-23

Merge trunk

522. By Albert Astals Cid on 2016-07-15

Merge

523. By Albert Astals Cid on 2016-08-08

Merge

524. By Albert Astals Cid on 2016-08-08

Merge

525. By Albert Astals Cid on 2016-08-08

wops, remove

526. By Albert Astals Cid on 2016-08-08

spacing

527. By Albert Astals Cid on 2016-08-08

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
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2016-05-18 20:56:14 +0000
3+++ CMakeLists.txt 2016-06-06 19:34:22 +0000
4@@ -13,6 +13,13 @@
5 # Find includes in corresponding build directories
6 set(CMAKE_INCLUDE_CURRENT_DIR ON)
7
8+find_package (ECM 1.7.0 QUIET NO_MODULE)
9+if (ECM_FOUND)
10+ # Provides us with -DECM_ENABLE_SANITIZERS='X'
11+ # Where X can be address, thread, memory, leak, undefined
12+ include("${ECM_MODULE_DIR}/ECMEnableSanitizers.cmake")
13+endif()
14+
15 # add custom cmake modules
16 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
17
18@@ -76,23 +83,21 @@
19 pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
20 pkg_check_modules(QTDBUSTEST libqtdbustest-1 REQUIRED)
21 pkg_check_modules(QTDBUSMOCK libqtdbusmock-1 REQUIRED)
22-pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=17)
23+pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=18)
24
25-include_directories(${APPLICATION_API_INCLUDE_DIRS})
26+include_directories(SYSTEM ${APPLICATION_API_INCLUDE_DIRS})
27
28 add_definitions(-DMIR_REQUIRE_DEPRECATED_EVENT_OPT_IN=1)
29
30 # Use the fast string builder
31 add_definitions(-DQT_USE_QSTRINGBUILDER)
32
33-include_directories( ${APPLICATION_API_INCLUDE_DIRS} )
34-
35 # We expect this to be set via debian/rules for GLES builds
36 if ("${USE_OPENGLES}" STREQUAL 1)
37 message(STATUS "Qt5 determined to be compiled with GLES support")
38 pkg_check_modules(GLESv2 glesv2)
39 add_definitions(-DQT_USING_GLES)
40- include_directories (${GLESv2_INCLUDE_DIRS})
41+ include_directories (SYSTEM ${GLESv2_INCLUDE_DIRS})
42 set (GL_LIBRARIES "${GLESv2_LIBRARIES}")
43 # Because qt/gl and qt/gles are not parallel installable we have a difficulty
44 # building qtmir-desktop on armhf. We would like to link against opengl and bind the
45@@ -103,13 +108,13 @@
46 message(STATUS "Linking against OpenGL ES but binding OpenGL API")
47 pkg_check_modules(GLESv2 glesv2)
48 add_definitions(-DQT_USING_GL)
49- include_directories (${GLESv2_INCLUDE_DIRS})
50+ include_directories (SYSTEM ${GLESv2_INCLUDE_DIRS})
51 set (GL_LIBRARIES "${GLESv2_LIBRARIES}")
52 else()
53 message(STATUS "Qt5 determined to be compiled with OpenGL support")
54 pkg_check_modules(GL gl)
55 add_definitions(-DQT_USING_OPENGL)
56- include_directories (${GL_INCLUDE_DIRS})
57+ include_directories (SYSTEM ${GL_INCLUDE_DIRS})
58 endif()
59
60 # Standard install paths
61
62=== modified file 'debian/changelog'
63--- debian/changelog 2016-05-25 13:54:56 +0000
64+++ debian/changelog 2016-06-06 19:34:22 +0000
65@@ -1,3 +1,28 @@
66+qtmir (0.4.8+16.10.20160606.1-0ubuntu1) yakkety; urgency=medium
67+
68+ [ Albert Astals Cid ]
69+ * Add support for compiler sanitizers via ECM
70+ * Compile with -fsanitize=undefined
71+ * Fix leak in ScreensModelTest (LP: #1585502)
72+ * Fix leak in SessionManager test (LP: #1585498)
73+ * Remove unused m_sessions member
74+ * Add missing breaks
75+ * Initialize m_lastX and m_lastY
76+ * Initialize m_sessionId
77+ * Give the locker a name
78+ * Fix memory leak in QtEventFeederTest (LP: #1585503)
79+ * Fix leaks in application_manager_test (LP: #1585501)
80+
81+ [ Daniel d'Andrada ]
82+ * Improve Session debug logging
83+ * MirSurfaceListModel: prepending a surface always causes
84+ firstChanged() emission
85+
86+ [ Michael Zanetti ]
87+ * Adding ApplicationInfo::surfaceCount property
88+
89+ -- Michał Sawicz <michal.sawicz@canonical.com> Mon, 06 Jun 2016 15:45:57 +0000
90+
91 qtmir (0.4.8+16.10.20160525.2-0ubuntu1) yakkety; urgency=medium
92
93 [ Alan Griffiths ]
94
95=== modified file 'debian/control'
96--- debian/control 2016-05-18 20:56:14 +0000
97+++ debian/control 2016-06-06 19:34:22 +0000
98@@ -22,7 +22,7 @@
99 libubuntu-app-launch2-dev (>= 0.9),
100 libubuntu-application-api-dev (>= 2.1.0),
101 libudev-dev,
102- libunity-api-dev (>= 7.113),
103+ libunity-api-dev (>= 7.114),
104 liburl-dispatcher1-dev,
105 libxkbcommon-dev,
106 libxrender-dev,
107
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:34:22 +0000
111@@ -2,19 +2,16 @@
112 configure_file(${DEMO_CLIENT}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${DEMO_CLIENT}.desktop @ONLY)
113
114 include_directories(
115+ SYSTEM
116 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
117+ ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
118+ ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
119 )
120
121 add_executable(${DEMO_CLIENT}
122 main.cpp
123 )
124
125-include_directories(
126- ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
127- ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
128- ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
129-)
130-
131 target_link_libraries(
132 ${DEMO_CLIENT}
133 Qt5::Core
134
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:34:22 +0000
138@@ -1,19 +1,16 @@
139 set(DEMO_SHELL qtmir-demo-shell)
140
141 include_directories(
142+ SYSTEM
143 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
144+ ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
145+ ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
146 )
147
148 add_executable(${DEMO_SHELL}
149 main.cpp
150 )
151
152-include_directories(
153- ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
154- ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
155- ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
156-)
157-
158 target_link_libraries(
159 ${DEMO_SHELL}
160 Qt5::Core
161
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:34:22 +0000
165@@ -54,6 +54,7 @@
166 break;
167 case QEvent::TouchCancel:
168 message.append("TouchCancel ");
169+ break;
170 default:
171 message.append("TouchUNKNOWN ");
172 }
173@@ -62,7 +63,7 @@
174
175 const QTouchEvent::TouchPoint& touchPoint = ev->touchPoints().at(i);
176 message.append(
177- QString("(id:%1, state:%2, scenePos:(%3,%4), pos:(%5,%6)) ")
178+ QStringLiteral("(id:%1, state:%2, scenePos:(%3,%4), pos:(%5,%6)) ")
179 .arg(touchPoint.id())
180 .arg(touchPointStateToString(touchPoint.state()))
181 .arg(touchPoint.scenePos().x())
182@@ -81,30 +82,30 @@
183
184 switch (attrib) {
185 case mir_surface_attrib_type:
186- str = QString("type=%1").arg(mirSurfaceTypeToStr(value));
187+ str = QStringLiteral("type=%1").arg(mirSurfaceTypeToStr(value));
188 break;
189
190 case mir_surface_attrib_state:
191- str = QString("state=%1").arg(mirSurfaceStateToStr(value));
192+ str = QStringLiteral("state=%1").arg(mirSurfaceStateToStr(value));
193 break;
194
195 case mir_surface_attrib_swapinterval:
196- str = QString("swapinterval=%1").arg(value);
197+ str = QStringLiteral("swapinterval=%1").arg(value);
198 break;
199
200 case mir_surface_attrib_focus:
201- str = QString("focus=%1").arg(mirSurfaceFocusStateToStr(value));
202+ str = QStringLiteral("focus=%1").arg(mirSurfaceFocusStateToStr(value));
203 break;
204
205 case mir_surface_attrib_dpi:
206- str = QString("dpi=%1").arg(value);
207+ str = QStringLiteral("dpi=%1").arg(value);
208 break;
209
210 case mir_surface_attrib_visibility:
211- str = QString("visibility=%1").arg(mirSurfaceVisibilityToStr(value));
212+ str = QStringLiteral("visibility=%1").arg(mirSurfaceVisibilityToStr(value));
213 break;
214 default:
215- str = QString("type'%1'=%2").arg((int)attrib).arg(value);
216+ str = QStringLiteral("type'%1'=%2").arg((int)attrib).arg(value);
217 }
218
219 return str;
220@@ -210,7 +211,7 @@
221
222 QString mirPointerEventToString(MirPointerEvent const* event)
223 {
224- QString string = QString("MirPointerEvent(x=%1,y=%2,relative_x=%3,relative_y=%4)")
225+ QString string = QStringLiteral("MirPointerEvent(x=%1,y=%2,relative_x=%3,relative_y=%4)")
226 .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_x))
227 .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_y))
228 .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_relative_x))
229@@ -223,7 +224,7 @@
230 {
231 const int pointerCount = mir_touch_event_point_count(event);
232
233- QString string("MirTouchEvent(");
234+ QString string(QStringLiteral("MirTouchEvent("));
235
236 for (int i = 0; i < pointerCount; ++i) {
237
238@@ -233,7 +234,7 @@
239
240 MirTouchAction touchAction = mir_touch_event_action(event, i);
241
242- QString touchStr = QString("(id=%1,action=%2,x=%3,y=%4)")
243+ QString touchStr = QStringLiteral("(id=%1,action=%2,x=%3,y=%4)")
244 .arg(mir_touch_event_id(event, i))
245 .arg(mirTouchActionToString(touchAction))
246 .arg(mir_touch_event_axis_value(event, i, mir_touch_axis_x))
247@@ -290,7 +291,7 @@
248
249 xkb_keysym_t keyCode = mir_keyboard_event_key_code(event);
250
251- return QString("MirKeyboardEvent(action=%1,key_code=0x%2)")
252+ return QStringLiteral("MirKeyboardEvent(action=%1,key_code=0x%2)")
253 .arg(mirKeyboardActionToString(keyboardAction))
254 .arg(keyCode, 4, 16, QLatin1Char('0'));
255 }
256
257=== modified file 'src/modules/Unity/Application/CMakeLists.txt'
258--- src/modules/Unity/Application/CMakeLists.txt 2016-04-26 08:56:36 +0000
259+++ src/modules/Unity/Application/CMakeLists.txt 2016-06-06 19:34:22 +0000
260@@ -1,4 +1,10 @@
261 include_directories(
262+ ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
263+ ${CMAKE_SOURCE_DIR}/src/common
264+)
265+
266+include_directories(
267+ SYSTEM
268 ${GLIB_INCLUDE_DIRS}
269 ${GIO_INCLUDE_DIRS}
270 ${GIO_UNIX_INCLUDE_DIRS}
271@@ -7,8 +13,6 @@
272 ${PROCESS_CPP_INCLUDE_DIRS}
273 ${UBUNTU_PLATFORM_API_INCLUDE_DIRS}
274 ${UBUNTU_APP_LAUNCH_INCLUDE_DIRS}
275- ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
276- ${CMAKE_SOURCE_DIR}/src/common
277 ${GSETTINGS_QT_INCLUDE_DIRS}
278
279 ${LTTNG_INCLUDE_DIRS}
280
281=== modified file 'src/modules/Unity/Application/application.cpp'
282--- src/modules/Unity/Application/application.cpp 2016-05-25 13:54:52 +0000
283+++ src/modules/Unity/Application/application.cpp 2016-06-06 19:34:22 +0000
284@@ -55,6 +55,8 @@
285 , m_processState(ProcessUnknown)
286 , m_stopTimer(nullptr)
287 , m_exemptFromLifecycle(false)
288+ , m_proxySurfaceList(new ProxySurfaceListModel(this))
289+ , m_proxyPromptSurfaceList(new ProxySurfaceListModel(this))
290 {
291 DEBUG_MSG << "()";
292
293@@ -66,6 +68,8 @@
294 m_rotatesWindowContents = m_appInfo->rotatesWindowContents();
295
296 setStopTimer(new Timer);
297+
298+ connect(m_proxySurfaceList, &unityapp::MirSurfaceListInterface::countChanged, this, &unityapp::ApplicationInfoInterface::surfaceCountChanged);
299 }
300
301 Application::~Application()
302@@ -170,8 +174,8 @@
303 color.setAlpha(255);
304 } else {
305 color.setRgba(qRgba(0, 0, 0, 0));
306- qCWarning(QTMIR_APPLICATIONS) << QString("Invalid %1: \"%2\"")
307- .arg(colorName).arg(colorString);
308+ qCWarning(QTMIR_APPLICATIONS) << QStringLiteral("Invalid %1: \"%2\"")
309+ .arg(colorName, colorString);
310 }
311 }
312
313@@ -411,8 +415,8 @@
314 bool Application::focused() const
315 {
316 bool someSurfaceHasFocus = false; // to be proven wrong
317- for (int i = 0; i < m_proxySurfaceList.rowCount() && !someSurfaceHasFocus; ++i) {
318- someSurfaceHasFocus |= m_proxySurfaceList.get(i)->focused();
319+ for (int i = 0; i < m_proxySurfaceList->rowCount() && !someSurfaceHasFocus; ++i) {
320+ someSurfaceHasFocus |= m_proxySurfaceList->get(i)->focused();
321 }
322 return someSurfaceHasFocus;
323 }
324@@ -462,7 +466,7 @@
325 m_pid = pid;
326 }
327
328-void Application::setArguments(const QStringList arguments)
329+void Application::setArguments(const QStringList &arguments)
330 {
331 m_arguments = arguments;
332 }
333@@ -475,8 +479,8 @@
334 return;
335
336 if (m_session) {
337- m_proxySurfaceList.setSourceList(nullptr);
338- m_proxyPromptSurfaceList.setSourceList(nullptr);
339+ m_proxySurfaceList->setSourceList(nullptr);
340+ m_proxyPromptSurfaceList->setSourceList(nullptr);
341 m_session->disconnect(this);
342 m_session->surfaceList()->disconnect(this);
343 m_session->setApplication(nullptr);
344@@ -517,8 +521,8 @@
345 if (oldFullscreen != fullscreen())
346 Q_EMIT fullscreenChanged(fullscreen());
347
348- m_proxySurfaceList.setSourceList(m_session->surfaceList());
349- m_proxyPromptSurfaceList.setSourceList(m_session->promptSurfaceList());
350+ m_proxySurfaceList->setSourceList(m_session->surfaceList());
351+ m_proxyPromptSurfaceList->setSourceList(m_session->promptSurfaceList());
352 } else {
353 // this can only happen after the session has stopped
354 Q_ASSERT(m_state == InternalState::Stopped || m_state == InternalState::StoppedResumable
355@@ -734,7 +738,7 @@
356
357 void Application::acquireWakelock() const
358 {
359- if (appId() == "unity8-dash")
360+ if (appId() == QLatin1String("unity8-dash"))
361 return;
362
363 m_sharedWakelock->acquire(this);
364@@ -742,7 +746,7 @@
365
366 void Application::releaseWakelock() const
367 {
368- if (appId() == "unity8-dash")
369+ if (appId() == QLatin1String("unity8-dash"))
370 return;
371
372 m_sharedWakelock->release(this);
373@@ -852,21 +856,21 @@
374 }
375 }
376
377-unityapp::MirSurfaceListInterface* Application::surfaceList()
378+unityapp::MirSurfaceListInterface* Application::surfaceList() const
379 {
380- return &m_proxySurfaceList;
381+ return m_proxySurfaceList;
382 }
383
384-unityapp::MirSurfaceListInterface* Application::promptSurfaceList()
385+unityapp::MirSurfaceListInterface* Application::promptSurfaceList() const
386 {
387- return &m_proxyPromptSurfaceList;
388+ return m_proxyPromptSurfaceList;
389 }
390
391 void Application::requestFocus()
392 {
393- if (m_proxySurfaceList.rowCount() > 0) {
394+ if (m_proxySurfaceList->rowCount() > 0) {
395 DEBUG_MSG << "() - Requesting focus for most recent app surface";
396- m_proxySurfaceList.get(0)->requestFocus();
397+ m_proxySurfaceList->get(0)->requestFocus();
398 } else {
399 DEBUG_MSG << "() - emitting focusRequested()";
400 Q_EMIT focusRequested();
401
402=== modified file 'src/modules/Unity/Application/application.h'
403--- src/modules/Unity/Application/application.h 2016-05-20 08:41:17 +0000
404+++ src/modules/Unity/Application/application.h 2016-06-06 19:34:22 +0000
405@@ -108,8 +108,9 @@
406 void setExemptFromLifecycle(bool) override;
407 QSize initialSurfaceSize() const override;
408 void setInitialSurfaceSize(const QSize &size) override;
409- unity::shell::application::MirSurfaceListInterface* surfaceList() override;
410- unity::shell::application::MirSurfaceListInterface* promptSurfaceList() override;
411+ unity::shell::application::MirSurfaceListInterface* surfaceList() const override;
412+ unity::shell::application::MirSurfaceListInterface* promptSurfaceList() const override;
413+ int surfaceCount() const override { return surfaceList()->count(); }
414
415 ProcessState processState() const { return m_processState; }
416 void setProcessState(ProcessState value);
417@@ -159,7 +160,7 @@
418 void acquireWakelock() const;
419 void releaseWakelock() const;
420 void setPid(pid_t pid);
421- void setArguments(const QStringList arguments);
422+ void setArguments(const QStringList &arguments);
423 void setInternalState(InternalState state);
424 void wipeQMLCache();
425 void suspend();
426@@ -190,8 +191,8 @@
427 QSize m_initialSurfaceSize;
428 bool m_closing{false};
429
430- ProxySurfaceListModel m_proxySurfaceList;
431- ProxySurfaceListModel m_proxyPromptSurfaceList;
432+ ProxySurfaceListModel *m_proxySurfaceList;
433+ ProxySurfaceListModel *m_proxyPromptSurfaceList;
434
435 friend class ApplicationManager;
436 friend class SessionManager;
437
438=== modified file 'src/modules/Unity/Application/application_manager.cpp'
439--- src/modules/Unity/Application/application_manager.cpp 2016-05-06 08:41:15 +0000
440+++ src/modules/Unity/Application/application_manager.cpp 2016-06-06 19:34:22 +0000
441@@ -64,12 +64,12 @@
442
443 // FIXME: To be removed once shell has fully adopted short appIds!!
444 QString toShortAppIdIfPossible(const QString &appId) {
445- QRegExp longAppIdMask("[a-z0-9][a-z0-9+.-]+_[a-zA-Z0-9+.-]+_[0-9][a-zA-Z0-9.+:~-]*");
446+ QRegExp longAppIdMask(QStringLiteral("[a-z0-9][a-z0-9+.-]+_[a-zA-Z0-9+.-]+_[0-9][a-zA-Z0-9.+:~-]*"));
447 if (longAppIdMask.exactMatch(appId)) {
448 qWarning() << "WARNING: long App ID encountered:" << appId;
449 // input string a long AppId, chop the version string off the end
450- QStringList parts = appId.split("_");
451- return QString("%1_%2").arg(parts.first()).arg(parts.at(1));
452+ QStringList parts = appId.split(QStringLiteral("_"));
453+ return QStringLiteral("%1_%2").arg(parts.first(), parts.at(1));
454 }
455 return appId;
456 }
457@@ -183,7 +183,7 @@
458 , m_settings(settings)
459 {
460 qCDebug(QTMIR_APPLICATIONS) << "ApplicationManager::ApplicationManager (this=%p)" << this;
461- setObjectName("qtmir::ApplicationManager");
462+ setObjectName(QStringLiteral("qtmir::ApplicationManager"));
463
464 /*
465 All begin[...]Rows() and end[...]Rows() functions cause signal emissions which can
466@@ -532,7 +532,7 @@
467
468 qCDebug(QTMIR_APPLICATIONS) << "ApplicationManager::authorizeSession - pid=" << pid;
469
470- for (Application *app : m_applications) {
471+ Q_FOREACH (Application *app, m_applications) {
472 if (app->state() == Application::Starting) {
473 tracepoint(qtmir, appIdHasProcessId_start);
474 if (m_taskController->appIdHasProcessId(app->appId(), pid)) {
475@@ -572,7 +572,7 @@
476 }
477
478 // Guess appId from the desktop file hint
479- const QString appId = toShortAppIdIfPossible(desktopFileName.split('/').last().remove(QRegExp(".desktop$")));
480+ const QString appId = toShortAppIdIfPossible(desktopFileName.split('/').last().remove(QRegExp(QStringLiteral(".desktop$"))));
481
482 qCDebug(QTMIR_APPLICATIONS) << "Process supplied desktop_file_hint, loading:" << appId;
483
484@@ -598,7 +598,7 @@
485 Application::Stage stage = Application::MainStage;
486 QString stageParam = info->getParameter("--stage_hint=");
487
488- if (stageParam == "side_stage") {
489+ if (stageParam == QLatin1String("side_stage")) {
490 stage = Application::SideStage;
491 }
492
493@@ -654,7 +654,7 @@
494 return findApplicationWithPid(session->process_id());
495 }
496
497-Application* ApplicationManager::findApplicationWithPid(const pid_t pid)
498+Application* ApplicationManager::findApplicationWithPid(const pid_t pid) const
499 {
500 if (pid <= 0)
501 return nullptr;
502@@ -878,7 +878,7 @@
503
504 Application *ApplicationManager::findApplication(qtmir::MirSurfaceInterface* surface)
505 {
506- for (Application *app : m_applications) {
507+ Q_FOREACH (Application *app, m_applications) {
508 if (app->session() == surface->session()) {
509 return app;
510 }
511
512=== modified file 'src/modules/Unity/Application/application_manager.h'
513--- src/modules/Unity/Application/application_manager.h 2016-05-05 15:02:01 +0000
514+++ src/modules/Unity/Application/application_manager.h 2016-06-06 19:34:22 +0000
515@@ -96,7 +96,7 @@
516 bool isEmpty() const { return rowCount() == 0; }
517
518 const QList<Application*> &list() const { return m_applications; }
519- qtmir::Application* findApplicationWithPid(const pid_t pid);
520+ qtmir::Application* findApplicationWithPid(const pid_t pid) const;
521
522 public Q_SLOTS:
523 void authorizeSession(const pid_t pid, bool &authorized);
524
525=== modified file 'src/modules/Unity/Application/dbuswindowstack.cpp'
526--- src/modules/Unity/Application/dbuswindowstack.cpp 2016-01-20 21:36:39 +0000
527+++ src/modules/Unity/Application/dbuswindowstack.cpp 2016-06-06 19:34:22 +0000
528@@ -33,9 +33,9 @@
529 qDBusRegisterMetaType<WindowInfo>();
530 qDBusRegisterMetaType< QList<WindowInfo> >();
531
532- QDBusConnection::sessionBus().registerService("com.canonical.Unity.WindowStack");
533+ QDBusConnection::sessionBus().registerService(QStringLiteral("com.canonical.Unity.WindowStack"));
534 // TODO ExportScriptableSlots shouldn't be needed but without it i don't get the methods :-/
535- QDBusConnection::sessionBus().registerObject("/com/canonical/Unity/WindowStack", this, QDBusConnection::ExportAllSignals | QDBusConnection::ExportScriptableSlots |QDBusConnection::ExportScriptableInvokables );
536+ QDBusConnection::sessionBus().registerObject(QStringLiteral("/com/canonical/Unity/WindowStack"), this, QDBusConnection::ExportAllSignals | QDBusConnection::ExportScriptableSlots |QDBusConnection::ExportScriptableInvokables );
537 }
538
539 DBusWindowStack::~DBusWindowStack()
540@@ -49,7 +49,7 @@
541 const Application *app = appMgr->findApplicationWithPid(pid);
542 if (app) {
543 res.app_id = app->appId();
544- res.desktop_file = "";
545+ res.desktop_file = QString();
546 }
547 return res;
548 }
549@@ -59,6 +59,7 @@
550 QList<WindowInfo> res;
551 ApplicationManager *appMgr = static_cast<ApplicationManager*>(parent());
552 const QList<Application*> &applications = appMgr->list();
553+ res.reserve(applications.count());
554 Q_FOREACH(Application* app, applications) {
555 WindowInfo wi;
556 wi.window_id = 0;
557
558=== modified file 'src/modules/Unity/Application/mirbuffersgtexture.cpp'
559--- src/modules/Unity/Application/mirbuffersgtexture.cpp 2015-12-10 13:08:43 +0000
560+++ src/modules/Unity/Application/mirbuffersgtexture.cpp 2016-06-06 19:34:22 +0000
561@@ -51,7 +51,7 @@
562 m_height = 0;
563 }
564
565-void MirBufferSGTexture::setBuffer(std::shared_ptr<mir::graphics::Buffer> buffer)
566+void MirBufferSGTexture::setBuffer(const std::shared_ptr<mir::graphics::Buffer>& buffer)
567 {
568 m_mirBuffer = buffer;
569 mg::Size size = buffer->size();
570
571=== modified file 'src/modules/Unity/Application/mirbuffersgtexture.h'
572--- src/modules/Unity/Application/mirbuffersgtexture.h 2015-09-28 09:57:18 +0000
573+++ src/modules/Unity/Application/mirbuffersgtexture.h 2016-06-06 19:34:22 +0000
574@@ -32,7 +32,7 @@
575 MirBufferSGTexture();
576 virtual ~MirBufferSGTexture();
577
578- void setBuffer(std::shared_ptr<mir::graphics::Buffer> buffer);
579+ void setBuffer(const std::shared_ptr<mir::graphics::Buffer>& buffer);
580 void freeBuffer();
581 bool hasBuffer() const;
582
583
584=== modified file 'src/modules/Unity/Application/mirsurface.cpp'
585--- src/modules/Unity/Application/mirsurface.cpp 2016-05-25 13:54:52 +0000
586+++ src/modules/Unity/Application/mirsurface.cpp 2016-06-06 19:34:22 +0000
587@@ -835,7 +835,7 @@
588
589 void MirSurface::applyKeymap()
590 {
591- QStringList stringList = m_keymap.split("+", QString::SkipEmptyParts);
592+ QStringList stringList = m_keymap.split('+', QString::SkipEmptyParts);
593
594 QString layout = stringList[0];
595 QString variant;
596
597=== modified file 'src/modules/Unity/Application/mirsurfaceitem.cpp'
598--- src/modules/Unity/Application/mirsurfaceitem.cpp 2016-05-24 20:13:10 +0000
599+++ src/modules/Unity/Application/mirsurfaceitem.cpp 2016-06-06 19:34:22 +0000
600@@ -61,7 +61,7 @@
601 {
602 Q_OBJECT
603 public:
604- MirTextureProvider(QSharedPointer<QSGTexture> texture) : t(texture) {}
605+ MirTextureProvider(const QSharedPointer<QSGTexture>& texture) : t(texture) {}
606 QSGTexture *texture() const {
607 if (t)
608 t->setFiltering(smooth ? QSGTexture::Linear : QSGTexture::Nearest);
609@@ -74,7 +74,7 @@
610 t.reset();
611 }
612
613- void setTexture(QSharedPointer<QSGTexture> newTexture) {
614+ void setTexture(const QSharedPointer<QSGTexture>& newTexture) {
615 t = newTexture;
616 }
617
618@@ -242,7 +242,7 @@
619 }
620
621 if (m_surface->numBuffersReadyForCompositor() > 0) {
622- QTimer::singleShot(0, this, SLOT(update()));
623+ QTimer::singleShot(0, this, &MirSurfaceItem::update);
624 }
625
626 m_textureProvider->smooth = smooth();
627@@ -388,7 +388,7 @@
628 if (m_surface) {
629 return m_surface->appId();
630 } else {
631- return QString("-");
632+ return QStringLiteral("-");
633 }
634 }
635
636@@ -433,7 +433,7 @@
637 Qt::TouchPointStates touchPointStates)
638 {
639 if (eventType == QEvent::TouchBegin && m_lastTouchEvent && m_lastTouchEvent->type != QEvent::TouchEnd) {
640- qCWarning(QTMIR_SURFACES) << qPrintable(QString("MirSurfaceItem(%1) - Got a QEvent::TouchBegin while "
641+ qCWarning(QTMIR_SURFACES) << qPrintable(QStringLiteral("MirSurfaceItem(%1) - Got a QEvent::TouchBegin while "
642 "there's still an active/unfinished touch sequence.").arg(appId()));
643 // Qt forgot to end the last touch sequence. Let's do it ourselves.
644 endCurrentTouchSequence(timestamp);
645@@ -749,7 +749,7 @@
646 }
647 }
648
649-void MirSurfaceItem::onActualSurfaceSizeChanged(const QSize &size)
650+void MirSurfaceItem::onActualSurfaceSizeChanged(QSize size)
651 {
652 setImplicitSize(size.width(), size.height());
653 }
654
655=== modified file 'src/modules/Unity/Application/mirsurfaceitem.h'
656--- src/modules/Unity/Application/mirsurfaceitem.h 2016-05-24 20:13:10 +0000
657+++ src/modules/Unity/Application/mirsurfaceitem.h 2016-06-06 19:34:22 +0000
658@@ -119,7 +119,7 @@
659 void updateMirSurfaceActiveFocus();
660 void updateMirSurfaceVisibility();
661
662- void onActualSurfaceSizeChanged(const QSize &size);
663+ void onActualSurfaceSizeChanged(QSize size);
664 void onCompositorSwappedBuffers();
665
666 void onWindowChanged(QQuickWindow *window);
667
668=== modified file 'src/modules/Unity/Application/mirsurfacelistmodel.cpp'
669--- src/modules/Unity/Application/mirsurfacelistmodel.cpp 2016-05-17 19:57:52 +0000
670+++ src/modules/Unity/Application/mirsurfacelistmodel.cpp 2016-06-06 19:34:22 +0000
671@@ -20,6 +20,9 @@
672
673 #include <paths.h>
674
675+#include <QDebug>
676+#include <QDebugStateSaver>
677+
678 namespace unityapp = unity::shell::application;
679 using namespace qtmir;
680
681@@ -65,11 +68,11 @@
682 m_surfaceList.prepend(surface);
683 connectSurface(surface);
684 endInsertRows();
685- Q_EMIT countChanged();
686+ Q_EMIT countChanged(m_surfaceList.count());
687 if (count() == 1) {
688 Q_EMIT emptyChanged();
689- Q_EMIT firstChanged();
690 }
691+ Q_EMIT firstChanged();
692 }
693
694 void MirSurfaceListModel::connectSurface(MirSurfaceInterface *surface)
695@@ -85,7 +88,7 @@
696 beginRemoveRows(QModelIndex(), i, i);
697 m_surfaceList.removeAt(i);
698 endRemoveRows();
699- Q_EMIT countChanged();
700+ Q_EMIT countChanged(m_surfaceList.count());
701 if (count() == 0) {
702 Q_EMIT emptyChanged();
703 }
704@@ -147,7 +150,7 @@
705 });
706 }
707 endInsertRows();
708- Q_EMIT countChanged();
709+ Q_EMIT countChanged(m_surfaceList.count());
710 if (wasEmpty) {
711 Q_EMIT emptyChanged();
712 }
713@@ -207,6 +210,11 @@
714 // ProxySurfaceListModel
715 //////////////////////////////////////////////////////////////////////////////
716
717+ProxySurfaceListModel::ProxySurfaceListModel(QObject *parent):
718+ unity::shell::application::MirSurfaceListInterface(parent)
719+{
720+}
721+
722 void ProxySurfaceListModel::setSourceList(MirSurfaceListModel *sourceList)
723 {
724 if (m_sourceList == sourceList)
725@@ -284,3 +292,21 @@
726
727 return m_sourceList->data(index, role);
728 }
729+
730+QDebug operator<<(QDebug dbg, const unityapp::MirSurfaceListInterface &surfaceListConst)
731+{
732+ auto surfaceList = const_cast<unityapp::MirSurfaceListInterface*>(&surfaceListConst);
733+
734+ QDebugStateSaver saver(dbg);
735+ dbg.nospace();
736+ dbg << "MirSurfaceList(";
737+ for (int i = 0; i < surfaceList->count(); ++i) {
738+ if (i > 0) {
739+ dbg << ", ";
740+ }
741+ auto surface = surfaceList->get(i);
742+ dbg << (void*)surface;
743+ }
744+ dbg << ')';
745+ return dbg;
746+}
747
748=== modified file 'src/modules/Unity/Application/mirsurfacelistmodel.h'
749--- src/modules/Unity/Application/mirsurfacelistmodel.h 2016-05-10 21:06:21 +0000
750+++ src/modules/Unity/Application/mirsurfacelistmodel.h 2016-06-06 19:34:22 +0000
751@@ -81,6 +81,7 @@
752 {
753 Q_OBJECT
754 public:
755+ ProxySurfaceListModel(QObject *parent = nullptr);
756 void setSourceList(MirSurfaceListModel *sourceList);
757
758 Q_INVOKABLE unity::shell::application::MirSurfaceInterface *get(int index) override;
759@@ -94,4 +95,6 @@
760
761 } // namespace qtmir
762
763+QDebug operator<<(QDebug, const unity::shell::application::MirSurfaceListInterface &);
764+
765 #endif // QTMIR_MIRSURFACELISTMODEL_H
766
767=== modified file 'src/modules/Unity/Application/mirsurfacemanager.cpp'
768--- src/modules/Unity/Application/mirsurfacemanager.cpp 2016-05-06 08:41:15 +0000
769+++ src/modules/Unity/Application/mirsurfacemanager.cpp 2016-06-06 19:34:22 +0000
770@@ -85,7 +85,7 @@
771 , m_sessionManager(sessionManager)
772 {
773 qCDebug(QTMIR_SURFACES) << "MirSurfaceManager::MirSurfaceManager - this=" << this;
774- setObjectName("qtmir::SurfaceManager");
775+ setObjectName(QStringLiteral("qtmir::SurfaceManager"));
776 }
777
778 MirSurfaceManager::~MirSurfaceManager()
779@@ -98,7 +98,7 @@
780 void MirSurfaceManager::onSessionCreatedSurface(const mir::scene::Session *mirSession,
781 const std::shared_ptr<mir::scene::Surface> &surface,
782 const std::shared_ptr<SurfaceObserver> &observer,
783- qtmir::CreationHints creationHints)
784+ const qtmir::CreationHints &creationHints)
785 {
786 qCDebug(QTMIR_SURFACES) << "MirSurfaceManager::onSessionCreatedSurface - mirSession=" << mirSession
787 << "surface=" << surface.get() << "surface.name=" << surface->name().c_str()
788
789=== modified file 'src/modules/Unity/Application/mirsurfacemanager.h'
790--- src/modules/Unity/Application/mirsurfacemanager.h 2016-05-06 08:28:44 +0000
791+++ src/modules/Unity/Application/mirsurfacemanager.h 2016-06-06 19:34:22 +0000
792@@ -75,7 +75,7 @@
793 void onSessionCreatedSurface(const mir::scene::Session *,
794 const std::shared_ptr<mir::scene::Surface> &,
795 std::shared_ptr<SurfaceObserver> const&,
796- qtmir::CreationHints);
797+ const qtmir::CreationHints &);
798 void onSessionDestroyingSurface(const mir::scene::Session *, const std::shared_ptr<mir::scene::Surface> &);
799
800 protected:
801
802=== modified file 'src/modules/Unity/Application/proc_info.cpp'
803--- src/modules/Unity/Application/proc_info.cpp 2015-10-08 11:20:30 +0000
804+++ src/modules/Unity/Application/proc_info.cpp 2016-06-06 19:34:22 +0000
805@@ -27,7 +27,7 @@
806 }
807
808 std::unique_ptr<ProcInfo::CommandLine> ProcInfo::commandLine(pid_t pid) {
809- QFile cmdline(QString("/proc/%1/cmdline").arg(pid));
810+ QFile cmdline(QStringLiteral("/proc/%1/cmdline").arg(pid));
811 if (!cmdline.open(QIODevice::ReadOnly | QIODevice::Text)) {
812 return nullptr;
813 }
814
815=== modified file 'src/modules/Unity/Application/session.cpp'
816--- src/modules/Unity/Application/session.cpp 2016-05-17 19:18:44 +0000
817+++ src/modules/Unity/Application/session.cpp 2016-06-06 19:34:22 +0000
818@@ -38,6 +38,8 @@
819
820 using unity::shell::application::ApplicationInfoInterface;
821
822+#define DEBUG_MSG qCDebug(QTMIR_SURFACES).nospace() << "Session[" << (void*)this << ",name=" << name() << "]::" << __func__
823+
824 namespace qtmir
825 {
826
827@@ -75,7 +77,7 @@
828 , m_live(true)
829 , m_promptSessionManager(promptSessionManager)
830 {
831- qCDebug(QTMIR_SESSIONS) << "Session::Session() " << this->name();
832+ DEBUG_MSG << "()";
833
834 setSuspendTimer(new Timer);
835
836@@ -84,10 +86,10 @@
837
838 Session::~Session()
839 {
840- qCDebug(QTMIR_SESSIONS) << "Session::~Session() " << name();
841+ DEBUG_MSG << "()";
842 stopPromptSessions();
843
844- QList<SessionInterface*> children(m_children->list());
845+ const QList<SessionInterface*> children(m_children->list());
846 for (SessionInterface* child : children) {
847 delete child;
848 }
849@@ -107,7 +109,7 @@
850 Q_ASSERT(m_state == Session::Suspending);
851
852 if (m_surfaceList.count() == 0) {
853- qCDebug(QTMIR_SESSIONS) << "Application::suspend - no surface to call stopFrameDropper() on!";
854+ DEBUG_MSG << " no surface to call stopFrameDropper() on!";
855 } else {
856 for (int i = 0; i < m_surfaceList.count(); ++i) {
857 auto surface = static_cast<MirSurfaceInterface*>(m_surfaceList.get(i));
858@@ -153,8 +155,7 @@
859 return;
860 }
861
862- qCDebug(QTMIR_SESSIONS) << "Session::setState - session=" << name()
863- << "state=" << sessionStateToString(state);
864+ DEBUG_MSG << "(state=" << sessionStateToString(state) << ")";
865
866 if (m_state == Suspending) {
867 m_suspendTimer->stop();
868@@ -198,7 +199,7 @@
869
870 void Session::registerSurface(MirSurfaceInterface *newSurface)
871 {
872- qCDebug(QTMIR_SESSIONS) << "Session::resgisterSurface - session=" << name() << "surface=" << newSurface;
873+ DEBUG_MSG << "(surface=" << newSurface << ")";
874
875 // Only notify QML of surface creation once it has drawn its first frame.
876 if (newSurface->isFirstFrameDrawn()) {
877@@ -214,7 +215,7 @@
878
879 void Session::prependSurface(MirSurfaceInterface *newSurface)
880 {
881- qCDebug(QTMIR_SESSIONS) << "Session::prependSurface - session=" << name() << "surface=" << newSurface;
882+ DEBUG_MSG << "(surface=" << newSurface << ")";
883
884 connect(newSurface, &MirSurfaceInterface::stateChanged,
885 this, &Session::updateFullscreenProperty);
886@@ -246,7 +247,7 @@
887
888 void Session::removeSurface(MirSurfaceInterface* surface)
889 {
890- qCDebug(QTMIR_SESSIONS) << "Session::removeSurface - session=" << name() << "surface=" << surface;
891+ DEBUG_MSG << "(surface=" << surface << ")";
892
893 surface->disconnect(this);
894
895@@ -277,8 +278,8 @@
896
897 void Session::setFullscreen(bool fullscreen)
898 {
899- qCDebug(QTMIR_SESSIONS) << "Session::setFullscreen - session=" << this << "fullscreen=" << fullscreen;
900 if (m_fullscreen != fullscreen) {
901+ DEBUG_MSG << "(" << fullscreen << ")";
902 m_fullscreen = fullscreen;
903 Q_EMIT fullscreenChanged(m_fullscreen);
904 }
905@@ -286,7 +287,7 @@
906
907 void Session::suspend()
908 {
909- qCDebug(QTMIR_SESSIONS) << "Session::suspend - session=" << this << "state=" << sessionStateToString(m_state);
910+ DEBUG_MSG << " state=" << sessionStateToString(m_state);
911 if (m_state == Running) {
912 session()->set_lifecycle_state(mir_lifecycle_state_will_suspend);
913 m_suspendTimer->start();
914@@ -305,7 +306,7 @@
915
916 void Session::resume()
917 {
918- qCDebug(QTMIR_SESSIONS) << "Session::resume - session=" << this << "state=" << sessionStateToString(m_state);
919+ DEBUG_MSG << " state=" << sessionStateToString(m_state);
920
921 if (m_state == Suspending || m_state == Suspended) {
922 doResume();
923@@ -336,7 +337,7 @@
924
925 void Session::close()
926 {
927- qCDebug(QTMIR_SESSIONS) << "Session::close - " << name();
928+ DEBUG_MSG << "()";
929
930 if (m_state == Stopped) return;
931
932@@ -348,7 +349,7 @@
933
934 void Session::stop()
935 {
936- qCDebug(QTMIR_SESSIONS) << "Session::stop - " << name();
937+ DEBUG_MSG << "()";
938
939 if (m_state != Stopped) {
940
941@@ -372,7 +373,7 @@
942 void Session::setLive(const bool live)
943 {
944 if (m_live != live) {
945- qCDebug(QTMIR_SESSIONS) << "Session::setLive - " << name() << "live=" << live;
946+ DEBUG_MSG << "(" << live << ")";
947
948 m_live = live;
949 Q_EMIT liveChanged(m_live);
950@@ -396,7 +397,7 @@
951
952 void Session::insertChildSession(uint index, SessionInterface* session)
953 {
954- qCDebug(QTMIR_SESSIONS) << "Session::insertChildSession - " << session->name() << " to " << name() << " @ " << index;
955+ DEBUG_MSG << "(index=" << index << ", Session[" << (void*)session << ",name=" << session->name() << "])";
956 Q_ASSERT(!m_children->contains(session));
957
958 m_children->insert(index, session);
959@@ -424,7 +425,7 @@
960
961 void Session::removeChildSession(SessionInterface* session)
962 {
963- qCDebug(QTMIR_SESSIONS) << "Session::removeChildSession - " << session->name() << " from " << name();
964+ DEBUG_MSG << "(Session[" << (void*)session << ",name=" << session->name() << "])";
965
966 disconnect(session, 0, this, 0);
967
968@@ -437,9 +438,9 @@
969 deleteIfZombieAndEmpty();
970 }
971
972-void Session::foreachChildSession(std::function<void(SessionInterface* session)> f) const
973+void Session::foreachChildSession(const std::function<void(SessionInterface* session)>& f) const
974 {
975- QList<SessionInterface*> children(m_children->list());
976+ const QList<SessionInterface*> children(m_children->list());
977 for (SessionInterface* child : children) {
978 f(child);
979 }
980@@ -452,32 +453,30 @@
981
982 void Session::appendPromptSession(const std::shared_ptr<ms::PromptSession>& promptSession)
983 {
984- qCDebug(QTMIR_SESSIONS) << "Session::appendPromptSession session=" << name()
985- << "promptSession=" << (promptSession ? promptSession.get() : nullptr);
986+ DEBUG_MSG << "(promptSession=" << (promptSession ? promptSession.get() : nullptr) << ")";
987
988 m_promptSessions.append(promptSession);
989 }
990
991 void Session::removePromptSession(const std::shared_ptr<ms::PromptSession>& promptSession)
992 {
993- qCDebug(QTMIR_SESSIONS) << "Session::removePromptSession session=" << name()
994- << "promptSession=" << (promptSession ? promptSession.get() : nullptr);
995+ DEBUG_MSG << "(promptSession=" << (promptSession ? promptSession.get() : nullptr) << ")";
996
997 m_promptSessions.removeAll(promptSession);
998 }
999
1000 void Session::stopPromptSessions()
1001 {
1002- QList<SessionInterface*> children(m_children->list());
1003+ const QList<SessionInterface*> children(m_children->list());
1004 for (SessionInterface* child : children) {
1005 static_cast<Session*>(child)->stopPromptSessions();
1006 }
1007
1008- QList<std::shared_ptr<ms::PromptSession>> copy(m_promptSessions);
1009- QListIterator<std::shared_ptr<ms::PromptSession>> it(copy);
1010+ QVector<std::shared_ptr<ms::PromptSession>> copy(m_promptSessions);
1011+ QVectorIterator<std::shared_ptr<ms::PromptSession>> it(copy);
1012 for ( it.toBack(); it.hasPrevious(); ) {
1013 std::shared_ptr<ms::PromptSession> promptSession = it.previous();
1014- qCDebug(QTMIR_SESSIONS) << "Session::stopPromptSessions - promptSession=" << promptSession.get();
1015+ DEBUG_MSG << " - promptSession=" << promptSession.get();
1016
1017 m_promptSessionManager->stop_prompt_session(promptSession);
1018 }
1019@@ -490,9 +489,9 @@
1020 return nullptr;
1021 }
1022
1023-void Session::foreachPromptSession(std::function<void(const std::shared_ptr<ms::PromptSession>&)> f) const
1024+void Session::foreachPromptSession(const std::function<void(const std::shared_ptr<ms::PromptSession>&)>& f) const
1025 {
1026- for (std::shared_ptr<ms::PromptSession> promptSession : m_promptSessions) {
1027+ Q_FOREACH (std::shared_ptr<ms::PromptSession> promptSession, m_promptSessions) {
1028 f(promptSession);
1029 }
1030 }
1031@@ -500,7 +499,7 @@
1032 void Session::deleteIfZombieAndEmpty()
1033 {
1034 if (!m_live && m_children->rowCount() == 0 && m_surfaceList.isEmpty()) {
1035- qCDebug(QTMIR_SESSIONS).nospace() << "Session::deleteIfZombieAndEmpty[" << name() << "] - deleteLater()";
1036+ DEBUG_MSG << " - deleteLater()";
1037 deleteLater();
1038 }
1039 }
1040
1041=== modified file 'src/modules/Unity/Application/session.h'
1042--- src/modules/Unity/Application/session.h 2016-05-17 19:18:44 +0000
1043+++ src/modules/Unity/Application/session.h 2016-06-06 19:34:22 +0000
1044@@ -70,12 +70,12 @@
1045 void addChildSession(SessionInterface* session) override;
1046 void insertChildSession(uint index, SessionInterface* session) override;
1047 void removeChildSession(SessionInterface* session) override;
1048- void foreachChildSession(std::function<void(SessionInterface* session)> f) const override;
1049+ void foreachChildSession(const std::function<void(SessionInterface* session)> &f) const override;
1050
1051 std::shared_ptr<mir::scene::Session> session() const override;
1052
1053 std::shared_ptr<mir::scene::PromptSession> activePromptSession() const override;
1054- void foreachPromptSession(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> f) const override;
1055+ void foreachPromptSession(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> &f) const override;
1056
1057 SessionModel* childSessions() const override;
1058
1059@@ -115,7 +115,7 @@
1060 State m_state;
1061 bool m_live;
1062 AbstractTimer* m_suspendTimer{nullptr};
1063- QList<std::shared_ptr<mir::scene::PromptSession>> m_promptSessions;
1064+ QVector<std::shared_ptr<mir::scene::PromptSession>> m_promptSessions;
1065 std::shared_ptr<mir::scene::PromptSessionManager> const m_promptSessionManager;
1066 QList<MirSurfaceInterface*> m_closingSurfaces;
1067 bool m_hadSurface{false};
1068
1069=== modified file 'src/modules/Unity/Application/session_interface.h'
1070--- src/modules/Unity/Application/session_interface.h 2016-05-17 19:18:44 +0000
1071+++ src/modules/Unity/Application/session_interface.h 2016-06-06 19:34:22 +0000
1072@@ -97,10 +97,10 @@
1073 virtual void addChildSession(SessionInterface* session) = 0;
1074 virtual void insertChildSession(uint index, SessionInterface* session) = 0;
1075 virtual void removeChildSession(SessionInterface* session) = 0;
1076- virtual void foreachChildSession(std::function<void(SessionInterface* session)> f) const = 0;
1077+ virtual void foreachChildSession(const std::function<void(SessionInterface* session)>& f) const = 0;
1078
1079 virtual std::shared_ptr<mir::scene::PromptSession> activePromptSession() const = 0;
1080- virtual void foreachPromptSession(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> f) const = 0;
1081+ virtual void foreachPromptSession(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)>& f) const = 0;
1082
1083 virtual void setFullscreen(bool fullscreen) = 0;
1084 virtual void setLive(const bool) = 0;
1085
1086=== modified file 'src/modules/Unity/Application/sessionmanager.cpp'
1087--- src/modules/Unity/Application/sessionmanager.cpp 2016-05-06 08:41:15 +0000
1088+++ src/modules/Unity/Application/sessionmanager.cpp 2016-06-06 19:34:22 +0000
1089@@ -92,7 +92,7 @@
1090 , m_applicationManager(applicationManager)
1091 {
1092 qCDebug(QTMIR_SESSIONS) << "SessionManager::SessionManager - this=" << this;
1093- setObjectName("qtmir::SessionManager");
1094+ setObjectName(QStringLiteral("qtmir::SessionManager"));
1095 }
1096
1097 SessionManager::~SessionManager()
1098
1099=== modified file 'src/modules/Unity/Application/sessionmanager.h'
1100--- src/modules/Unity/Application/sessionmanager.h 2015-08-11 12:08:32 +0000
1101+++ src/modules/Unity/Application/sessionmanager.h 2016-06-06 19:34:22 +0000
1102@@ -81,7 +81,6 @@
1103 ApplicationManager* m_applicationManager;
1104 static SessionManager *the_session_manager;
1105
1106- QList<Session*> m_sessions;
1107 QHash<const mir::scene::PromptSession *, SessionInterface *> m_mirPromptToSessionHash;
1108 };
1109
1110
1111=== modified file 'src/modules/Unity/Application/sharedwakelock.cpp'
1112--- src/modules/Unity/Application/sharedwakelock.cpp 2015-03-05 23:40:52 +0000
1113+++ src/modules/Unity/Application/sharedwakelock.cpp 2016-06-06 19:34:22 +0000
1114@@ -37,7 +37,7 @@
1115 Q_OBJECT
1116 public:
1117 Wakelock(const QDBusConnection &connection) noexcept
1118- : AbstractDBusServiceMonitor("com.canonical.powerd", "/com/canonical/powerd", "com.canonical.powerd", connection)
1119+ : AbstractDBusServiceMonitor(QStringLiteral("com.canonical.powerd"), QStringLiteral("/com/canonical/powerd"), QStringLiteral("com.canonical.powerd"), connection)
1120 , m_wakelockEnabled(false)
1121 {
1122 // (re-)acquire wake lock when powerd (re-)appears on the bus
1123@@ -90,7 +90,7 @@
1124 }
1125
1126 if (!m_cookie.isEmpty()) {
1127- dbusInterface()->asyncCall("clearSysState", QString(m_cookie));
1128+ dbusInterface()->asyncCall(QStringLiteral("clearSysState"), QString(m_cookie));
1129 qCDebug(QTMIR_SESSIONS) << "Wakelock released" << m_cookie;
1130 m_cookie.clear();
1131 }
1132@@ -132,7 +132,7 @@
1133
1134 if (!m_wakelockEnabled || !m_cookie.isEmpty()) {
1135 // notified wakelock was created, but we either don't want it, or already have one - release it immediately
1136- dbusInterface()->asyncCall("clearSysState", QString(cookie));
1137+ dbusInterface()->asyncCall(QStringLiteral("clearSysState"), QString(cookie));
1138 return;
1139 }
1140
1141@@ -155,7 +155,7 @@
1142 return;
1143 }
1144
1145- QDBusPendingCall pcall = dbusInterface()->asyncCall("requestSysState", "active", POWERD_SYS_STATE_ACTIVE);
1146+ QDBusPendingCall pcall = dbusInterface()->asyncCall(QStringLiteral("requestSysState"), "active", POWERD_SYS_STATE_ACTIVE);
1147
1148 QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall, this);
1149 QObject::connect(watcher, &QDBusPendingCallWatcher::finished,
1150
1151=== modified file 'src/modules/Unity/Application/ubuntukeyboardinfo.cpp'
1152--- src/modules/Unity/Application/ubuntukeyboardinfo.cpp 2015-08-11 12:08:32 +0000
1153+++ src/modules/Unity/Application/ubuntukeyboardinfo.cpp 2016-06-06 19:34:22 +0000
1154@@ -36,6 +36,8 @@
1155 UbuntuKeyboardInfo::UbuntuKeyboardInfo(QObject *parent)
1156 : QObject(parent),
1157 m_consecutiveAttempts(0),
1158+ m_lastX(0),
1159+ m_lastY(0),
1160 m_lastWidth(0),
1161 m_lastHeight(0)
1162 {
1163@@ -164,7 +166,7 @@
1164 if (xdgRuntimeDir) {
1165 m_socketFilePath = QDir(xdgRuntimeDir).filePath(gServerName);
1166 } else {
1167- m_socketFilePath = QDir("/tmp").filePath(gServerName);
1168+ m_socketFilePath = QDir(QStringLiteral("/tmp")).filePath(gServerName);
1169 }
1170 }
1171
1172
1173=== modified file 'src/modules/Unity/Application/upstart/taskcontroller.cpp'
1174--- src/modules/Unity/Application/upstart/taskcontroller.cpp 2016-05-04 16:35:50 +0000
1175+++ src/modules/Unity/Application/upstart/taskcontroller.cpp 2016-06-06 19:34:22 +0000
1176@@ -59,7 +59,7 @@
1177 gchar *package, *application;
1178 if (ubuntu_app_launch_app_id_parse(appId.toLatin1().constData(), &package, &application, nullptr)) {
1179 // is long appId, so assemble its short appId
1180- QString shortAppId = QString("%1_%2").arg(package).arg(application);
1181+ QString shortAppId = QStringLiteral("%1_%2").arg(package, application);
1182 g_free(package);
1183 g_free(application);
1184 return shortAppId;
1185@@ -127,8 +127,8 @@
1186 TaskController::Error error;
1187 switch(failureType)
1188 {
1189- case UBUNTU_APP_LAUNCH_APP_FAILED_CRASH: error = TaskController::Error::APPLICATION_CRASHED;
1190- case UBUNTU_APP_LAUNCH_APP_FAILED_START_FAILURE: error = TaskController::Error::APPLICATION_FAILED_TO_START;
1191+ case UBUNTU_APP_LAUNCH_APP_FAILED_CRASH: error = TaskController::Error::APPLICATION_CRASHED; break;
1192+ case UBUNTU_APP_LAUNCH_APP_FAILED_START_FAILURE: error = TaskController::Error::APPLICATION_FAILED_TO_START; break;
1193 }
1194
1195 auto thiz = static_cast<TaskController*>(userData);
1196
1197=== modified file 'src/modules/Unity/Screens/CMakeLists.txt'
1198--- src/modules/Unity/Screens/CMakeLists.txt 2016-01-28 22:33:35 +0000
1199+++ src/modules/Unity/Screens/CMakeLists.txt 2016-06-06 19:34:22 +0000
1200@@ -1,5 +1,9 @@
1201 include_directories(
1202 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1203+)
1204+
1205+include_directories(
1206+ SYSTEM
1207 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
1208 ${Qt5Quick_INCLUDE_DIRS}
1209 ${MIRSERVER_INCLUDE_DIRS}
1210
1211=== modified file 'src/modules/Unity/Screens/qquickscreenwindow.cpp'
1212--- src/modules/Unity/Screens/qquickscreenwindow.cpp 2016-04-22 18:01:05 +0000
1213+++ src/modules/Unity/Screens/qquickscreenwindow.cpp 2016-06-06 19:34:22 +0000
1214@@ -50,7 +50,7 @@
1215 , m_scale(-1.0) // start with invalid initial state, fetch correct value on first invokation
1216 , m_formFactor(Screens::FormFactorUnknown)
1217 {
1218- if (qGuiApp->platformName() == "mirserver") {
1219+ if (qGuiApp->platformName() == QLatin1String("mirserver")) {
1220 connect(qGuiApp->platformNativeInterface(), &QPlatformNativeInterface::windowPropertyChanged,
1221 this, &QQuickScreenWindow::nativePropertyChanged);
1222 //m_scale = getScaleNativeProperty(); DO NOT CALL HERE - see note above
1223
1224=== modified file 'src/platforms/mirserver/CMakeLists.txt'
1225--- src/platforms/mirserver/CMakeLists.txt 2016-05-25 13:54:30 +0000
1226+++ src/platforms/mirserver/CMakeLists.txt 2016-06-06 19:34:22 +0000
1227@@ -26,6 +26,10 @@
1228 include_directories(
1229 ${CMAKE_SOURCE_DIR}/src/common
1230
1231+)
1232+
1233+include_directories(
1234+ SYSTEM
1235 ${MIRCOMMON_INCLUDE_DIRS}
1236 ${MIRSERVER_INCLUDE_DIRS}
1237 ${MIRRENDERERGLDEV_INCLUDE_DIRS}
1238@@ -82,6 +86,7 @@
1239 tracepoints.c
1240 # We need to run moc on these headers
1241 ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/Mir.h
1242+ ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/MirMousePointerInterface.h
1243 )
1244
1245 add_library(qpa-mirserver SHARED
1246
1247=== modified file 'src/platforms/mirserver/clipboard.cpp'
1248--- src/platforms/mirserver/clipboard.cpp 2016-05-03 19:45:51 +0000
1249+++ src/platforms/mirserver/clipboard.cpp 2016-06-06 19:34:22 +0000
1250@@ -65,12 +65,13 @@
1251 int offset = headerSize;
1252 header[0] = formatCount;
1253 for (int i = 0; i < formatCount; i++) {
1254+ const QByteArray data = mimeData->data(formats[i]);
1255 const int formatOffset = offset;
1256 const int formatSize = formats[i].size();
1257 const int dataOffset = offset + formatSize;
1258- const int dataSize = mimeData->data(formats[i]).size();
1259+ const int dataSize = data.size();
1260 memcpy(&buffer[formatOffset], formats[i].toLatin1().data(), formatSize);
1261- memcpy(&buffer[dataOffset], mimeData->data(formats[i]).data(), dataSize);
1262+ memcpy(&buffer[dataOffset], data.data(), dataSize);
1263 header[i*4+1] = formatOffset;
1264 header[i*4+2] = formatSize;
1265 header[i*4+3] = dataOffset;
1266
1267=== modified file 'src/platforms/mirserver/creationhints.cpp'
1268--- src/platforms/mirserver/creationhints.cpp 2016-03-18 12:15:54 +0000
1269+++ src/platforms/mirserver/creationhints.cpp 2016-06-06 19:34:22 +0000
1270@@ -56,7 +56,7 @@
1271
1272 QString CreationHints::toString() const
1273 {
1274- return QString("CreationHints(minW=%1,minH=%2,maxW=%3,maxH=%4,wIncr=%5,hInc=%6,shellChrome=%7)")
1275+ return QStringLiteral("CreationHints(minW=%1,minH=%2,maxW=%3,maxH=%4,wIncr=%5,hInc=%6,shellChrome=%7)")
1276 .arg(minWidth)
1277 .arg(minHeight)
1278 .arg(maxWidth)
1279
1280=== modified file 'src/platforms/mirserver/creationhints.h'
1281--- src/platforms/mirserver/creationhints.h 2016-03-10 11:55:28 +0000
1282+++ src/platforms/mirserver/creationhints.h 2016-06-06 19:34:22 +0000
1283@@ -24,7 +24,7 @@
1284
1285 namespace mir {
1286 namespace scene {
1287- class SurfaceCreationParameters;
1288+ struct SurfaceCreationParameters;
1289 }
1290 }
1291
1292
1293=== modified file 'src/platforms/mirserver/cursor.cpp'
1294--- src/platforms/mirserver/cursor.cpp 2015-11-25 15:38:50 +0000
1295+++ src/platforms/mirserver/cursor.cpp 2016-06-06 19:34:22 +0000
1296@@ -27,28 +27,28 @@
1297
1298 Cursor::Cursor()
1299 {
1300- m_shapeToCursorName[Qt::ArrowCursor] = "left_ptr";
1301- m_shapeToCursorName[Qt::UpArrowCursor] = "up_arrow";
1302- m_shapeToCursorName[Qt::CrossCursor] = "cross";
1303- m_shapeToCursorName[Qt::WaitCursor] = "watch";
1304- m_shapeToCursorName[Qt::IBeamCursor] = "xterm";
1305- m_shapeToCursorName[Qt::SizeVerCursor] = "size_ver";
1306- m_shapeToCursorName[Qt::SizeHorCursor] = "size_hor";
1307- m_shapeToCursorName[Qt::SizeBDiagCursor] = "size_bdiag";
1308- m_shapeToCursorName[Qt::SizeFDiagCursor] = "size_fdiag";
1309- m_shapeToCursorName[Qt::SizeAllCursor] = "size_all";
1310- m_shapeToCursorName[Qt::BlankCursor] = "blank";
1311- m_shapeToCursorName[Qt::SplitVCursor] = "split_v";
1312- m_shapeToCursorName[Qt::SplitHCursor] = "split_h";
1313- m_shapeToCursorName[Qt::PointingHandCursor] = "hand";
1314- m_shapeToCursorName[Qt::ForbiddenCursor] = "forbidden";
1315- m_shapeToCursorName[Qt::WhatsThisCursor] = "whats_this";
1316- m_shapeToCursorName[Qt::BusyCursor] = "left_ptr_watch";
1317- m_shapeToCursorName[Qt::OpenHandCursor] = "openhand";
1318- m_shapeToCursorName[Qt::ClosedHandCursor] = "closedhand";
1319- m_shapeToCursorName[Qt::DragCopyCursor] = "dnd-copy";
1320- m_shapeToCursorName[Qt::DragMoveCursor] = "dnd-move";
1321- m_shapeToCursorName[Qt::DragLinkCursor] = "dnd-link";
1322+ m_shapeToCursorName[Qt::ArrowCursor] = QStringLiteral("left_ptr");
1323+ m_shapeToCursorName[Qt::UpArrowCursor] = QStringLiteral("up_arrow");
1324+ m_shapeToCursorName[Qt::CrossCursor] = QStringLiteral("cross");
1325+ m_shapeToCursorName[Qt::WaitCursor] = QStringLiteral("watch");
1326+ m_shapeToCursorName[Qt::IBeamCursor] = QStringLiteral("xterm");
1327+ m_shapeToCursorName[Qt::SizeVerCursor] = QStringLiteral("size_ver");
1328+ m_shapeToCursorName[Qt::SizeHorCursor] = QStringLiteral("size_hor");
1329+ m_shapeToCursorName[Qt::SizeBDiagCursor] = QStringLiteral("size_bdiag");
1330+ m_shapeToCursorName[Qt::SizeFDiagCursor] = QStringLiteral("size_fdiag");
1331+ m_shapeToCursorName[Qt::SizeAllCursor] = QStringLiteral("size_all");
1332+ m_shapeToCursorName[Qt::BlankCursor] = QStringLiteral("blank");
1333+ m_shapeToCursorName[Qt::SplitVCursor] = QStringLiteral("split_v");
1334+ m_shapeToCursorName[Qt::SplitHCursor] = QStringLiteral("split_h");
1335+ m_shapeToCursorName[Qt::PointingHandCursor] = QStringLiteral("hand");
1336+ m_shapeToCursorName[Qt::ForbiddenCursor] = QStringLiteral("forbidden");
1337+ m_shapeToCursorName[Qt::WhatsThisCursor] = QStringLiteral("whats_this");
1338+ m_shapeToCursorName[Qt::BusyCursor] = QStringLiteral("left_ptr_watch");
1339+ m_shapeToCursorName[Qt::OpenHandCursor] = QStringLiteral("openhand");
1340+ m_shapeToCursorName[Qt::ClosedHandCursor] = QStringLiteral("closedhand");
1341+ m_shapeToCursorName[Qt::DragCopyCursor] = QStringLiteral("dnd-copy");
1342+ m_shapeToCursorName[Qt::DragMoveCursor] = QStringLiteral("dnd-move");
1343+ m_shapeToCursorName[Qt::DragLinkCursor] = QStringLiteral("dnd-link");
1344
1345 connect(Mir::instance(), &Mir::cursorNameChanged, this, &Cursor::setMirCursorName);
1346 }
1347@@ -61,10 +61,10 @@
1348
1349 if (windowCursor) {
1350 if (windowCursor->pixmap().isNull()) {
1351- m_qtCursorName = m_shapeToCursorName.value(windowCursor->shape(), QLatin1String("left_ptr"));
1352+ m_qtCursorName = m_shapeToCursorName.value(windowCursor->shape(), QStringLiteral("left_ptr"));
1353 m_mousePointer->setCustomCursor(QCursor());
1354 } else {
1355- m_qtCursorName = QLatin1String("custom");
1356+ m_qtCursorName = QStringLiteral("custom");
1357 m_mousePointer->setCustomCursor(*windowCursor);
1358 }
1359 } else {
1360@@ -170,7 +170,7 @@
1361
1362 if (m_mirCursorName.isEmpty()) {
1363 if (m_qtCursorName.isEmpty()) {
1364- m_mousePointer->setCursorName("left_ptr");
1365+ m_mousePointer->setCursorName(QStringLiteral("left_ptr"));
1366 } else {
1367 m_mousePointer->setCursorName(m_qtCursorName);
1368 }
1369
1370=== modified file 'src/platforms/mirserver/cursor.h'
1371--- src/platforms/mirserver/cursor.h 2015-11-19 14:17:54 +0000
1372+++ src/platforms/mirserver/cursor.h 2016-06-06 19:34:22 +0000
1373@@ -28,6 +28,7 @@
1374
1375 class Cursor : public MirPlatformCursor
1376 {
1377+ Q_OBJECT
1378 public:
1379 Cursor();
1380
1381
1382=== modified file 'src/platforms/mirserver/mircursorimages.cpp'
1383--- src/platforms/mirserver/mircursorimages.cpp 2015-11-10 11:07:23 +0000
1384+++ src/platforms/mirserver/mircursorimages.cpp 2016-06-06 19:34:22 +0000
1385@@ -20,7 +20,7 @@
1386 using namespace qtmir;
1387
1388 std::shared_ptr<mir::graphics::CursorImage> MirCursorImages::image(const std::string &cursor_name,
1389- const mir::geometry::Size&)
1390+ const mir::geometry::Size &)
1391 {
1392 // We are not responsible for loading cursors. This is left for shell to do as it's drawing its own QML cursor.
1393 // So here we work around Mir API by storing just the cursor name in the CursorImage.
1394
1395=== modified file 'src/platforms/mirserver/mirwindowmanager.cpp'
1396--- src/platforms/mirserver/mirwindowmanager.cpp 2016-04-28 12:48:48 +0000
1397+++ src/platforms/mirserver/mirwindowmanager.cpp 2016-06-06 19:34:22 +0000
1398@@ -196,7 +196,7 @@
1399 const std::shared_ptr<mir::scene::Surface>& surface,
1400 const mir::shell::SurfaceSpecification& modifications)
1401 {
1402- QMutexLocker(&SurfaceObserver::mutex);
1403+ QMutexLocker locker(&SurfaceObserver::mutex);
1404 SurfaceObserver *observer = SurfaceObserver::observerForSurface(surface.get());
1405 if (observer) {
1406 observer->notifySurfaceModifications(modifications);
1407
1408=== modified file 'src/platforms/mirserver/nativeinterface.cpp'
1409--- src/platforms/mirserver/nativeinterface.cpp 2016-05-05 14:17:14 +0000
1410+++ src/platforms/mirserver/nativeinterface.cpp 2016-06-06 19:34:22 +0000
1411@@ -56,8 +56,8 @@
1412 auto w = static_cast<ScreenWindow*>(window);
1413 auto s = static_cast<Screen*>(w->screen());
1414 if (s) {
1415- propertyMap.insert("scale", s->scale());
1416- propertyMap.insert("formFactor", s->formFactor());
1417+ propertyMap.insert(QStringLiteral("scale"), s->scale());
1418+ propertyMap.insert(QStringLiteral("formFactor"), s->formFactor());
1419 }
1420 return propertyMap;
1421 }
1422
1423=== modified file 'src/platforms/mirserver/nativeinterface.h'
1424--- src/platforms/mirserver/nativeinterface.h 2016-05-05 14:17:14 +0000
1425+++ src/platforms/mirserver/nativeinterface.h 2016-06-06 19:34:22 +0000
1426@@ -27,10 +27,11 @@
1427
1428 class NativeInterface : public QPlatformNativeInterface
1429 {
1430+ Q_OBJECT
1431 public:
1432 NativeInterface(QMirServer *);
1433
1434- virtual void *nativeResourceForIntegration(const QByteArray &resource);
1435+ void *nativeResourceForIntegration(const QByteArray &resource) override;
1436
1437 QVariantMap windowProperties(QPlatformWindow *window) const override;
1438 QVariant windowProperty(QPlatformWindow *window, const QString &name) const override;
1439
1440=== modified file 'src/platforms/mirserver/plugin.cpp'
1441--- src/platforms/mirserver/plugin.cpp 2015-10-19 21:17:18 +0000
1442+++ src/platforms/mirserver/plugin.cpp 2016-06-06 19:34:22 +0000
1443@@ -20,7 +20,7 @@
1444 QPlatformIntegration *MirServerIntegrationPlugin::create(const QString &system, const QStringList &/*paramList*/,
1445 int &argc, char **argv)
1446 {
1447- if (system.toLower() == "mirserver")
1448+ if (system.toLower() == QLatin1String("mirserver"))
1449 return new MirServerIntegration(argc, argv);
1450 return 0;
1451 }
1452
1453=== modified file 'src/platforms/mirserver/qteventfeeder.cpp'
1454--- src/platforms/mirserver/qteventfeeder.cpp 2016-05-06 08:41:15 +0000
1455+++ src/platforms/mirserver/qteventfeeder.cpp 2016-06-06 19:34:22 +0000
1456@@ -852,7 +852,7 @@
1457 result.append(",");
1458 }
1459 const struct QWindowSystemInterface::TouchPoint &point = points.at(i);
1460- result.append(QString("(id=%1,state=%2,normalPosition=(%3,%4))")
1461+ result.append(QStringLiteral("(id=%1,state=%2,normalPosition=(%3,%4))")
1462 .arg(point.id)
1463 .arg(touchPointStateToString(point.state))
1464 .arg(point.normalPosition.x())
1465
1466=== modified file 'src/platforms/mirserver/screen.cpp'
1467--- src/platforms/mirserver/screen.cpp 2016-05-06 08:41:15 +0000
1468+++ src/platforms/mirserver/screen.cpp 2016-06-06 19:34:22 +0000
1469@@ -169,15 +169,15 @@
1470
1471 if (!skipDBusRegistration) {
1472 // FIXME This is a unity8 specific dbus call and shouldn't be in qtmir
1473- m_unityScreen = new QDBusInterface("com.canonical.Unity.Screen",
1474- "/com/canonical/Unity/Screen",
1475- "com.canonical.Unity.Screen",
1476+ m_unityScreen = new QDBusInterface(QStringLiteral("com.canonical.Unity.Screen"),
1477+ QStringLiteral("/com/canonical/Unity/Screen"),
1478+ QStringLiteral("com.canonical.Unity.Screen"),
1479 QDBusConnection::systemBus(), this);
1480
1481- m_unityScreen->connection().connect("com.canonical.Unity.Screen",
1482- "/com/canonical/Unity/Screen",
1483- "com.canonical.Unity.Screen",
1484- "DisplayPowerStateChange",
1485+ m_unityScreen->connection().connect(QStringLiteral("com.canonical.Unity.Screen"),
1486+ QStringLiteral("/com/canonical/Unity/Screen"),
1487+ QStringLiteral("com.canonical.Unity.Screen"),
1488+ QStringLiteral("DisplayPowerStateChange"),
1489 this,
1490 SLOT(onDisplayPowerStateChanged(int, int)));
1491 }
1492
1493=== modified file 'src/platforms/mirserver/screenscontroller.cpp'
1494--- src/platforms/mirserver/screenscontroller.cpp 2016-01-29 16:49:06 +0000
1495+++ src/platforms/mirserver/screenscontroller.cpp 2016-06-06 19:34:22 +0000
1496@@ -54,13 +54,13 @@
1497 return list;
1498 }
1499
1500-bool ScreensController::setConfiguration(CustomScreenConfigurationList newConfig)
1501+bool ScreensController::setConfiguration(const CustomScreenConfigurationList &newConfig)
1502 {
1503 using namespace mir::geometry;
1504
1505 auto displayConfiguration = m_display->configuration();
1506
1507- Q_FOREACH (auto config, newConfig) {
1508+ Q_FOREACH (const auto &config, newConfig) {
1509 displayConfiguration->for_each_output(
1510 [&config](mg::UserDisplayConfigurationOutput &outputConfig)
1511 {
1512
1513=== modified file 'src/platforms/mirserver/screenscontroller.h'
1514--- src/platforms/mirserver/screenscontroller.h 2016-01-29 16:49:06 +0000
1515+++ src/platforms/mirserver/screenscontroller.h 2016-06-06 19:34:22 +0000
1516@@ -43,7 +43,7 @@
1517 QObject *parent = 0);
1518
1519 CustomScreenConfigurationList configuration();
1520- bool setConfiguration(CustomScreenConfigurationList newConfig);
1521+ bool setConfiguration(const CustomScreenConfigurationList &newConfig);
1522
1523 private:
1524 const QSharedPointer<ScreensModel> m_screensModel;
1525
1526=== modified file 'src/platforms/mirserver/screensmodel.cpp'
1527--- src/platforms/mirserver/screensmodel.cpp 2016-05-06 08:41:15 +0000
1528+++ src/platforms/mirserver/screensmodel.cpp 2016-06-06 19:34:22 +0000
1529@@ -144,7 +144,7 @@
1530 );
1531
1532 // Announce new Screens to Qt
1533- for (auto screen : newScreenList) {
1534+ Q_FOREACH (auto screen, newScreenList) {
1535 Q_EMIT screenAdded(screen);
1536 }
1537
1538@@ -157,7 +157,7 @@
1539 }
1540
1541 // Delete any old & unused Screens
1542- for (auto screen: oldScreenList) {
1543+ Q_FOREACH (auto screen, oldScreenList) {
1544 qCDebug(QTMIR_SCREENS) << "Removed Screen with id" << screen->m_outputId.as_value()
1545 << "and geometry" << screen->geometry();
1546 auto window = static_cast<ScreenWindow *>(screen->window());
1547@@ -180,7 +180,7 @@
1548 buffer.view_area().size.width.as_int(),
1549 buffer.view_area().size.height.as_int());
1550
1551- for (auto screen : m_screenList) {
1552+ Q_FOREACH (auto screen, m_screenList) {
1553 if (dbGeom == screen->geometry()) {
1554 screen->setMirDisplayBuffer(&buffer, &group);
1555 break;
1556@@ -190,7 +190,7 @@
1557 });
1558
1559 qCDebug(QTMIR_SCREENS) << "=======================================";
1560- for (auto screen: m_screenList) {
1561+ Q_FOREACH (auto screen, m_screenList) {
1562 qCDebug(QTMIR_SCREENS) << screen << "- id:" << screen->m_outputId.as_value()
1563 << "geometry:" << screen->geometry()
1564 << "window:" << screen->window()
1565@@ -217,7 +217,7 @@
1566
1567 void ScreensModel::allWindowsSetExposed(bool exposed)
1568 {
1569- for (const auto screen : m_screenList) {
1570+ Q_FOREACH (const auto screen, m_screenList) {
1571 const auto window = static_cast<ScreenWindow *>(screen->window());
1572 if (window && window->window()) {
1573 window->setExposed(exposed);
1574@@ -240,7 +240,7 @@
1575 return nullptr;
1576 }
1577
1578-QWindow* ScreensModel::getWindowForPoint(const QPoint &point) //FIXME - not thread safe & not efficient
1579+QWindow* ScreensModel::getWindowForPoint(QPoint point) //FIXME - not thread safe & not efficient
1580 {
1581 // This is a part optimization, and a part work-around for AP generated input events occasionally
1582 // appearing outside the screen borders: https://bugs.launchpad.net/qtmir/+bug/1508415
1583@@ -248,7 +248,7 @@
1584 return m_screenList.first()->window()->window();
1585 }
1586
1587- for (Screen *screen : m_screenList) {
1588+ Q_FOREACH (Screen *screen, m_screenList) {
1589 if (screen->window() && screen->geometry().contains(point)) {
1590 return screen->window()->window();
1591 }
1592
1593=== modified file 'src/platforms/mirserver/screensmodel.h'
1594--- src/platforms/mirserver/screensmodel.h 2016-04-29 15:41:00 +0000
1595+++ src/platforms/mirserver/screensmodel.h 2016-06-06 19:34:22 +0000
1596@@ -62,7 +62,7 @@
1597 QList<Screen*> screens() const { return m_screenList; }
1598 bool compositing() const { return m_compositing; }
1599
1600- QWindow* getWindowForPoint(const QPoint &point);
1601+ QWindow* getWindowForPoint(QPoint point);
1602
1603 Q_SIGNALS:
1604 void screenAdded(Screen *screen);
1605
1606=== modified file 'src/platforms/mirserver/sessionlistener.cpp'
1607--- src/platforms/mirserver/sessionlistener.cpp 2016-03-10 11:55:28 +0000
1608+++ src/platforms/mirserver/sessionlistener.cpp 2016-06-06 19:34:22 +0000
1609@@ -90,7 +90,7 @@
1610 Q_EMIT sessionDestroyingSurface(&session, surface);
1611 }
1612
1613-void SessionListener::surfaceAboutToBeCreated(mir::scene::Session& session, qtmir::CreationHints creationHints)
1614+void SessionListener::surfaceAboutToBeCreated(mir::scene::Session& session, const qtmir::CreationHints &creationHints)
1615 {
1616 m_creationHintsForNewSurface[&session] = creationHints;
1617 }
1618
1619=== modified file 'src/platforms/mirserver/sessionlistener.h'
1620--- src/platforms/mirserver/sessionlistener.h 2016-03-10 11:55:28 +0000
1621+++ src/platforms/mirserver/sessionlistener.h 2016-06-06 19:34:22 +0000
1622@@ -42,7 +42,7 @@
1623 void surface_created(mir::scene::Session&, std::shared_ptr<mir::scene::Surface> const&) override;
1624 void destroying_surface(mir::scene::Session&, std::shared_ptr<mir::scene::Surface> const&) override;
1625
1626- void surfaceAboutToBeCreated(mir::scene::Session&, qtmir::CreationHints creationHints);
1627+ void surfaceAboutToBeCreated(mir::scene::Session&, const qtmir::CreationHints &creationHints);
1628
1629 Q_SIGNALS:
1630 void sessionStarting(std::shared_ptr<mir::scene::Session> const& session);
1631
1632=== modified file 'src/platforms/mirserver/surfaceobserver.cpp'
1633--- src/platforms/mirserver/surfaceobserver.cpp 2016-05-05 14:18:30 +0000
1634+++ src/platforms/mirserver/surfaceobserver.cpp 2016-06-06 19:34:22 +0000
1635@@ -28,7 +28,7 @@
1636 #include <mir/geometry/size.h>
1637 #include <mir/shell/surface_specification.h>
1638
1639-QMap<const mir::scene::Surface*, SurfaceObserver*> SurfaceObserver::m_surfaceToObserverMap;
1640+QHash<const mir::scene::Surface*, SurfaceObserver*> SurfaceObserver::m_surfaceToObserverMap;
1641 QMutex SurfaceObserver::mutex;
1642
1643 SurfaceObserver::SurfaceObserver()
1644@@ -83,7 +83,7 @@
1645 SurfaceObserver::~SurfaceObserver()
1646 {
1647 QMutexLocker locker(&mutex);
1648- QMutableMapIterator<const mir::scene::Surface*, SurfaceObserver*> i(m_surfaceToObserverMap);
1649+ QMutableHashIterator<const mir::scene::Surface*, SurfaceObserver*> i(m_surfaceToObserverMap);
1650 while (i.hasNext()) {
1651 i.next();
1652 if (i.value() == this) {
1653
1654=== modified file 'src/platforms/mirserver/surfaceobserver.h'
1655--- src/platforms/mirserver/surfaceobserver.h 2016-05-05 14:17:14 +0000
1656+++ src/platforms/mirserver/surfaceobserver.h 2016-06-06 19:34:22 +0000
1657@@ -30,7 +30,7 @@
1658 class Surface;
1659 }
1660 namespace shell {
1661- class SurfaceSpecification;
1662+ struct SurfaceSpecification;
1663 }
1664 }
1665
1666@@ -90,7 +90,7 @@
1667 QObject *m_listener;
1668 bool m_framesPosted;
1669 QMap<QByteArray, Qt::CursorShape> m_cursorNameToShape;
1670- static QMap<const mir::scene::Surface*, SurfaceObserver*> m_surfaceToObserverMap;
1671+ static QHash<const mir::scene::Surface*, SurfaceObserver*> m_surfaceToObserverMap;
1672 };
1673
1674 #endif
1675
1676=== modified file 'tests/framework/CMakeLists.txt'
1677--- tests/framework/CMakeLists.txt 2016-05-24 20:13:10 +0000
1678+++ tests/framework/CMakeLists.txt 2016-06-06 19:34:22 +0000
1679@@ -1,7 +1,11 @@
1680 include_directories(
1681- ${APPLICATION_API_INCLUDE_DIRS}
1682 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1683 ${CMAKE_SOURCE_DIR}/src/modules
1684+)
1685+
1686+include_directories(
1687+ SYSTEM
1688+ ${APPLICATION_API_INCLUDE_DIRS}
1689 ${MIRSERVER_INCLUDE_DIRS}
1690 ${MIRRENDERERGLDEV_INCLUDE_DIRS}
1691
1692
1693=== modified file 'tests/framework/fake_session.cpp'
1694--- tests/framework/fake_session.cpp 2016-05-24 20:13:10 +0000
1695+++ tests/framework/fake_session.cpp 2016-06-06 19:34:22 +0000
1696@@ -92,14 +92,14 @@
1697
1698 void FakeSession::removeChildSession(SessionInterface *) {}
1699
1700-void FakeSession::foreachChildSession(std::function<void (SessionInterface *)>) const {}
1701+void FakeSession::foreachChildSession(const std::function<void (SessionInterface *)> &) const {}
1702
1703 std::shared_ptr<mir::scene::PromptSession> FakeSession::activePromptSession() const
1704 {
1705 return std::shared_ptr<mir::scene::PromptSession>();
1706 }
1707
1708-void FakeSession::foreachPromptSession(std::function<void (const std::shared_ptr<mir::scene::PromptSession> &)>) const {}
1709+void FakeSession::foreachPromptSession(const std::function<void (const std::shared_ptr<mir::scene::PromptSession> &)> &) const {}
1710
1711 void FakeSession::setFullscreen(bool) {}
1712
1713
1714=== modified file 'tests/framework/fake_session.h'
1715--- tests/framework/fake_session.h 2016-05-24 20:13:10 +0000
1716+++ tests/framework/fake_session.h 2016-06-06 19:34:22 +0000
1717@@ -63,10 +63,10 @@
1718 void addChildSession(SessionInterface*) override;
1719 void insertChildSession(uint, SessionInterface*) override;
1720 void removeChildSession(SessionInterface*) override;
1721- void foreachChildSession(std::function<void(SessionInterface* session)>) const override;
1722+ void foreachChildSession(const std::function<void(SessionInterface* session)> &) const override;
1723
1724 std::shared_ptr<mir::scene::PromptSession> activePromptSession() const override;
1725- void foreachPromptSession(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)>) const override;
1726+ void foreachPromptSession(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> &) const override;
1727
1728 void setFullscreen(bool) override;
1729 void setLive(const bool) override;
1730
1731=== modified file 'tests/framework/mock_mir_session.cpp'
1732--- tests/framework/mock_mir_session.cpp 2015-10-19 10:45:42 +0000
1733+++ tests/framework/mock_mir_session.cpp 2016-06-06 19:34:22 +0000
1734@@ -22,6 +22,7 @@
1735 {
1736
1737 MockSession::MockSession()
1738+ : m_sessionId(-1)
1739 {
1740 }
1741
1742
1743=== modified file 'tests/framework/mock_session.h'
1744--- tests/framework/mock_session.h 2016-03-28 18:02:26 +0000
1745+++ tests/framework/mock_session.h 2016-06-06 19:34:22 +0000
1746@@ -57,10 +57,10 @@
1747 MOCK_METHOD1(addChildSession, void(SessionInterface* session));
1748 MOCK_METHOD2(insertChildSession, void(uint index, SessionInterface* session));
1749 MOCK_METHOD1(removeChildSession, void(SessionInterface* session));
1750- MOCK_CONST_METHOD1(foreachChildSession, void(std::function<void(SessionInterface* session)> f));
1751+ MOCK_CONST_METHOD1(foreachChildSession, void(const std::function<void(SessionInterface* session)> &f));
1752
1753 MOCK_CONST_METHOD0(activePromptSession, std::shared_ptr<mir::scene::PromptSession>());
1754- MOCK_CONST_METHOD1(foreachPromptSession, void(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> f));
1755+ MOCK_CONST_METHOD1(foreachPromptSession, void(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> &f));
1756
1757 void setState(State state);
1758
1759
1760=== modified file 'tests/mirserver/Clipboard/CMakeLists.txt'
1761--- tests/mirserver/Clipboard/CMakeLists.txt 2014-12-03 08:56:35 +0000
1762+++ tests/mirserver/Clipboard/CMakeLists.txt 2016-06-06 19:34:22 +0000
1763@@ -6,6 +6,10 @@
1764
1765 include_directories(
1766 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1767+)
1768+
1769+include_directories(
1770+ SYSTEM
1771 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
1772 ${MIRSERVER_INCLUDE_DIRS}
1773 )
1774
1775=== modified file 'tests/mirserver/QtEventFeeder/CMakeLists.txt'
1776--- tests/mirserver/QtEventFeeder/CMakeLists.txt 2014-12-03 08:56:35 +0000
1777+++ tests/mirserver/QtEventFeeder/CMakeLists.txt 2016-06-06 19:34:22 +0000
1778@@ -7,6 +7,10 @@
1779 include_directories(
1780 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1781 ${CMAKE_SOURCE_DIR}/src/common
1782+)
1783+
1784+include_directories(
1785+ SYSTEM
1786 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
1787 ${MIRSERVER_INCLUDE_DIRS}
1788 )
1789
1790=== modified file 'tests/mirserver/QtEventFeeder/mock_qtwindowsystem.h'
1791--- tests/mirserver/QtEventFeeder/mock_qtwindowsystem.h 2016-01-07 11:37:55 +0000
1792+++ tests/mirserver/QtEventFeeder/mock_qtwindowsystem.h 2016-06-06 19:34:22 +0000
1793@@ -28,7 +28,6 @@
1794 MOCK_METHOD1(getWindowForTouchPoint, QWindow*(const QPoint &point));
1795 MOCK_METHOD0(lastWindow, QWindow*());
1796 MOCK_METHOD0(focusedWindow, QWindow*());
1797- MOCK_METHOD1(registerTouchDevice, void(QTouchDevice* device));
1798
1799 // Wanted to use GMock, but MOCK_METHOD11 not implemented
1800 void handleExtendedKeyEvent(QWindow */*window*/, ulong /*timestamp*/, QEvent::Type /*type*/, int /*key*/,
1801@@ -43,6 +42,18 @@
1802 Qt::KeyboardModifiers mods));
1803 MOCK_METHOD4(handleMouseEvent, void(ulong timestamp, QPointF point, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers));
1804 MOCK_METHOD3(handleWheelEvent, void(ulong timestamp, QPoint angleDelta, Qt::KeyboardModifiers mods));
1805+
1806+ ~MockQtWindowSystem()
1807+ {
1808+ qDeleteAll(m_devices);
1809+ }
1810+
1811+ void registerTouchDevice(QTouchDevice* device)
1812+ {
1813+ m_devices << device;
1814+ }
1815+
1816+ QVector<QTouchDevice*> m_devices;
1817 };
1818
1819 namespace testing
1820
1821=== modified file 'tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp'
1822--- tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp 2016-04-29 15:41:00 +0000
1823+++ tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp 2016-06-06 19:34:22 +0000
1824@@ -78,11 +78,11 @@
1825 mockWindowSystem = new MockQtWindowSystem;
1826 auto screens = QSharedPointer<ScreensModel>();
1827
1828- EXPECT_CALL(*mockWindowSystem, registerTouchDevice(_));
1829+ ASSERT_TRUE(mockWindowSystem->m_devices.count() == 0);
1830
1831 qtEventFeeder = new QtEventFeeder(screens, mockWindowSystem);
1832
1833- ASSERT_TRUE(Mock::VerifyAndClearExpectations(mockWindowSystem));
1834+ ASSERT_TRUE(mockWindowSystem->m_devices.count() == 1);
1835
1836 int argc = 0;
1837 char **argv = nullptr;
1838
1839=== modified file 'tests/mirserver/Screen/CMakeLists.txt'
1840--- tests/mirserver/Screen/CMakeLists.txt 2015-11-11 10:43:36 +0000
1841+++ tests/mirserver/Screen/CMakeLists.txt 2016-06-06 19:34:22 +0000
1842@@ -8,6 +8,10 @@
1843 ${CMAKE_SOURCE_DIR}/tests/framework
1844 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1845 ${CMAKE_SOURCE_DIR}/src/common
1846+)
1847+
1848+include_directories(
1849+ SYSTEM
1850 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
1851 ${MIRSERVER_INCLUDE_DIRS}
1852 )
1853
1854=== modified file 'tests/mirserver/ScreensModel/CMakeLists.txt'
1855--- tests/mirserver/ScreensModel/CMakeLists.txt 2016-02-16 11:48:35 +0000
1856+++ tests/mirserver/ScreensModel/CMakeLists.txt 2016-06-06 19:34:22 +0000
1857@@ -11,6 +11,10 @@
1858 ${CMAKE_SOURCE_DIR}/tests/framework
1859 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1860 ${CMAKE_SOURCE_DIR}/src/common
1861+)
1862+
1863+include_directories(
1864+ SYSTEM
1865 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
1866 ${MIRSERVER_INCLUDE_DIRS}
1867 ${MIRRENDERERGLDEV_INCLUDE_DIRS}
1868
1869=== modified file 'tests/mirserver/ScreensModel/screensmodel_test.cpp'
1870--- tests/mirserver/ScreensModel/screensmodel_test.cpp 2016-04-29 15:41:00 +0000
1871+++ tests/mirserver/ScreensModel/screensmodel_test.cpp 2016-06-06 19:34:22 +0000
1872@@ -64,6 +64,7 @@
1873 void ScreensModelTest::TearDown()
1874 {
1875 delete screensModel;
1876+ delete app;
1877 }
1878
1879 TEST_F(ScreensModelTest, SingleScreenFound)
1880
1881=== modified file 'tests/mirserver/WindowManager/CMakeLists.txt'
1882--- tests/mirserver/WindowManager/CMakeLists.txt 2016-03-10 11:55:28 +0000
1883+++ tests/mirserver/WindowManager/CMakeLists.txt 2016-06-06 19:34:22 +0000
1884@@ -1,5 +1,9 @@
1885 include_directories(
1886 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1887+)
1888+
1889+include_directories(
1890+ SYSTEM
1891 ${MIRSERVER_INCLUDE_DIRS}
1892 )
1893
1894
1895=== modified file 'tests/modules/Application/CMakeLists.txt'
1896--- tests/modules/Application/CMakeLists.txt 2015-12-15 10:03:32 +0000
1897+++ tests/modules/Application/CMakeLists.txt 2016-06-06 19:34:22 +0000
1898@@ -7,8 +7,11 @@
1899 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1900 ${CMAKE_SOURCE_DIR}/src/modules
1901 ${CMAKE_SOURCE_DIR}/tests/framework
1902+)
1903+
1904+include_directories(
1905+ SYSTEM
1906 ${MIRSERVER_INCLUDE_DIRS}
1907-
1908 ${Qt5Core_INCLUDE_DIRS}
1909 ${Qt5GUI_INCLUDE_DIRS}
1910 ${Qt5Quick_INCLUDE_DIRS}
1911
1912=== modified file 'tests/modules/Application/application_test.cpp'
1913--- tests/modules/Application/application_test.cpp 2016-05-02 12:57:40 +0000
1914+++ tests/modules/Application/application_test.cpp 2016-06-06 19:34:22 +0000
1915@@ -590,6 +590,38 @@
1916 EXPECT_EQ(Application::InternalState::StoppedResumable, application->internalState());
1917 }
1918
1919+TEST_F(ApplicationTests, surfaceCountPropertyUpdates)
1920+{
1921+ using namespace ::testing;
1922+
1923+ QScopedPointer<Application> application(createApplicationWithFakes());
1924+
1925+ application->setProcessState(Application::ProcessRunning);
1926+ Session *session = createSessionWithFakes();
1927+
1928+ application->setSession(session);
1929+
1930+ QSignalSpy surfaceCountChangedSpy(application.data(), &Application::surfaceCountChanged);
1931+
1932+ EXPECT_EQ(application->surfaceCount(), 0);
1933+ EXPECT_EQ(surfaceCountChangedSpy.count(), 0);
1934+
1935+ FakeMirSurface *surface = new FakeMirSurface;
1936+ session->registerSurface(surface);
1937+ surface->drawFirstFrame();
1938+
1939+ EXPECT_EQ(application->surfaceCount(), 1);
1940+ EXPECT_EQ(surfaceCountChangedSpy.count(), 1);
1941+
1942+ FakeMirSurface *surface2 = new FakeMirSurface;
1943+ session->registerSurface(surface2);
1944+ surface2->drawFirstFrame();
1945+
1946+ EXPECT_EQ(application->surfaceCount(), 2);
1947+ EXPECT_EQ(surfaceCountChangedSpy.count(), 2);
1948+
1949+}
1950+
1951 /*
1952 Regression test for bug "App respawns if manually closed while it's launching"
1953 https://bugs.launchpad.net/ubuntu/+source/qtmir/+bug/1575577
1954
1955=== modified file 'tests/modules/ApplicationManager/CMakeLists.txt'
1956--- tests/modules/ApplicationManager/CMakeLists.txt 2015-09-30 15:45:17 +0000
1957+++ tests/modules/ApplicationManager/CMakeLists.txt 2016-06-06 19:34:22 +0000
1958@@ -5,10 +5,14 @@
1959 )
1960
1961 include_directories(
1962- ${APPLICATION_API_INCLUDE_DIRS}
1963 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1964 ${CMAKE_SOURCE_DIR}/src/modules
1965 ${CMAKE_SOURCE_DIR}/tests/framework
1966+)
1967+
1968+include_directories(
1969+ SYSTEM
1970+ ${APPLICATION_API_INCLUDE_DIRS}
1971 ${MIRSERVER_INCLUDE_DIRS}
1972 )
1973
1974
1975=== modified file 'tests/modules/ApplicationManager/application_manager_test.cpp'
1976--- tests/modules/ApplicationManager/application_manager_test.cpp 2016-05-03 15:27:26 +0000
1977+++ tests/modules/ApplicationManager/application_manager_test.cpp 2016-06-06 19:34:22 +0000
1978@@ -118,6 +118,8 @@
1979
1980 EXPECT_FALSE(authed);
1981 EXPECT_EQ(application, applicationManager.findApplication(dialer_app_id));
1982+
1983+ delete surface;
1984 }
1985
1986 TEST_F(ApplicationManagerTests,application_dies_while_starting)
1987@@ -271,6 +273,10 @@
1988
1989 TEST_F(ApplicationManagerTests,two_session_on_one_application)
1990 {
1991+ int argc = 0;
1992+ char* argv[0];
1993+ QCoreApplication qtApp(argc, argv); // app for deleteLater event
1994+
1995 using namespace ::testing;
1996 const pid_t a_procId = 5921;
1997 const char an_app_id[] = "some_app";
1998@@ -293,10 +299,18 @@
1999
2000 EXPECT_EQ(true, authed);
2001 EXPECT_EQ(second_session, the_app->session()->session());
2002+
2003+ onSessionStopping(first_session);
2004+ onSessionStopping(second_session);
2005+ qtApp.sendPostedEvents(nullptr, QEvent::DeferredDelete);
2006 }
2007
2008 TEST_F(ApplicationManagerTests,two_session_on_one_application_after_starting)
2009 {
2010+ int argc = 0;
2011+ char* argv[0];
2012+ QCoreApplication qtApp(argc, argv); // app for deleteLater event
2013+
2014 using namespace ::testing;
2015 const pid_t a_procId = 5921;
2016 const char an_app_id[] = "some_app";
2017@@ -323,6 +337,11 @@
2018 EXPECT_EQ(true, authed);
2019 EXPECT_EQ(Application::Running, the_app->state());
2020 EXPECT_EQ(first_session, the_app->session()->session());
2021+
2022+ onSessionStopping(first_session);
2023+ onSessionStopping(second_session);
2024+ delete aSurface;
2025+ qtApp.sendPostedEvents(nullptr, QEvent::DeferredDelete);
2026 }
2027
2028 TEST_F(ApplicationManagerTests,starting_app_is_suspended_when_it_gets_ready_if_requested)
2029@@ -357,6 +376,8 @@
2030
2031 // now that its ready, suspend process should have begun
2032 EXPECT_EQ(Application::InternalState::SuspendingWaitSession, app->internalState());
2033+
2034+ delete aSurface;
2035 }
2036
2037 TEST_F(ApplicationManagerTests,requestFocusApplication)
2038@@ -746,6 +767,8 @@
2039 // Check application state is correctly set
2040 Application *theApp = applicationManager.findApplication(appId);
2041 EXPECT_EQ(theApp->state(), Application::Running);
2042+
2043+ delete surface;
2044 }
2045
2046 /*
2047@@ -879,6 +902,8 @@
2048
2049 EXPECT_EQ(2, countSpy.count()); //FIXME(greyback)
2050 EXPECT_EQ(0, applicationManager.count());
2051+
2052+ delete surface;
2053 }
2054
2055 /*
2056@@ -921,6 +946,8 @@
2057
2058 EXPECT_EQ(countSpy.count(), 2); //FIXME(greyback)
2059 EXPECT_EQ(applicationManager.count(), 0);
2060+
2061+ delete surface;
2062 }
2063
2064 /*
2065@@ -971,6 +998,8 @@
2066
2067 EXPECT_EQ(0, countSpy.count());
2068 EXPECT_EQ(1, applicationManager.count());
2069+
2070+ delete surface;
2071 }
2072
2073 /*
2074@@ -1023,6 +1052,8 @@
2075
2076 EXPECT_EQ(countSpy.count(), 0);
2077 EXPECT_EQ(applicationManager.count(), 1);
2078+
2079+ delete surface;
2080 }
2081
2082 /*
2083@@ -1092,6 +1123,8 @@
2084
2085 EXPECT_EQ(countSpy.count(), 2); //FIXME(greyback)
2086 EXPECT_EQ(applicationManager.count(), 0);
2087+
2088+ delete surface;
2089 }
2090
2091 /*
2092@@ -1133,6 +1166,8 @@
2093
2094 Application *app = applicationManager.findApplication(appId);
2095 EXPECT_EQ(nullptr, app);
2096+
2097+ delete surface;
2098 }
2099
2100 /*
2101@@ -1187,6 +1222,8 @@
2102 EXPECT_EQ(1, applicationManager.count());
2103
2104 EXPECT_EQ(Application::Stopped, app->state());
2105+
2106+ delete surface;
2107 }
2108
2109 /*
2110@@ -1236,6 +1273,10 @@
2111 */
2112 TEST_F(ApplicationManagerTests,unexpectedStopOfForegroundWebapp)
2113 {
2114+ int argc = 0;
2115+ char* argv[0];
2116+ QCoreApplication qtApp(argc, argv); // app for deleteLater event
2117+
2118 using namespace ::testing;
2119 const QString appId("webapp");
2120 const pid_t procId1 = 5551;
2121@@ -1279,6 +1320,10 @@
2122
2123 EXPECT_EQ(countSpy.count(), 2); //FIXME(greyback)
2124 EXPECT_EQ(applicationManager.count(), 0);
2125+
2126+ delete surface;
2127+
2128+ qtApp.sendPostedEvents(nullptr, QEvent::DeferredDelete);
2129 }
2130
2131 /*
2132@@ -1287,6 +1332,10 @@
2133 */
2134 TEST_F(ApplicationManagerTests,unexpectedStopOfBackgroundWebapp)
2135 {
2136+ int argc = 0;
2137+ char* argv[0];
2138+ QCoreApplication qtApp(argc, argv); // app for deleteLater event
2139+
2140 using namespace ::testing;
2141 const QString appId("webapp");
2142 const pid_t procId1 = 5551;
2143@@ -1336,6 +1385,11 @@
2144 onSessionStopping(session1);
2145
2146 EXPECT_EQ(0, countSpy.count());
2147+
2148+ delete surface1;
2149+ delete surface2;
2150+
2151+ qtApp.sendPostedEvents(nullptr, QEvent::DeferredDelete);
2152 }
2153
2154 /*
2155@@ -1460,6 +1514,8 @@
2156
2157 EXPECT_EQ(Application::Running, the_app->state());
2158 ASSERT_EQ(Application::InternalState::Running, the_app->internalState());
2159+
2160+ delete surface;
2161 }
2162
2163 /*
2164@@ -1499,6 +1555,8 @@
2165 EXPECT_FALSE(sharedWakelock.enabled());
2166 ASSERT_EQ(Application::InternalState::RunningInBackground, application->internalState());
2167 EXPECT_EQ(Application::Running, application->state());
2168+
2169+ delete surface;
2170 }
2171
2172 /*
2173@@ -1628,6 +1686,8 @@
2174
2175 EXPECT_EQ(0, applicationManager.count());
2176 EXPECT_TRUE(dir.exists());
2177+
2178+ delete aSurface;
2179 }
2180
2181 /*
2182@@ -1652,6 +1712,8 @@
2183 applicationManager.stopApplication(appId);
2184
2185 EXPECT_EQ(1, spy.count());
2186+
2187+ delete surface;
2188 }
2189
2190
2191@@ -1899,4 +1961,6 @@
2192 surface->requestFocus();
2193
2194 EXPECT_EQ(1, focusRequestedSpy.count());
2195+
2196+ delete surface;
2197 }
2198
2199=== modified file 'tests/modules/SessionManager/CMakeLists.txt'
2200--- tests/modules/SessionManager/CMakeLists.txt 2015-09-30 15:45:17 +0000
2201+++ tests/modules/SessionManager/CMakeLists.txt 2016-06-06 19:34:22 +0000
2202@@ -6,10 +6,14 @@
2203 )
2204
2205 include_directories(
2206- ${APPLICATION_API_INCLUDE_DIRS}
2207 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
2208 ${CMAKE_SOURCE_DIR}/src/modules
2209 ${CMAKE_SOURCE_DIR}/tests/framework
2210+)
2211+
2212+include_directories(
2213+ SYSTEM
2214+ ${APPLICATION_API_INCLUDE_DIRS}
2215 ${MIRSERVER_INCLUDE_DIRS}
2216 )
2217
2218
2219=== modified file 'tests/modules/SessionManager/session_test.cpp'
2220--- tests/modules/SessionManager/session_test.cpp 2016-05-24 21:32:06 +0000
2221+++ tests/modules/SessionManager/session_test.cpp 2016-06-06 19:34:22 +0000
2222@@ -62,6 +62,8 @@
2223
2224 surface->drawFirstFrame();
2225 EXPECT_EQ(Session::Running, session->state());
2226+
2227+ delete surface;
2228 }
2229
2230 TEST_F(SessionTests, AddChildSession)
2231@@ -220,6 +222,7 @@
2232 FakeMirSurface *surface = new FakeMirSurface;
2233 session->registerSurface(surface);
2234 surface->drawFirstFrame();
2235+ delete surface;
2236 }
2237 EXPECT_EQ(Session::Running, session->state());
2238
2239@@ -251,6 +254,7 @@
2240 FakeMirSurface *surface = new FakeMirSurface;
2241 session->registerSurface(surface);
2242 surface->drawFirstFrame();
2243+ delete surface;
2244 }
2245 EXPECT_EQ(Session::Running, session->state());
2246
2247@@ -296,6 +300,7 @@
2248 FakeMirSurface *surface = new FakeMirSurface;
2249 session->registerSurface(surface);
2250 surface->drawFirstFrame();
2251+ delete surface;
2252 }
2253 EXPECT_EQ(Session::Running, session->state());
2254
2255
2256=== modified file 'tests/modules/SharedWakelock/CMakeLists.txt'
2257--- tests/modules/SharedWakelock/CMakeLists.txt 2015-09-30 15:45:17 +0000
2258+++ tests/modules/SharedWakelock/CMakeLists.txt 2016-06-06 19:34:22 +0000
2259@@ -5,6 +5,10 @@
2260
2261 include_directories(
2262 ${CMAKE_SOURCE_DIR}/src/modules
2263+)
2264+
2265+include_directories(
2266+ SYSTEM
2267 ${QTDBUSTEST_INCLUDE_DIRS}
2268 ${QTDBUSMOCK_INCLUDE_DIRS}
2269 )
2270
2271=== modified file 'tests/modules/SurfaceManager/CMakeLists.txt'
2272--- tests/modules/SurfaceManager/CMakeLists.txt 2016-05-24 20:13:10 +0000
2273+++ tests/modules/SurfaceManager/CMakeLists.txt 2016-06-06 19:34:22 +0000
2274@@ -9,6 +9,10 @@
2275 ${CMAKE_SOURCE_DIR}/src/modules
2276 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
2277 ${CMAKE_SOURCE_DIR}/tests/framework
2278+)
2279+
2280+include_directories(
2281+ SYSTEM
2282 ${MIRSERVER_INCLUDE_DIRS}
2283 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
2284 )

Subscribers

People subscribed via source and target branches