Merge lp:~dandrader/unity-api/detachPromptSurfaces into lp:unity-api

Proposed by Daniel d'Andrada
Status: Merged
Approved by: MichaƂ Sawicz
Approved revision: 232
Merged at revision: 230
Proposed branch: lp:~dandrader/unity-api/detachPromptSurfaces
Merge into: lp:unity-api
Diff against target: 135 lines (+33/-9)
6 files modified
debian/changelog (+7/-0)
include/unity/shell/application/ApplicationInfoInterface.h (+6/-0)
include/unity/shell/application/CMakeLists.txt (+1/-1)
include/unity/shell/application/MirSurfaceInterface.h (+0/-7)
include/unity/shell/application/MirSurfaceListInterface.h (+17/-0)
test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h (+2/-1)
To merge this branch: bzr merge lp:~dandrader/unity-api/detachPromptSurfaces
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Nick Dedekind (community) Approve
Review via email: mp+294955@code.launchpad.net

Commit message

Moved prompt surfaces to ApplicationInfo and added MirSurfaceListInterface::first

- Moved promptSurfaceList from MirSurfaceInterface to ApplicationInfoInterface
- Added MirSurfaceListInterface::first property

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
232. By Daniel d'Andrada

update application version

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

Don't really like you adding the "first" property just for one usage; but I guess I see the merit.

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:232
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/79/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1661
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1612
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1612
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1605
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1605/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1605
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1605/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1605
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1605/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1605
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1605/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1605
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1605/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1605
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1605/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/79/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2016-04-26 15:31:50 +0000
+++ debian/changelog 2016-05-17 19:40:32 +0000
@@ -1,3 +1,10 @@
1unity-api (7.112) UNRELEASED; urgency=medium
2
3 * Move promptSurfaceList from MirSurfaceInterface to ApplicationInfoInterface
4 * Added MirSurfaceListInterface::first property
5
6 -- Daniel d'Andrada <daniel.dandrada@canonical.com> Tue, 17 May 2016 09:54:25 -0300
7
1unity-api (7.111+16.04.20160426.2-0ubuntu1) xenial; urgency=medium8unity-api (7.111+16.04.20160426.2-0ubuntu1) xenial; urgency=medium
29
3 [ Pawel Stolowski ]10 [ Pawel Stolowski ]
411
=== modified file 'include/unity/shell/application/ApplicationInfoInterface.h'
--- include/unity/shell/application/ApplicationInfoInterface.h 2016-04-13 16:47:27 +0000
+++ include/unity/shell/application/ApplicationInfoInterface.h 2016-05-17 19:40:32 +0000
@@ -224,6 +224,11 @@
224 */224 */
225 Q_PROPERTY(unity::shell::application::MirSurfaceListInterface* surfaceList READ surfaceList CONSTANT)225 Q_PROPERTY(unity::shell::application::MirSurfaceListInterface* surfaceList READ surfaceList CONSTANT)
226226
227 /**
228 * @brief The list of top-level prompt surfaces for this application
229 */
230 Q_PROPERTY(unity::shell::application::MirSurfaceListInterface* promptSurfaceList READ promptSurfaceList CONSTANT)
231
227protected:232protected:
228 /// @cond233 /// @cond
229 ApplicationInfoInterface(const QString &appId, QObject* parent = 0): QObject(parent) { Q_UNUSED(appId) }234 ApplicationInfoInterface(const QString &appId, QObject* parent = 0): QObject(parent) { Q_UNUSED(appId) }
@@ -301,6 +306,7 @@
301 virtual QSize initialSurfaceSize() const = 0;306 virtual QSize initialSurfaceSize() const = 0;
302 virtual void setInitialSurfaceSize(const QSize &size) = 0;307 virtual void setInitialSurfaceSize(const QSize &size) = 0;
303 virtual MirSurfaceListInterface* surfaceList() = 0;308 virtual MirSurfaceListInterface* surfaceList() = 0;
309 virtual MirSurfaceListInterface* promptSurfaceList() = 0;
304 /// @endcond310 /// @endcond
305311
306Q_SIGNALS:312Q_SIGNALS:
307313
=== modified file 'include/unity/shell/application/CMakeLists.txt'
--- include/unity/shell/application/CMakeLists.txt 2016-04-13 16:40:06 +0000
+++ include/unity/shell/application/CMakeLists.txt 2016-05-17 19:40:32 +0000
@@ -7,7 +7,7 @@
77
8set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)8set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
99
10set(VERSION 15)10set(VERSION 16)
11set(PKGCONFIG_NAME "unity-shell-application")11set(PKGCONFIG_NAME "unity-shell-application")
12set(PKGCONFIG_DESCRIPTION "Unity shell Application APIs")12set(PKGCONFIG_DESCRIPTION "Unity shell Application APIs")
13set(PKGCONFIG_REQUIRES "Qt5Core")13set(PKGCONFIG_REQUIRES "Qt5Core")
1414
=== modified file 'include/unity/shell/application/MirSurfaceInterface.h'
--- include/unity/shell/application/MirSurfaceInterface.h 2016-04-13 16:47:27 +0000
+++ include/unity/shell/application/MirSurfaceInterface.h 2016-05-17 19:40:32 +0000
@@ -134,11 +134,6 @@
134 */134 */
135 Q_PROPERTY(bool focused READ focused NOTIFY focusedChanged)135 Q_PROPERTY(bool focused READ focused NOTIFY focusedChanged)
136136
137 /**
138 * @brief The list of prompt surfaces under this one
139 */
140 Q_PROPERTY(unity::shell::application::MirSurfaceListInterface* promptSurfaceList READ promptSurfaceList CONSTANT)
141
142public:137public:
143 /// @cond138 /// @cond
144 MirSurfaceInterface(QObject *parent = nullptr) : QObject(parent) {}139 MirSurfaceInterface(QObject *parent = nullptr) : QObject(parent) {}
@@ -175,8 +170,6 @@
175 virtual Mir::ShellChrome shellChrome() const = 0;170 virtual Mir::ShellChrome shellChrome() const = 0;
176171
177 virtual bool focused() const = 0;172 virtual bool focused() const = 0;
178
179 virtual MirSurfaceListInterface* promptSurfaceList() = 0;
180 /// @endcond173 /// @endcond
181174
182 /**175 /**
183176
=== modified file 'include/unity/shell/application/MirSurfaceListInterface.h'
--- include/unity/shell/application/MirSurfaceListInterface.h 2016-04-13 16:47:27 +0000
+++ include/unity/shell/application/MirSurfaceListInterface.h 2016-05-17 19:40:32 +0000
@@ -39,6 +39,14 @@
39 * This is the same as rowCount, added in order to keep compatibility with QML ListModels.39 * This is the same as rowCount, added in order to keep compatibility with QML ListModels.
40 */40 */
41 Q_PROPERTY(int count READ count NOTIFY countChanged)41 Q_PROPERTY(int count READ count NOTIFY countChanged)
42
43 /**
44 * @brief The first (index 0) surface in this model
45 *
46 * Will always match the result of get(0). But being a property, it's more appropriate
47 * for use in qml bindinds (JS expression gets reevaluated when it changes)
48 */
49 Q_PROPERTY(unity::shell::application::MirSurfaceInterface* first READ first NOTIFY firstChanged)
42public:50public:
43 /**51 /**
44 * @brief The Roles supported by the model52 * @brief The Roles supported by the model
@@ -69,11 +77,20 @@
69 }77 }
7078
71 int count() const { return rowCount(); }79 int count() const { return rowCount(); }
80
81 MirSurfaceInterface *first() {
82 if (rowCount() > 0) {
83 return get(0);
84 } else {
85 return nullptr;
86 }
87 }
72 /// @endcond88 /// @endcond
7389
74Q_SIGNALS:90Q_SIGNALS:
75 /// @cond91 /// @cond
76 void countChanged();92 void countChanged();
93 void firstChanged();
77 /// @endcond94 /// @endcond
78};95};
7996
8097
=== modified file 'test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h'
--- test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h 2016-04-13 16:47:27 +0000
+++ test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h 2016-05-17 19:40:32 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2013,2015 Canonical Ltd.2 * Copyright 2013,2015,2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -63,6 +63,7 @@
63 void setInitialSurfaceSize(const QSize &) override {}63 void setInitialSurfaceSize(const QSize &) override {}
6464
65 MirSurfaceListInterface* surfaceList() override { return nullptr; }65 MirSurfaceListInterface* surfaceList() override { return nullptr; }
66 MirSurfaceListInterface* promptSurfaceList() override { return nullptr; }
6667
67private:68private:
68 QString m_appId;69 QString m_appId;

Subscribers

People subscribed via source and target branches

to all changes: