Merge lp:~andreas-pokorny/qtmir/fix-1557634 into lp:qtmir

Proposed by Andreas Pokorny on 2017-03-27
Status: Merged
Approved by: Daniel d'Andrada on 2017-03-27
Approved revision: 626
Merged at revision: 632
Proposed branch: lp:~andreas-pokorny/qtmir/fix-1557634
Merge into: lp:qtmir
Diff against target: 40 lines (+17/-3)
2 files modified
src/modules/Unity/Application/mirsurface.cpp (+8/-1)
src/platforms/mirserver/inputdeviceobserver.cpp (+9/-2)
To merge this branch: bzr merge lp:~andreas-pokorny/qtmir/fix-1557634
Reviewer Review Type Date Requested Status
Daniel d'Andrada (community) 2017-03-27 Approve on 2017-03-27
Unity8 CI Bot continuous-integration Approve on 2017-03-27
Review via email: mp+321050@code.launchpad.net

Commit message

Report and consume exception that may occur on constructing a keymap

Description of the change

This handles construction exceptions that are thrown in mir when a keymap is configured that xkbcommon cannot find.

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

FAILED: Continuous integration, rev:626
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/637/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/4706/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4734
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4556
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4556/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4556
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4556/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4556
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4556/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4556
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4556/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4556/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4556
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4556/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:626
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/638/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4707
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4735
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4558
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4558/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4558
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4558/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4558
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4558/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4558
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4558/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4558
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4558/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4558
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4558/artifact/output/*zip*/output.zip

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

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

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/modules/Unity/Application/mirsurface.cpp'
2--- src/modules/Unity/Application/mirsurface.cpp 2017-03-20 21:15:13 +0000
3+++ src/modules/Unity/Application/mirsurface.cpp 2017-03-27 10:09:19 +0000
4@@ -806,7 +806,14 @@
5 return;
6 }
7
8- m_surface->set_keymap(MirInputDeviceId(), "", layout.toStdString(), variant.toStdString(), "");
9+ try
10+ {
11+ m_surface->set_keymap(MirInputDeviceId(), "", layout.toStdString(), variant.toStdString(), "");
12+ }
13+ catch(std::exception const& e)
14+ {
15+ WARNING_MSG << "Setting keymap failed:" << e.what();
16+ }
17 }
18
19 QCursor MirSurface::cursor() const
20
21=== modified file 'src/platforms/mirserver/inputdeviceobserver.cpp'
22--- src/platforms/mirserver/inputdeviceobserver.cpp 2017-01-26 17:50:12 +0000
23+++ src/platforms/mirserver/inputdeviceobserver.cpp 2017-03-27 10:09:19 +0000
24@@ -100,7 +100,14 @@
25 keymap.layout = layout.toStdString();
26 keymap.variant = variant.toStdString();
27
28- device->apply_keyboard_configuration(std::move(keymap));
29- qCDebug(QTMIR_MIR_KEYMAP) << "Keymap applied";
30+ try
31+ {
32+ device->apply_keyboard_configuration(std::move(keymap));
33+ qCDebug(QTMIR_MIR_KEYMAP) << "Keymap applied";
34+ }
35+ catch(std::exception const& e)
36+ {
37+ qCWarning(QTMIR_MIR_KEYMAP) << "Keymap could not be applied:" << e.what();
38+ }
39 }
40 }

Subscribers

People subscribed via source and target branches