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
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-24 17:17:29 +0000
4@@ -101,6 +101,11 @@
5 void placed_relative(mir::geometry::Rectangle const& placement) override;
6 #endif
7
8+#if MIR_SERVER_VERSION >= MIR_VERSION_NUMBER(0, 27, 0)
9+ void input_consumed(MirEvent const* event) override;
10+ void start_drag_and_drop(std::vector<uint8_t> const& handle) override;
11+#endif
12+
13 private:
14 QCursor createQCursorFromMirCursorImage(const mir::graphics::CursorImage &cursorImage);
15 QObject *m_listener;
16@@ -1210,6 +1215,16 @@
17 }
18 }
19
20+#if MIR_SERVER_VERSION >= MIR_VERSION_NUMBER(0, 27, 0)
21+void MirSurface::SurfaceObserverImpl::input_consumed(MirEvent const* /*event*/)
22+{
23+}
24+
25+void MirSurface::SurfaceObserverImpl::start_drag_and_drop(std::vector<uint8_t> const& /*handle*/)
26+{
27+}
28+#endif
29+
30 void MirSurface::requestFocus()
31 {
32 INFO_MSG << "()";
33
34=== modified file 'tests/framework/CMakeLists.txt'
35--- tests/framework/CMakeLists.txt 2017-03-20 16:19:42 +0000
36+++ tests/framework/CMakeLists.txt 2017-03-24 17:17:29 +0000
37@@ -34,7 +34,6 @@
38 mock_surface.cpp
39 mock_task_controller.cpp
40 mock_persistent_surface_store.cpp
41- stub_input_channel.cpp
42 fake_surface.h
43 fake_displayconfigurationoutput.h
44 qtmir_test.cpp
45
46=== modified file 'tests/framework/fake_surface.h'
47--- tests/framework/fake_surface.h 2017-01-18 21:24:15 +0000
48+++ tests/framework/fake_surface.h 2017-03-24 17:17:29 +0000
49@@ -21,8 +21,6 @@
50
51 #include <mir/scene/surface.h>
52 #include <mir/version.h>
53-#include "stub_input_channel.h"
54-
55 #include <memory>
56 #include <gmock/gmock.h>
57
58@@ -32,18 +30,17 @@
59 class FakeSurface : public Surface
60 {
61 public:
62- std::shared_ptr<mir::test::doubles::StubInputChannel> channel;
63 int fd;
64 mir::input::InputReceptionMode input_mode{mir::input::InputReceptionMode::normal};
65
66 FakeSurface(int fd=123)
67- : channel(std::make_shared<mir::test::doubles::StubInputChannel>(fd)), fd(fd)
68+ : fd(fd)
69 {
70 }
71
72 std::shared_ptr<mir::input::InputChannel> input_channel() const override
73 {
74- return channel;
75+ return {};
76 }
77
78 mir::input::InputReceptionMode reception_mode() const override
79
80=== modified file 'tests/framework/mock_mir_session.h'
81--- tests/framework/mock_mir_session.h 2017-02-02 13:13:39 +0000
82+++ tests/framework/mock_mir_session.h 2017-03-24 17:17:29 +0000
83@@ -72,6 +72,10 @@
84
85 void send_error(ClientVisibleError const&) override;
86
87+#if MIR_SERVER_VERSION >= MIR_VERSION_NUMBER(0, 27, 0)
88+ graphics::BufferID create_buffer(geometry::Size, MirPixelFormat) override { return {}; }
89+ graphics::BufferID create_buffer(geometry::Size, uint32_t, uint32_t) override {return {}; }
90+#endif
91
92 private:
93
94
95=== modified file 'tests/framework/mock_surface.h'
96--- tests/framework/mock_surface.h 2017-01-18 21:24:15 +0000
97+++ tests/framework/mock_surface.h 2017-03-24 17:17:29 +0000
98@@ -60,7 +60,9 @@
99 MOCK_CONST_METHOD0(cursor_image, std::shared_ptr<graphics::CursorImage>());
100 MOCK_METHOD1(add_observer, void(std::shared_ptr<SurfaceObserver> const& observer));
101 MOCK_METHOD1(remove_observer, void(std::weak_ptr<SurfaceObserver> const& observer));
102+#if MIR_SERVER_VERSION < MIR_VERSION_NUMBER(0, 27, 0)
103 MOCK_CONST_METHOD0(input_channel, std::shared_ptr<input::InputChannel>());
104+#endif
105 MOCK_METHOD1(set_reception_mode, void(input::InputReceptionMode mode));
106 MOCK_METHOD0(request_client_surface_close, void());
107 MOCK_CONST_METHOD1(buffers_ready_for_compositor, int(void const*));
108
109=== removed file 'tests/framework/stub_input_channel.cpp'
110--- tests/framework/stub_input_channel.cpp 2015-10-19 10:45:42 +0000
111+++ tests/framework/stub_input_channel.cpp 1970-01-01 00:00:00 +0000
112@@ -1,52 +0,0 @@
113-/*
114- * Copyright (C) 2015 Canonical, Ltd.
115- *
116- * This program is free software: you can redistribute it and/or modify it under
117- * the terms of the GNU Lesser General Public License version 3, as published by
118- * the Free Software Foundation.
119- *
120- * This program is distributed in the hope that it will be useful, but WITHOUT
121- * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
122- * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
123- * Lesser General Public License for more details.
124- *
125- * You should have received a copy of the GNU Lesser General Public License
126- * along with this program. If not, see <http://www.gnu.org/licenses/>.
127- */
128-
129-#include "stub_input_channel.h"
130-
131-namespace mir
132-{
133-namespace test
134-{
135-namespace doubles
136-{
137-
138-StubInputChannel::StubInputChannel(int fd)
139- : input_fd(fd)
140-{
141-}
142-
143-StubInputChannel::StubInputChannel()
144- : StubInputChannel(0)
145-{
146-}
147-
148-StubInputChannel::~StubInputChannel()
149-{
150-}
151-
152-int StubInputChannel::client_fd() const
153-{
154- return input_fd;
155-}
156-
157-int StubInputChannel::server_fd() const
158-{
159- return input_fd;
160-}
161-
162-} // namespace doubles
163-} // namespace test
164-} // namespace mir
165
166=== removed file 'tests/framework/stub_input_channel.h'
167--- tests/framework/stub_input_channel.h 2015-09-30 15:45:17 +0000
168+++ tests/framework/stub_input_channel.h 1970-01-01 00:00:00 +0000
169@@ -1,47 +0,0 @@
170-/*
171- * Copyright (C) 2013-2015 Canonical, Ltd.
172- *
173- * This program is free software: you can redistribute it and/or modify it under
174- * the terms of the GNU Lesser General Public License version 3, as published by
175- * the Free Software Foundation.
176- *
177- * This program is distributed in the hope that it will be useful, but WITHOUT
178- * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
179- * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
180- * Lesser General Public License for more details.
181- *
182- * You should have received a copy of the GNU Lesser General Public License
183- * along with this program. If not, see <http://www.gnu.org/licenses/>.
184- */
185-
186-#ifndef MIR_TEST_DOUBLES_STUB_INPUT_CHANNEL_H_
187-#define MIR_TEST_DOUBLES_STUB_INPUT_CHANNEL_H_
188-
189-#include "mir/input/input_channel.h"
190-
191-namespace mir
192-{
193-namespace test
194-{
195-namespace doubles
196-{
197-
198-struct StubInputChannel : public input::InputChannel
199-{
200- StubInputChannel(int fd);
201-
202- StubInputChannel();
203-
204- virtual ~StubInputChannel();
205-
206- int client_fd() const override;
207- int server_fd() const override;
208- int input_fd;
209-};
210-
211-}
212-}
213-} // namespace mir
214-
215-#endif // MIR_TEST_DOUBLES_STUB_INPUT_CHANNEL_H_
216-
217
218=== modified file 'tests/framework/stub_scene_surface.h'
219--- tests/framework/stub_scene_surface.h 2017-01-18 21:24:15 +0000
220+++ tests/framework/stub_scene_surface.h 2017-03-24 17:17:29 +0000
221@@ -20,7 +20,6 @@
222 #define MIR_SCENE_FAKESURFACE_H_
223
224 #include <mir/scene/surface.h>
225-#include "stub_input_channel.h"
226
227 #include <memory>
228 #include <gmock/gmock.h>
229@@ -31,7 +30,6 @@
230 class FakeSurface : public Surface
231 {
232 public:
233- std::shared_ptr<mir::test::doubles::StubInputChannel> channel;
234 int fd;
235 mir::input::InputReceptionMode input_mode{mir::input::InputReceptionMode::normal};
236

Subscribers

People subscribed via source and target branches