Merge lp:~alan-griffiths/qtmir/compatibility into lp:qtmir

Proposed by Alan Griffiths
Status: Merged
Approved by: Gerry Boland
Approved revision: 628
Merged at revision: 634
Proposed branch: lp:~alan-griffiths/qtmir/compatibility
Merge into: lp:qtmir
Prerequisite: lp:~alan-griffiths/qtmir/future-proof
Diff against target: 235 lines (+23/-107)
8 files modified
src/modules/Unity/Application/mirsurface.cpp (+15/-0)
tests/framework/CMakeLists.txt (+0/-1)
tests/framework/fake_surface.h (+2/-5)
tests/framework/mock_mir_session.h (+4/-0)
tests/framework/mock_surface.h (+2/-0)
tests/framework/stub_input_channel.cpp (+0/-52)
tests/framework/stub_input_channel.h (+0/-47)
tests/framework/stub_scene_surface.h (+0/-2)
To merge this branch: bzr merge lp:~alan-griffiths/qtmir/compatibility
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Unity8 CI Bot (community) continuous-integration Approve
Review via email: mp+320965@code.launchpad.net

Commit message

Compatibility with lp:mir and lp:~alan-griffiths/miral/1.3

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

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

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

review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

Nice, thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/modules/Unity/Application/mirsurface.cpp'
--- src/modules/Unity/Application/mirsurface.cpp 2017-03-20 21:15:13 +0000
+++ src/modules/Unity/Application/mirsurface.cpp 2017-03-24 17:17:29 +0000
@@ -101,6 +101,11 @@
101 void placed_relative(mir::geometry::Rectangle const& placement) override;101 void placed_relative(mir::geometry::Rectangle const& placement) override;
102#endif102#endif
103103
104#if MIR_SERVER_VERSION >= MIR_VERSION_NUMBER(0, 27, 0)
105 void input_consumed(MirEvent const* event) override;
106 void start_drag_and_drop(std::vector<uint8_t> const& handle) override;
107#endif
108
104private:109private:
105 QCursor createQCursorFromMirCursorImage(const mir::graphics::CursorImage &cursorImage);110 QCursor createQCursorFromMirCursorImage(const mir::graphics::CursorImage &cursorImage);
106 QObject *m_listener;111 QObject *m_listener;
@@ -1210,6 +1215,16 @@
1210 }1215 }
1211}1216}
12121217
1218#if MIR_SERVER_VERSION >= MIR_VERSION_NUMBER(0, 27, 0)
1219void MirSurface::SurfaceObserverImpl::input_consumed(MirEvent const* /*event*/)
1220{
1221}
1222
1223void MirSurface::SurfaceObserverImpl::start_drag_and_drop(std::vector<uint8_t> const& /*handle*/)
1224{
1225}
1226#endif
1227
1213void MirSurface::requestFocus()1228void MirSurface::requestFocus()
1214{1229{
1215 INFO_MSG << "()";1230 INFO_MSG << "()";
12161231
=== modified file 'tests/framework/CMakeLists.txt'
--- tests/framework/CMakeLists.txt 2017-03-20 16:19:42 +0000
+++ tests/framework/CMakeLists.txt 2017-03-24 17:17:29 +0000
@@ -34,7 +34,6 @@
34 mock_surface.cpp34 mock_surface.cpp
35 mock_task_controller.cpp35 mock_task_controller.cpp
36 mock_persistent_surface_store.cpp36 mock_persistent_surface_store.cpp
37 stub_input_channel.cpp
38 fake_surface.h37 fake_surface.h
39 fake_displayconfigurationoutput.h38 fake_displayconfigurationoutput.h
40 qtmir_test.cpp39 qtmir_test.cpp
4140
=== modified file 'tests/framework/fake_surface.h'
--- tests/framework/fake_surface.h 2017-01-18 21:24:15 +0000
+++ tests/framework/fake_surface.h 2017-03-24 17:17:29 +0000
@@ -21,8 +21,6 @@
2121
22#include <mir/scene/surface.h>22#include <mir/scene/surface.h>
23#include <mir/version.h>23#include <mir/version.h>
24#include "stub_input_channel.h"
25
26#include <memory>24#include <memory>
27#include <gmock/gmock.h>25#include <gmock/gmock.h>
2826
@@ -32,18 +30,17 @@
32class FakeSurface : public Surface30class FakeSurface : public Surface
33{31{
34public:32public:
35 std::shared_ptr<mir::test::doubles::StubInputChannel> channel;
36 int fd;33 int fd;
37 mir::input::InputReceptionMode input_mode{mir::input::InputReceptionMode::normal};34 mir::input::InputReceptionMode input_mode{mir::input::InputReceptionMode::normal};
3835
39 FakeSurface(int fd=123)36 FakeSurface(int fd=123)
40 : channel(std::make_shared<mir::test::doubles::StubInputChannel>(fd)), fd(fd)37 : fd(fd)
41 {38 {
42 }39 }
4340
44 std::shared_ptr<mir::input::InputChannel> input_channel() const override41 std::shared_ptr<mir::input::InputChannel> input_channel() const override
45 {42 {
46 return channel;43 return {};
47 }44 }
4845
49 mir::input::InputReceptionMode reception_mode() const override46 mir::input::InputReceptionMode reception_mode() const override
5047
=== modified file 'tests/framework/mock_mir_session.h'
--- tests/framework/mock_mir_session.h 2017-02-02 13:13:39 +0000
+++ tests/framework/mock_mir_session.h 2017-03-24 17:17:29 +0000
@@ -72,6 +72,10 @@
7272
73 void send_error(ClientVisibleError const&) override;73 void send_error(ClientVisibleError const&) override;
7474
75#if MIR_SERVER_VERSION >= MIR_VERSION_NUMBER(0, 27, 0)
76 graphics::BufferID create_buffer(geometry::Size, MirPixelFormat) override { return {}; }
77 graphics::BufferID create_buffer(geometry::Size, uint32_t, uint32_t) override {return {}; }
78#endif
7579
76private:80private:
7781
7882
=== modified file 'tests/framework/mock_surface.h'
--- tests/framework/mock_surface.h 2017-01-18 21:24:15 +0000
+++ tests/framework/mock_surface.h 2017-03-24 17:17:29 +0000
@@ -60,7 +60,9 @@
60 MOCK_CONST_METHOD0(cursor_image, std::shared_ptr<graphics::CursorImage>());60 MOCK_CONST_METHOD0(cursor_image, std::shared_ptr<graphics::CursorImage>());
61 MOCK_METHOD1(add_observer, void(std::shared_ptr<SurfaceObserver> const& observer));61 MOCK_METHOD1(add_observer, void(std::shared_ptr<SurfaceObserver> const& observer));
62 MOCK_METHOD1(remove_observer, void(std::weak_ptr<SurfaceObserver> const& observer));62 MOCK_METHOD1(remove_observer, void(std::weak_ptr<SurfaceObserver> const& observer));
63#if MIR_SERVER_VERSION < MIR_VERSION_NUMBER(0, 27, 0)
63 MOCK_CONST_METHOD0(input_channel, std::shared_ptr<input::InputChannel>());64 MOCK_CONST_METHOD0(input_channel, std::shared_ptr<input::InputChannel>());
65#endif
64 MOCK_METHOD1(set_reception_mode, void(input::InputReceptionMode mode));66 MOCK_METHOD1(set_reception_mode, void(input::InputReceptionMode mode));
65 MOCK_METHOD0(request_client_surface_close, void());67 MOCK_METHOD0(request_client_surface_close, void());
66 MOCK_CONST_METHOD1(buffers_ready_for_compositor, int(void const*));68 MOCK_CONST_METHOD1(buffers_ready_for_compositor, int(void const*));
6769
=== removed file 'tests/framework/stub_input_channel.cpp'
--- tests/framework/stub_input_channel.cpp 2015-10-19 10:45:42 +0000
+++ tests/framework/stub_input_channel.cpp 1970-01-01 00:00:00 +0000
@@ -1,52 +0,0 @@
1/*
2 * Copyright (C) 2015 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 "stub_input_channel.h"
18
19namespace mir
20{
21namespace test
22{
23namespace doubles
24{
25
26StubInputChannel::StubInputChannel(int fd)
27 : input_fd(fd)
28{
29}
30
31StubInputChannel::StubInputChannel()
32 : StubInputChannel(0)
33{
34}
35
36StubInputChannel::~StubInputChannel()
37{
38}
39
40int StubInputChannel::client_fd() const
41{
42 return input_fd;
43}
44
45int StubInputChannel::server_fd() const
46{
47 return input_fd;
48}
49
50} // namespace doubles
51} // namespace test
52} // namespace mir
530
=== removed file 'tests/framework/stub_input_channel.h'
--- tests/framework/stub_input_channel.h 2015-09-30 15:45:17 +0000
+++ tests/framework/stub_input_channel.h 1970-01-01 00:00:00 +0000
@@ -1,47 +0,0 @@
1/*
2 * Copyright (C) 2013-2015 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 MIR_TEST_DOUBLES_STUB_INPUT_CHANNEL_H_
18#define MIR_TEST_DOUBLES_STUB_INPUT_CHANNEL_H_
19
20#include "mir/input/input_channel.h"
21
22namespace mir
23{
24namespace test
25{
26namespace doubles
27{
28
29struct StubInputChannel : public input::InputChannel
30{
31 StubInputChannel(int fd);
32
33 StubInputChannel();
34
35 virtual ~StubInputChannel();
36
37 int client_fd() const override;
38 int server_fd() const override;
39 int input_fd;
40};
41
42}
43}
44} // namespace mir
45
46#endif // MIR_TEST_DOUBLES_STUB_INPUT_CHANNEL_H_
47
480
=== modified file 'tests/framework/stub_scene_surface.h'
--- tests/framework/stub_scene_surface.h 2017-01-18 21:24:15 +0000
+++ tests/framework/stub_scene_surface.h 2017-03-24 17:17:29 +0000
@@ -20,7 +20,6 @@
20#define MIR_SCENE_FAKESURFACE_H_20#define MIR_SCENE_FAKESURFACE_H_
2121
22#include <mir/scene/surface.h>22#include <mir/scene/surface.h>
23#include "stub_input_channel.h"
2423
25#include <memory>24#include <memory>
26#include <gmock/gmock.h>25#include <gmock/gmock.h>
@@ -31,7 +30,6 @@
31class FakeSurface : public Surface30class FakeSurface : public Surface
32{31{
33public:32public:
34 std::shared_ptr<mir::test::doubles::StubInputChannel> channel;
35 int fd;33 int fd;
36 mir::input::InputReceptionMode input_mode{mir::input::InputReceptionMode::normal};34 mir::input::InputReceptionMode input_mode{mir::input::InputReceptionMode::normal};
3735

Subscribers

People subscribed via source and target branches