Merge lp:~gerboland/qtubuntu/enable-debug-mode into lp:qtubuntu

Proposed by Gerry Boland
Status: Merged
Approved by: Daniel d'Andrada
Approved revision: 294
Merged at revision: 349
Proposed branch: lp:~gerboland/qtubuntu/enable-debug-mode
Merge into: lp:qtubuntu
Diff against target: 376 lines (+141/-19)
11 files modified
debian/control (+1/-0)
src/ubuntumirclient/debugextension.cpp (+55/-0)
src/ubuntumirclient/debugextension.h (+39/-0)
src/ubuntumirclient/integration.cpp (+15/-2)
src/ubuntumirclient/integration.h (+4/-1)
src/ubuntumirclient/logging.h (+1/-0)
src/ubuntumirclient/plugin.cpp (+5/-11)
src/ubuntumirclient/plugin.h (+2/-3)
src/ubuntumirclient/ubuntumirclient.pro (+2/-0)
src/ubuntumirclient/window.cpp (+13/-1)
src/ubuntumirclient/window.h (+4/-1)
To merge this branch: bzr merge lp:~gerboland/qtubuntu/enable-debug-mode
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Daniel d'Andrada (community) Approve
Michael Terry Pending
Nick Dedekind Pending
PS Jenkins bot continuous-integration Pending
Review via email: mp+306527@code.launchpad.net

This proposal supersedes a proposal from 2015-10-30.

Commit message

Use mir-client-debug to map window coordinates to screen coordinates

If client detects testability framework was enabled, try to load the mir-client-debug library and use it to implement UbuntuWindow::mapToGlobal. This should enable Autopilot to correctly interact with the application.

Description of the change

Use mir-client-debug to map window coordinates to screen coordinates when under testability

To work with unity8 it needs https://code.launchpad.net/~dandrader/qtmir/coordinateTranslator/+merge/291768

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Note: this requires work on unity8's side before it is functional. But it works with mir-demo-server.

Also note, mir only supports this mir-client-debug extension if the mir server is started with the --debug argument.

This will be a problem for application autopilot testing, as it will require unity8 to be restarted with the --debug flag now.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

To test, handiest is to apply this patch: http://pastebin.ubuntu.com/13011095/ and then do:

mir_demo_shell --debug

and start any qt app with "-testability" flag.

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

FAILED: Continuous integration, rev:283
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-1-ci/5/
Executed test runs:

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Nick Dedekind (nick-dedekind) wrote : Posted in a previous version of this proposal

Does this mean we can remove UbuntuWindow::updatePanelHeightHack and all the geom.setY(panelHeight()) ?

review: Needs Information
Revision history for this message
Nick Dedekind (nick-dedekind) wrote : Posted in a previous version of this proposal

And how about QPlatformWindow::mapFromGlobal for kicks?

Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Yep, it lets us remove the panelHeight hack. Could also implement mapFromGlobal too, but I didn't see a use-case

Revision history for this message
Nick Dedekind (nick-dedekind) wrote : Posted in a previous version of this proposal

rebase please :)

Revision history for this message
Nick Dedekind (nick-dedekind) wrote : Posted in a previous version of this proposal

Afraid this will not work unless we get https://bugreports.qt.io/browse/QTBUG-51031 sorted.

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

> Afraid this will not work unless we get
> https://bugreports.qt.io/browse/QTBUG-51031 sorted.

It will work as long as application code calls "window->handle()->mapToGlobal()" instead of "window->mapToGlobal()".

Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

It has a bunch of conflicts with trunk. Solved them here: lp:~dandrader/qtubuntu/enable-debug-mode
Feel free to branch it, squash its history and push it here with --overwrite.

This branch, along with lp:~dandrader/qtmir/coordinateTranslator, should be all autopilot folks need for mapping local points to screen points (regardless of any translations, rotations and scalings done by unity8 to the application surface)

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

PASSED: Continuous integration, rev:287
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/35/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1331
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1302
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/1302
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1300
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1300/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1300
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1300/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1300
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1300/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1300
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1300/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1300
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1300/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1300
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1300/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

It works.

review: Approve
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

This conflicts with trunk now. :(

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

Lot's of conflicts with trunk:

"""
Text conflict in src/ubuntumirclient/integration.cpp
Text conflict in src/ubuntumirclient/integration.h
Text conflict in src/ubuntumirclient/window.cpp
Text conflict in src/ubuntumirclient/window.h
4 conflicts encountered.
"""

review: Needs Fixing
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

I pushed to the actual right branch this time!

Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

OK, conflicts fixed.

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

FAILED: Continuous integration, rev:290
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/102/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2528/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2556
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2437
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2437
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2437
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2430/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2430/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2430/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2430/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2430/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2430/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2430/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2430/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2430/console

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

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

PASSED: Continuous integration, rev:291
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/103/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2530
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2558
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2439
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2439
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2439
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2432
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2432/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2432
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2432/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2432
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2432/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2432
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2432/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2432
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2432/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2432
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2432/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2432
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2432/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2432
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2432/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2432
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2432/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

"""
+ qDebug() << "NOTICE: Loading mirclient-debug-extension";
"""

Do we want to keep that? If so, better categorize it so that people know where does it come from when seeing it in the console

review: Needs Information
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Updated

Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

Those changes in src/ubuntumirclient/input.cpp seem unrelated. Missing prereq?

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

PASSED: Continuous integration, rev:293
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/118/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2941
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2969
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2827
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2827/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2827
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2827/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2827
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2827/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2827
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2827/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2827
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2827/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2827
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2827/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2827
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2827/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2827
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2827/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2827
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2827/artifact/output/*zip*/output.zip

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

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

PASSED: Continuous integration, rev:294
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/119/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2945
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2973
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2831/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
292. By Gerry Boland

Merge trunk

293. By Gerry Boland

Use category logging for debug extension warnings

294. By Gerry Boland

Use dedicated logging category for debug-related messages

Revision history for this message
Gerry Boland (gerboland) wrote :

Apologies, bad branch management on my part. All fixed now

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Looking good.

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:294
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/120/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2947
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2975
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2833
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2833/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2833
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2833/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2833
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2833/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2833
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2833/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2833
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2833/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2833
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2833/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2833
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2833/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2833
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2833/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2833
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2833/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
295. By Gerry Boland

Merge trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2016-08-24 12:40:30 +0000
+++ debian/control 2016-10-04 16:22:27 +0000
@@ -11,6 +11,7 @@
11 libglib2.0-dev,11 libglib2.0-dev,
12 libinput-dev,12 libinput-dev,
13 libmirclient-dev (>= 0.13.0),13 libmirclient-dev (>= 0.13.0),
14 libmirclient-debug-extension-dev,
14 libmtdev-dev,15 libmtdev-dev,
15 libubuntu-application-api-dev (>= 2.9.0),16 libubuntu-application-api-dev (>= 2.9.0),
16 libudev-dev,17 libudev-dev,
1718
=== added file 'src/ubuntumirclient/debugextension.cpp'
--- src/ubuntumirclient/debugextension.cpp 1970-01-01 00:00:00 +0000
+++ src/ubuntumirclient/debugextension.cpp 2016-10-04 16:22:27 +0000
@@ -0,0 +1,55 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License version 3, as published by
6 * the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "debugextension.h"
18
19#include "logging.h"
20
21// mir client debug
22#include <mir_toolkit/debug/surface.h>
23
24Q_LOGGING_CATEGORY(ubuntumirclientDebug, "ubuntumirclient.debug")
25
26UbuntuDebugExtension::UbuntuDebugExtension()
27 : m_mirclientDebug(QStringLiteral("mirclient-debug-extension"), 1)
28 , m_mapper(nullptr)
29{
30 qCDebug(ubuntumirclientDebug) << "NOTICE: Loading mirclient-debug-extension";
31 m_mapper = (MapperPrototype) m_mirclientDebug.resolve("mir_debug_surface_coords_to_screen");
32
33 if (!m_mirclientDebug.isLoaded()) {
34 qCWarning(ubuntumirclientDebug) << "ERROR: mirclient-debug-extension failed to load:"
35 << m_mirclientDebug.errorString();
36 } else if (!m_mapper) {
37 qCWarning(ubuntumirclientDebug) << "ERROR: unable to find required symbols in mirclient-debug-extension:"
38 << m_mirclientDebug.errorString();
39 }
40}
41
42QPoint UbuntuDebugExtension::mapSurfacePointToScreen(MirSurface *surface, const QPoint &point)
43{
44 if (!m_mapper) {
45 return point;
46 }
47
48 QPoint mappedPoint;
49 bool status = m_mapper(surface, point.x(), point.y(), &mappedPoint.rx(), &mappedPoint.ry());
50 if (status) {
51 return mappedPoint;
52 } else {
53 return point;
54 }
55}
056
=== added file 'src/ubuntumirclient/debugextension.h'
--- src/ubuntumirclient/debugextension.h 1970-01-01 00:00:00 +0000
+++ src/ubuntumirclient/debugextension.h 2016-10-04 16:22:27 +0000
@@ -0,0 +1,39 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License version 3, as published by
6 * the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef UBUNTU_DEBUG_EXTENSION_H
18#define UBUNTU_DEBUG_EXTENSION_H
19
20#include <QPoint>
21#include <QLibrary>
22struct MirSurface;
23
24typedef bool (*MapperPrototype)(MirSurface* surface, int x, int y, int* screenX, int* screenY);
25
26
27class UbuntuDebugExtension
28{
29public:
30 UbuntuDebugExtension();
31
32 QPoint mapSurfacePointToScreen(MirSurface *, const QPoint &point);
33
34private:
35 QLibrary m_mirclientDebug;
36 MapperPrototype m_mapper;
37};
38
39#endif // UBUNTU_DEBUG_EXTENSION_H
040
=== modified file 'src/ubuntumirclient/integration.cpp'
--- src/ubuntumirclient/integration.cpp 2016-09-28 10:51:25 +0000
+++ src/ubuntumirclient/integration.cpp 2016-10-04 16:22:27 +0000
@@ -18,6 +18,7 @@
18#include "integration.h"18#include "integration.h"
19#include "backingstore.h"19#include "backingstore.h"
20#include "clipboard.h"20#include "clipboard.h"
21#include "debugextension.h"
21#include "glcontext.h"22#include "glcontext.h"
22#include "input.h"23#include "input.h"
23#include "logging.h"24#include "logging.h"
@@ -70,7 +71,8 @@
70 QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationSuspended);71 QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationSuspended);
71}72}
7273
73UbuntuClientIntegration::UbuntuClientIntegration()74
75UbuntuClientIntegration::UbuntuClientIntegration(int argc, char **argv)
74 : QPlatformIntegration()76 : QPlatformIntegration()
75 , mNativeInterface(new UbuntuNativeInterface(this))77 , mNativeInterface(new UbuntuNativeInterface(this))
76 , mFontDb(new QGenericUnixFontDatabase)78 , mFontDb(new QGenericUnixFontDatabase)
@@ -105,6 +107,17 @@
105 mEglNativeDisplay = mir_connection_get_egl_native_display(mMirConnection);107 mEglNativeDisplay = mir_connection_get_egl_native_display(mMirConnection);
106 ASSERT((mEglDisplay = eglGetDisplay(mEglNativeDisplay)) != EGL_NO_DISPLAY);108 ASSERT((mEglDisplay = eglGetDisplay(mEglNativeDisplay)) != EGL_NO_DISPLAY);
107 ASSERT(eglInitialize(mEglDisplay, nullptr, nullptr) == EGL_TRUE);109 ASSERT(eglInitialize(mEglDisplay, nullptr, nullptr) == EGL_TRUE);
110
111 // Has debug mode been requsted, either with "-testability" switch or QT_LOAD_TESTABILITY env var
112 bool testability = qEnvironmentVariableIsSet("QT_LOAD_TESTABILITY");
113 for (int i=1; !testability && i<argc; i++) {
114 if (strcmp(argv[i], "-testability") == 0) {
115 testability = true;
116 }
117 }
118 if (testability) {
119 mDebugExtension.reset(new UbuntuDebugExtension);
120 }
108}121}
109122
110void UbuntuClientIntegration::initialize()123void UbuntuClientIntegration::initialize()
@@ -211,7 +224,7 @@
211224
212QPlatformWindow* UbuntuClientIntegration::createPlatformWindow(QWindow* window) const225QPlatformWindow* UbuntuClientIntegration::createPlatformWindow(QWindow* window) const
213{226{
214 return new UbuntuWindow(window, mInput, mNativeInterface, mEglDisplay, mMirConnection);227 return new UbuntuWindow(window, mInput, mNativeInterface, mEglDisplay, mMirConnection, mDebugExtension.data());
215}228}
216229
217bool UbuntuClientIntegration::hasCapability(QPlatformIntegration::Capability cap) const230bool UbuntuClientIntegration::hasCapability(QPlatformIntegration::Capability cap) const
218231
=== modified file 'src/ubuntumirclient/integration.h'
--- src/ubuntumirclient/integration.h 2016-08-24 12:40:30 +0000
+++ src/ubuntumirclient/integration.h 2016-10-04 16:22:27 +0000
@@ -29,6 +29,7 @@
2929
30#include <EGL/egl.h>30#include <EGL/egl.h>
3131
32class UbuntuDebugExtension;
32class UbuntuInput;33class UbuntuInput;
33class UbuntuNativeInterface;34class UbuntuNativeInterface;
34class UbuntuScreen;35class UbuntuScreen;
@@ -39,7 +40,7 @@
39 Q_OBJECT40 Q_OBJECT
4041
41public:42public:
42 UbuntuClientIntegration();43 UbuntuClientIntegration(int argc, char **argv);
43 virtual ~UbuntuClientIntegration();44 virtual ~UbuntuClientIntegration();
4445
45 // QPlatformIntegration methods.46 // QPlatformIntegration methods.
@@ -64,6 +65,7 @@
64 EGLDisplay eglDisplay() const { return mEglDisplay; }65 EGLDisplay eglDisplay() const { return mEglDisplay; }
65 EGLNativeDisplayType eglNativeDisplay() const { return mEglNativeDisplay; }66 EGLNativeDisplayType eglNativeDisplay() const { return mEglNativeDisplay; }
66 UbuntuScreenObserver *screenObserver() const { return mScreenObserver.data(); }67 UbuntuScreenObserver *screenObserver() const { return mScreenObserver.data(); }
68 UbuntuDebugExtension *debugExtension() const { return mDebugExtension.data(); }
6769
68private Q_SLOTS:70private Q_SLOTS:
69 void destroyScreen(UbuntuScreen *screen);71 void destroyScreen(UbuntuScreen *screen);
@@ -81,6 +83,7 @@
8183
82 UbuntuInput* mInput;84 UbuntuInput* mInput;
83 QPlatformInputContext* mInputContext;85 QPlatformInputContext* mInputContext;
86 QScopedPointer<UbuntuDebugExtension> mDebugExtension;
84 QScopedPointer<UbuntuScreenObserver> mScreenObserver;87 QScopedPointer<UbuntuScreenObserver> mScreenObserver;
85 qreal mScaleFactor;88 qreal mScaleFactor;
8689
8790
=== modified file 'src/ubuntumirclient/logging.h'
--- src/ubuntumirclient/logging.h 2016-06-22 17:16:33 +0000
+++ src/ubuntumirclient/logging.h 2016-10-04 16:22:27 +0000
@@ -26,5 +26,6 @@
26Q_DECLARE_LOGGING_CATEGORY(ubuntumirclientInput)26Q_DECLARE_LOGGING_CATEGORY(ubuntumirclientInput)
27Q_DECLARE_LOGGING_CATEGORY(ubuntumirclientGraphics)27Q_DECLARE_LOGGING_CATEGORY(ubuntumirclientGraphics)
28Q_DECLARE_LOGGING_CATEGORY(ubuntumirclientCursor)28Q_DECLARE_LOGGING_CATEGORY(ubuntumirclientCursor)
29Q_DECLARE_LOGGING_CATEGORY(ubuntumirclientDebug)
2930
30#endif // QUBUNTULOGGING_H31#endif // QUBUNTULOGGING_H
3132
=== modified file 'src/ubuntumirclient/plugin.cpp'
--- src/ubuntumirclient/plugin.cpp 2015-12-04 16:19:33 +0000
+++ src/ubuntumirclient/plugin.cpp 2016-10-04 16:22:27 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2014 Canonical, Ltd.2 * Copyright (C) 2014-2016 Canonical, Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify it under4 * This program is free software: you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License version 3, as published by5 * the terms of the GNU Lesser General Public License version 3, as published by
@@ -20,15 +20,9 @@
2020
21Q_LOGGING_CATEGORY(ubuntumirclient, "ubuntumirclient", QtWarningMsg)21Q_LOGGING_CATEGORY(ubuntumirclient, "ubuntumirclient", QtWarningMsg)
2222
23QStringList UbuntuMirClientIntegrationPlugin::keys() const23QPlatformIntegration *UbuntuMirClientIntegrationPlugin::create(const QString &system,
24{24 const QStringList &/*paramList*/,
25 QStringList list;25 int &argc, char **argv)
26 list << QStringLiteral("ubuntumirclient");
27 return list;
28}
29
30QPlatformIntegration* UbuntuMirClientIntegrationPlugin::create(const QString &system,
31 const QStringList &)
32{26{
33 if (system.toLower() == QLatin1String("ubuntumirclient")) {27 if (system.toLower() == QLatin1String("ubuntumirclient")) {
34#ifdef PLATFORM_API_TOUCH28#ifdef PLATFORM_API_TOUCH
@@ -36,7 +30,7 @@
36#else30#else
37 setenv("UBUNTU_PLATFORM_API_BACKEND", "desktop_mirclient", 1);31 setenv("UBUNTU_PLATFORM_API_BACKEND", "desktop_mirclient", 1);
38#endif32#endif
39 return new UbuntuClientIntegration;33 return new UbuntuClientIntegration(argc, argv);
40 } else {34 } else {
41 return 0;35 return 0;
42 }36 }
4337
=== modified file 'src/ubuntumirclient/plugin.h'
--- src/ubuntumirclient/plugin.h 2014-06-18 23:10:00 +0000
+++ src/ubuntumirclient/plugin.h 2016-10-04 16:22:27 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2014 Canonical, Ltd.2 * Copyright (C) 2014-2016 Canonical, Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify it under4 * This program is free software: you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License version 3, as published by5 * the terms of the GNU Lesser General Public License version 3, as published by
@@ -25,8 +25,7 @@
25 Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "ubuntumirclient.json")25 Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "ubuntumirclient.json")
2626
27public:27public:
28 QStringList keys() const;28 QPlatformIntegration *create(const QString &system, const QStringList &paramList, int &argc, char **argv) override;
29 QPlatformIntegration* create(const QString&, const QStringList&);
30};29};
3130
32#endif // UBUNTU_CLIENT_PLUGIN_H31#endif // UBUNTU_CLIENT_PLUGIN_H
3332
=== modified file 'src/ubuntumirclient/ubuntumirclient.pro'
--- src/ubuntumirclient/ubuntumirclient.pro 2016-09-28 10:51:25 +0000
+++ src/ubuntumirclient/ubuntumirclient.pro 2016-10-04 16:22:27 +0000
@@ -18,6 +18,7 @@
18 backingstore.cpp \18 backingstore.cpp \
19 clipboard.cpp \19 clipboard.cpp \
20 cursor.cpp \20 cursor.cpp \
21 debugextension.cpp \
21 glcontext.cpp \22 glcontext.cpp \
22 input.cpp \23 input.cpp \
23 integration.cpp \24 integration.cpp \
@@ -33,6 +34,7 @@
33 backingstore.h \34 backingstore.h \
34 clipboard.h \35 clipboard.h \
35 cursor.h \36 cursor.h \
37 debugextension.h \
36 glcontext.h \38 glcontext.h \
37 input.h \39 input.h \
38 integration.h \40 integration.h \
3941
=== modified file 'src/ubuntumirclient/window.cpp'
--- src/ubuntumirclient/window.cpp 2016-09-28 10:33:40 +0000
+++ src/ubuntumirclient/window.cpp 2016-10-04 16:22:27 +0000
@@ -16,8 +16,10 @@
1616
17// Local17// Local
18#include "window.h"18#include "window.h"
19#include "debugextension.h"
19#include "nativeinterface.h"20#include "nativeinterface.h"
20#include "input.h"21#include "input.h"
22#include "integration.h"
21#include "screen.h"23#include "screen.h"
22#include "logging.h"24#include "logging.h"
2325
@@ -600,13 +602,14 @@
600}602}
601603
602UbuntuWindow::UbuntuWindow(QWindow *w, UbuntuInput *input, UbuntuNativeInterface *native,604UbuntuWindow::UbuntuWindow(QWindow *w, UbuntuInput *input, UbuntuNativeInterface *native,
603 EGLDisplay eglDisplay, MirConnection *mirConnection)605 EGLDisplay eglDisplay, MirConnection *mirConnection, UbuntuDebugExtension *debugExt)
604 : QObject(nullptr)606 : QObject(nullptr)
605 , QPlatformWindow(w)607 , QPlatformWindow(w)
606 , mId(makeId())608 , mId(makeId())
607 , mWindowState(w->windowState())609 , mWindowState(w->windowState())
608 , mWindowFlags(w->flags())610 , mWindowFlags(w->flags())
609 , mWindowVisible(false)611 , mWindowVisible(false)
612 , mDebugExtention(debugExt)
610 , mNativeInterface(native)613 , mNativeInterface(native)
611 , mSurface(new UbuntuSurface{this, eglDisplay, input, mirConnection})614 , mSurface(new UbuntuSurface{this, eglDisplay, input, mirConnection})
612 , mScale(1.0)615 , mScale(1.0)
@@ -819,6 +822,15 @@
819 return mSurface->format();822 return mSurface->format();
820}823}
821824
825QPoint UbuntuWindow::mapToGlobal(const QPoint &pos) const
826{
827 if (mDebugExtention) {
828 return mDebugExtention->mapSurfacePointToScreen(mSurface->mirSurface(), pos);
829 } else {
830 return pos;
831 }
832}
833
822void* UbuntuWindow::eglSurface() const834void* UbuntuWindow::eglSurface() const
823{835{
824 return mSurface->eglSurface();836 return mSurface->eglSurface();
825837
=== modified file 'src/ubuntumirclient/window.h'
--- src/ubuntumirclient/window.h 2016-09-21 10:25:33 +0000
+++ src/ubuntumirclient/window.h 2016-10-04 16:22:27 +0000
@@ -27,6 +27,7 @@
2727
28#include <EGL/egl.h>28#include <EGL/egl.h>
2929
30class UbuntuDebugExtension;
30class UbuntuNativeInterface;31class UbuntuNativeInterface;
31class UbuntuInput;32class UbuntuInput;
32class UbuntuScreen;33class UbuntuScreen;
@@ -39,7 +40,7 @@
39 Q_OBJECT40 Q_OBJECT
40public:41public:
41 UbuntuWindow(QWindow *w, UbuntuInput *input, UbuntuNativeInterface* native, EGLDisplay eglDisplay,42 UbuntuWindow(QWindow *w, UbuntuInput *input, UbuntuNativeInterface* native, EGLDisplay eglDisplay,
42 MirConnection *mirConnection);43 MirConnection *mirConnection, UbuntuDebugExtension *debugExt);
43 virtual ~UbuntuWindow();44 virtual ~UbuntuWindow();
4445
45 // QPlatformWindow methods.46 // QPlatformWindow methods.
@@ -52,6 +53,7 @@
52 void propagateSizeHints() override;53 void propagateSizeHints() override;
53 bool isExposed() const override;54 bool isExposed() const override;
5455
56 QPoint mapToGlobal(const QPoint &pos) const override;
55 QSurfaceFormat format() const override;57 QSurfaceFormat format() const override;
5658
57 // Additional Window properties exposed by NativeInterface59 // Additional Window properties exposed by NativeInterface
@@ -79,6 +81,7 @@
79 Qt::WindowFlags mWindowFlags;81 Qt::WindowFlags mWindowFlags;
80 bool mWindowVisible;82 bool mWindowVisible;
81 bool mWindowExposed;83 bool mWindowExposed;
84 UbuntuDebugExtension *mDebugExtention;
82 UbuntuNativeInterface *mNativeInterface;85 UbuntuNativeInterface *mNativeInterface;
83 std::unique_ptr<UbuntuSurface> mSurface;86 std::unique_ptr<UbuntuSurface> mSurface;
84 float mScale;87 float mScale;

Subscribers

People subscribed via source and target branches