Merge lp:~gerboland/qtubuntu/fix-autopilot into lp:qtubuntu

Proposed by Gerry Boland
Status: Merged
Approved by: Daniel d'Andrada
Approved revision: 359
Merged at revision: 359
Proposed branch: lp:~gerboland/qtubuntu/fix-autopilot
Merge into: lp:qtubuntu
Diff against target: 41 lines (+10/-0)
3 files modified
src/ubuntumirclient/debugextension.cpp (+5/-0)
src/ubuntumirclient/debugextension.h (+2/-0)
src/ubuntumirclient/integration.cpp (+3/-0)
To merge this branch: bzr merge lp:~gerboland/qtubuntu/fix-autopilot
Reviewer Review Type Date Requested Status
Daniel d'Andrada (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+312307@code.launchpad.net

Commit message

Use debug extension only if mir-debug loaded

Fix logic error where enabling testability would cause debug extension to be used, even if it didn't load mir-debug extension.

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

PASSED: Continuous integration, rev:359
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/161/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3453
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3481
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3328
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3328/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3328
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3328/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3328
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3328/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3328
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3328/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3328
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3328/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3328
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3328/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Not sure if isEnabled() is the most appropriate name for this method but it will do.

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

something like loadedSuccessfully() would make code in src/ubuntumirclient/integration.cpp easier to understand.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ubuntumirclient/debugextension.cpp'
2--- src/ubuntumirclient/debugextension.cpp 2016-09-22 19:45:48 +0000
3+++ src/ubuntumirclient/debugextension.cpp 2016-12-01 22:31:07 +0000
4@@ -39,6 +39,11 @@
5 }
6 }
7
8+bool UbuntuDebugExtension::isEnabled() const
9+{
10+ return m_mirclientDebug.isLoaded() && m_mapper;
11+}
12+
13 QPoint UbuntuDebugExtension::mapSurfacePointToScreen(MirSurface *surface, const QPoint &point)
14 {
15 if (!m_mapper) {
16
17=== modified file 'src/ubuntumirclient/debugextension.h'
18--- src/ubuntumirclient/debugextension.h 2016-06-24 12:36:24 +0000
19+++ src/ubuntumirclient/debugextension.h 2016-12-01 22:31:07 +0000
20@@ -29,6 +29,8 @@
21 public:
22 UbuntuDebugExtension();
23
24+ bool isEnabled() const;
25+
26 QPoint mapSurfacePointToScreen(MirSurface *, const QPoint &point);
27
28 private:
29
30=== modified file 'src/ubuntumirclient/integration.cpp'
31--- src/ubuntumirclient/integration.cpp 2016-11-23 12:10:57 +0000
32+++ src/ubuntumirclient/integration.cpp 2016-12-01 22:31:07 +0000
33@@ -113,6 +113,9 @@
34 }
35 if (testability) {
36 mDebugExtension.reset(new UbuntuDebugExtension);
37+ if (!mDebugExtension->isEnabled()) {
38+ mDebugExtension.reset();
39+ }
40 }
41 }
42

Subscribers

People subscribed via source and target branches