Merge lp:~ricmm/hud/papi-v2 into lp:hud/14.10

Proposed by Ricardo Mendoza on 2014-05-29
Status: Merged
Approved by: Pete Woods on 2014-05-30
Approved revision: 393
Merged at revision: 392
Proposed branch: lp:~ricmm/hud/papi-v2
Merge into: lp:hud/14.10
Diff against target: 343 lines (+3/-270)
6 files modified
debian/control (+0/-1)
tests/unit/window-stack-bridge/CMakeLists.txt (+1/-6)
tests/unit/window-stack-bridge/TestPlatformApiWindowStack.cpp (+0/-54)
window-stack-bridge/CMakeLists.txt (+2/-10)
window-stack-bridge/PlatformApiWindowStack.cpp (+0/-127)
window-stack-bridge/PlatformApiWindowStack.h (+0/-72)
To merge this branch: bzr merge lp:~ricmm/hud/papi-v2
Reviewer Review Type Date Requested Status
Pete Woods (community) 2014-05-29 Approve on 2014-05-30
PS Jenkins bot (community) continuous-integration Approve on 2014-05-29
Review via email: mp+221326@code.launchpad.net

Commit message

Drop support for Platform API (SF)

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~ricmm/hud/papi-v2 updated on 2014-05-29
393. By Ricardo Mendoza on 2014-05-29

Remove tests

PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Pete Woods (pete-woods) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-03-05 12:06:48 +0000
3+++ debian/control 2014-05-29 09:06:35 +0000
4@@ -23,7 +23,6 @@
5 libqt5sql5-sqlite,
6 libqtdbustest1-dev (>= 0.2),
7 libqtdbusmock1-dev (>= 0.2),
8- libubuntu-platform-api1-dev [armhf],
9 libunityvoice1-dev,
10 pkg-config,
11 python-setuptools,
12
13=== modified file 'tests/unit/window-stack-bridge/CMakeLists.txt'
14--- tests/unit/window-stack-bridge/CMakeLists.txt 2013-12-13 18:31:07 +0000
15+++ tests/unit/window-stack-bridge/CMakeLists.txt 2014-05-29 09:06:35 +0000
16@@ -1,14 +1,9 @@
17-
18-if(${ENABLE_BAMF} OR ${ENABLE_PLATFORM_API})
19+if(${ENABLE_BAMF})
20
21 if(${ENABLE_BAMF})
22 list(APPEND UNIT_TESTS_SRC TestBamfWindowStack.cpp)
23 endif()
24
25-if(${ENABLE_PLATFORM_API})
26- list(APPEND UNIT_TESTS_SRC TestPlatformApiWindowStack.cpp)
27-endif()
28-
29 add_executable(
30 test-window-stack-bridge-unit-tests
31 ${UNIT_TESTS_SRC}
32
33=== removed file 'tests/unit/window-stack-bridge/TestPlatformApiWindowStack.cpp'
34--- tests/unit/window-stack-bridge/TestPlatformApiWindowStack.cpp 2013-11-27 14:28:43 +0000
35+++ tests/unit/window-stack-bridge/TestPlatformApiWindowStack.cpp 1970-01-01 00:00:00 +0000
36@@ -1,54 +0,0 @@
37-/*
38- * Copyright (C) 2013 Canonical, Ltd.
39- *
40- * This program is free software; you can redistribute it and/or modify
41- * it under the terms of the GNU General Public License as published by
42- * the Free Software Foundation; version 3.
43- *
44- * This program is distributed in the hope that it will be useful,
45- * but WITHOUT ANY WARRANTY; without even the implied warranty of
46- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47- * GNU General Public License for more details.
48- *
49- * You should have received a copy of the GNU General Public License
50- * along with this program. If not, see <http://www.gnu.org/licenses/>.
51- *
52- * Author: Pete Woods <pete.woods@canonical.com>
53- */
54-
55-#include <common/DBusTypes.h>
56-#include <common/WindowStackInterface.h>
57-#include <window-stack-bridge/PlatformApiWindowStack.h>
58-
59-#include <libqtdbustest/DBusTestRunner.h>
60-#include <libqtdbusmock/DBusMock.h>
61-#include <QSignalSpy>
62-#include <gtest/gtest.h>
63-#include <gmock/gmock.h>
64-
65-using namespace std;
66-using namespace testing;
67-using namespace hud::common;
68-using namespace QtDBusTest;
69-using namespace QtDBusMock;
70-
71-namespace {
72-
73-class TestPlatformApiWindowStack: public Test {
74-protected:
75- TestPlatformApiWindowStack() :
76- mock(dbus) {
77- }
78-
79- virtual ~TestPlatformApiWindowStack() {
80- }
81-
82- DBusTestRunner dbus;
83-
84- DBusMock mock;
85-};
86-
87-TEST_F(TestPlatformApiWindowStack, ExportsDBusInterface) {
88-}
89-
90-} // namespace
91
92=== modified file 'window-stack-bridge/CMakeLists.txt'
93--- window-stack-bridge/CMakeLists.txt 2013-10-31 13:41:01 +0000
94+++ window-stack-bridge/CMakeLists.txt 2014-05-29 09:06:35 +0000
95@@ -1,12 +1,9 @@
96
97 if(${ENABLE_BAMF})
98 add_definitions( -DENABLE_BAMF=1 )
99-elseif(${ENABLE_PLATFORM_API})
100- add_definitions( -DENABLE_PLATFORM_API=1 )
101- set(PLATFORM_API_LIBRARIES "-lubuntu_application_api")
102 endif()
103
104-if(${ENABLE_BAMF} OR ${ENABLE_PLATFORM_API})
105+if(${ENABLE_BAMF})
106
107 set(
108 WINDOW_STACK_BRIDGE_SOURCES
109@@ -29,10 +26,6 @@
110 )
111 endif()
112
113-if(${ENABLE_PLATFORM_API})
114- list(APPEND WINDOW_STACK_BRIDGE_SOURCES PlatformApiWindowStack.cpp)
115-endif()
116-
117 qt5_add_dbus_adaptor(
118 WINDOW_STACK_BRIDGE_SOURCES
119 ${WINDOW_STACK_XML}
120@@ -62,7 +55,6 @@
121 target_link_libraries(
122 window-stack-bridge
123 hud-common
124- ${PLATFORM_API_LIBRARIES}
125 )
126
127 add_executable(
128@@ -91,4 +83,4 @@
129 RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/hud"
130 )
131
132-endif()
133\ No newline at end of file
134+endif()
135
136=== removed file 'window-stack-bridge/PlatformApiWindowStack.cpp'
137--- window-stack-bridge/PlatformApiWindowStack.cpp 2013-10-31 13:41:01 +0000
138+++ window-stack-bridge/PlatformApiWindowStack.cpp 1970-01-01 00:00:00 +0000
139@@ -1,127 +0,0 @@
140-/*
141- * Copyright (C) 2013 Canonical, Ltd.
142- *
143- * This program is free software: you can redistribute it and/or modify it
144- * under the terms of the GNU General Public License version 3, as published
145- * by the Free Software Foundation.
146- *
147- * This program is distributed in the hope that it will be useful, but
148- * WITHOUT ANY WARRANTY; without even the implied warranties of
149- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
150- * PURPOSE. See the GNU General Public License for more details.
151- *
152- * You should have received a copy of the GNU General Public License along
153- * with this program. If not, see <http://www.gnu.org/licenses/>.
154- *
155- * Author: Pete Woods <pete.woods@canonical.com>
156- */
157-
158-#include <window-stack-bridge/PlatformApiWindowStack.h>
159-#include <common/Localisation.h>
160-
161-#include <QDebug>
162-#include <stdexcept>
163-#include <ubuntu/application/ui/stage.h>
164-
165-using namespace hud::common;
166-
167-PlatformApiWindowStack::PlatformApiWindowStack(
168- const QDBusConnection &connection, QObject *parent) :
169- AbstractWindowStack(connection, parent) {
170-
171- if (qgetenv("QT_QPA_PLATFORM") != "ubuntu") {
172- throw std::logic_error(
173- _("Incorrect QPA environment for Ubuntu platform API"));
174- }
175-
176- registerOnBus();
177-
178- m_observer_definition.on_session_requested = on_session_requested_cb;
179- m_observer_definition.on_session_born = on_session_born_cb;
180- m_observer_definition.on_session_unfocused = on_session_unfocused_cb;
181- m_observer_definition.on_session_focused = on_session_focused_cb;
182- m_observer_definition.on_session_died = on_session_died_cb;
183- m_observer_definition.on_keyboard_geometry_changed = 0;
184- m_observer_definition.on_session_requested_fullscreen = 0;
185- m_observer_definition.context = reinterpret_cast<void *>(this);
186-
187- ubuntu_ui_session_install_session_lifecycle_observer(
188- &m_observer_definition);
189-}
190-
191-PlatformApiWindowStack::~PlatformApiWindowStack() {
192-}
193-
194-QString PlatformApiWindowStack::GetAppIdFromPid(uint pid) {
195- // FIXME Not implemented
196- qDebug() << "GetAppIdFromPid";
197- return QString();
198-}
199-
200-QList<WindowInfo> PlatformApiWindowStack::GetWindowStack() {
201- // FIXME Not implemented
202- qDebug() << "GetWindowStack";
203- return QList<WindowInfo>();
204-}
205-
206-QStringList PlatformApiWindowStack::GetWindowProperties(uint windowId,
207- const QString &appId, const QStringList &names) {
208- // FIXME Not implemented
209- qDebug() << "GetWindowProperties:" << windowId << appId << names;
210- return QStringList();
211-}
212-
213-void PlatformApiWindowStack::onSessionRequested(
214- ubuntu_ui_well_known_application app) {
215- // FIXME Not implemented
216- qDebug() << "onSessionRequested";
217-}
218-
219-void PlatformApiWindowStack::onSessionBorn(ubuntu_ui_session_properties props) {
220- // FIXME Not implemented
221- qDebug() << "onSessionBorn";
222- //session_properties_get_window_id
223-}
224-
225-void PlatformApiWindowStack::onSessionUnfocused(
226- ubuntu_ui_session_properties props) {
227- // FIXME Not implemented
228- qDebug() << "onSessionUnfocused";
229-}
230-
231-void PlatformApiWindowStack::onSessionFocused(
232- ubuntu_ui_session_properties props) {
233- // FIXME Not implemented
234- qDebug() << "onSessionFocused";
235-}
236-
237-void PlatformApiWindowStack::onSessionDied(ubuntu_ui_session_properties props) {
238- // FIXME Not implemented
239- qDebug() << "onSessionDied";
240-}
241-
242-void PlatformApiWindowStack::on_session_requested_cb(
243- ubuntu_ui_well_known_application app, void* context) {
244- reinterpret_cast<PlatformApiWindowStack *>(context)->onSessionRequested(
245- app);
246-}
247-
248-void PlatformApiWindowStack::on_session_born_cb(
249- ubuntu_ui_session_properties props, void* context) {
250- reinterpret_cast<PlatformApiWindowStack *>(context)->onSessionBorn(props);
251-}
252-void PlatformApiWindowStack::on_session_unfocused_cb(
253- ubuntu_ui_session_properties props, void* context) {
254- reinterpret_cast<PlatformApiWindowStack *>(context)->onSessionUnfocused(
255- props);
256-}
257-void PlatformApiWindowStack::on_session_focused_cb(
258- ubuntu_ui_session_properties props, void* context) {
259- reinterpret_cast<PlatformApiWindowStack *>(context)->onSessionFocused(
260- props);
261-}
262-
263-void PlatformApiWindowStack::on_session_died_cb(
264- ubuntu_ui_session_properties props, void* context) {
265- reinterpret_cast<PlatformApiWindowStack *>(context)->onSessionDied(props);
266-}
267
268=== removed file 'window-stack-bridge/PlatformApiWindowStack.h'
269--- window-stack-bridge/PlatformApiWindowStack.h 2013-10-31 13:41:01 +0000
270+++ window-stack-bridge/PlatformApiWindowStack.h 1970-01-01 00:00:00 +0000
271@@ -1,72 +0,0 @@
272-/*
273- * Copyright (C) 2013 Canonical, Ltd.
274- *
275- * This program is free software: you can redistribute it and/or modify it
276- * under the terms of the GNU General Public License version 3, as published
277- * by the Free Software Foundation.
278- *
279- * This program is distributed in the hope that it will be useful, but
280- * WITHOUT ANY WARRANTY; without even the implied warranties of
281- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
282- * PURPOSE. See the GNU General Public License for more details.
283- *
284- * You should have received a copy of the GNU General Public License along
285- * with this program. If not, see <http://www.gnu.org/licenses/>.
286- *
287- * Author: Pete Woods <pete.woods@canonical.com>
288- */
289-
290-#ifndef PLATFORMAPIWINDOWSTACK_H_
291-#define PLATFORMAPIWINDOWSTACK_H_
292-
293-#include <window-stack-bridge/AbstractWindowStack.h>
294-
295-#include <ubuntu/ui/ubuntu_ui_session_service.h>
296-
297-class Q_DECL_EXPORT PlatformApiWindowStack: public AbstractWindowStack {
298-Q_OBJECT
299-
300-public:
301- explicit PlatformApiWindowStack(const QDBusConnection &connection,
302- QObject *parent = 0);
303-
304- virtual ~PlatformApiWindowStack();
305-
306-public Q_SLOTS:
307- virtual QString GetAppIdFromPid(uint pid);
308-
309- virtual QList<hud::common::WindowInfo> GetWindowStack();
310-
311- virtual QStringList GetWindowProperties(uint windowId, const QString &appId,
312- const QStringList &names);
313-
314-protected:
315- static void on_session_requested_cb(ubuntu_ui_well_known_application app,
316- void* context);
317-
318- void onSessionRequested(ubuntu_ui_well_known_application app);
319-
320- static void on_session_born_cb(ubuntu_ui_session_properties props,
321- void* context);
322-
323- void onSessionBorn(ubuntu_ui_session_properties props);
324-
325- static void on_session_unfocused_cb(ubuntu_ui_session_properties props,
326- void* context);
327-
328- void onSessionUnfocused(ubuntu_ui_session_properties props);
329-
330- static void on_session_focused_cb(ubuntu_ui_session_properties props,
331- void* context);
332-
333- void onSessionFocused(ubuntu_ui_session_properties props);
334-
335- static void on_session_died_cb(ubuntu_ui_session_properties props,
336- void* context);
337-
338- void onSessionDied(ubuntu_ui_session_properties props);
339-
340- ubuntu_ui_session_lifecycle_observer m_observer_definition;
341-};
342-
343-#endif /* PLATFORMAPIWINDOWSTACK_H_ */

Subscribers

People subscribed via source and target branches