Merge lp:~gerboland/qtubuntu/fix-debug-mode-56 into lp:qtubuntu

Proposed by Gerry Boland on 2016-11-16
Status: Merged
Approved by: Daniel d'Andrada on 2016-11-16
Approved revision: 352
Merged at revision: 357
Proposed branch: lp:~gerboland/qtubuntu/fix-debug-mode-56
Merge into: lp:qtubuntu
Diff against target: 33 lines (+12/-0)
2 files modified
src/ubuntumirclient/window.cpp (+11/-0)
src/ubuntumirclient/window.h (+1/-0)
To merge this branch: bzr merge lp:~gerboland/qtubuntu/fix-debug-mode-56
Reviewer Review Type Date Requested Status
Daniel d'Andrada (community) 2016-11-16 Approve on 2016-11-16
Unity8 CI Bot continuous-integration Approve on 2016-11-16
Review via email: mp+311043@code.launchpad.net

Commit message

Fix for Qt5.6 mapToGlobal: QPlatformWindow::geometry() expected to be in absolute screens coordinates

Needed for Autopilot

Description of the change

Handy test application:
lp:~gerboland/+junk/absolute-position-test
It will print where you tap in absolute coordinates.

To post a comment you must log in.
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:352
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/160/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3298
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3326
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3178
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3178/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3178
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3178/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3178
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3178/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3178
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3178/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3178
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3178/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3178
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3178/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3178
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3178/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3178
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3178/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3178
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3178/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Daniel d'Andrada (dandrader) wrote :

Looks good to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ubuntumirclient/window.cpp'
2--- src/ubuntumirclient/window.cpp 2016-10-24 11:32:31 +0000
3+++ src/ubuntumirclient/window.cpp 2016-11-16 16:58:48 +0000
4@@ -755,6 +755,17 @@
5 }
6 }
7
8+QRect UbuntuWindow::geometry() const
9+{
10+ if (mDebugExtention) {
11+ auto geom = QPlatformWindow::geometry();
12+ geom.moveTopLeft(mDebugExtention->mapSurfacePointToScreen(mSurface->mirSurface(), QPoint(0,0)));
13+ return geom;
14+ } else {
15+ return QPlatformWindow::geometry();
16+ }
17+}
18+
19 void UbuntuWindow::setGeometry(const QRect &rect)
20 {
21 QMutexLocker lock(&mMutex);
22
23=== modified file 'src/ubuntumirclient/window.h'
24--- src/ubuntumirclient/window.h 2016-10-04 16:04:53 +0000
25+++ src/ubuntumirclient/window.h 2016-11-16 16:58:48 +0000
26@@ -45,6 +45,7 @@
27
28 // QPlatformWindow methods.
29 WId winId() const override;
30+ QRect geometry() const override;
31 void setGeometry(const QRect&) override;
32 void setWindowState(Qt::WindowState state) override;
33 void setWindowFlags(Qt::WindowFlags flags) override;

Subscribers

People subscribed via source and target branches