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
1=== modified file 'debian/changelog'
2--- debian/changelog 2016-04-26 15:31:50 +0000
3+++ debian/changelog 2016-05-17 19:40:32 +0000
4@@ -1,3 +1,10 @@
5+unity-api (7.112) UNRELEASED; urgency=medium
6+
7+ * Move promptSurfaceList from MirSurfaceInterface to ApplicationInfoInterface
8+ * Added MirSurfaceListInterface::first property
9+
10+ -- Daniel d'Andrada <daniel.dandrada@canonical.com> Tue, 17 May 2016 09:54:25 -0300
11+
12 unity-api (7.111+16.04.20160426.2-0ubuntu1) xenial; urgency=medium
13
14 [ Pawel Stolowski ]
15
16=== modified file 'include/unity/shell/application/ApplicationInfoInterface.h'
17--- include/unity/shell/application/ApplicationInfoInterface.h 2016-04-13 16:47:27 +0000
18+++ include/unity/shell/application/ApplicationInfoInterface.h 2016-05-17 19:40:32 +0000
19@@ -224,6 +224,11 @@
20 */
21 Q_PROPERTY(unity::shell::application::MirSurfaceListInterface* surfaceList READ surfaceList CONSTANT)
22
23+ /**
24+ * @brief The list of top-level prompt surfaces for this application
25+ */
26+ Q_PROPERTY(unity::shell::application::MirSurfaceListInterface* promptSurfaceList READ promptSurfaceList CONSTANT)
27+
28 protected:
29 /// @cond
30 ApplicationInfoInterface(const QString &appId, QObject* parent = 0): QObject(parent) { Q_UNUSED(appId) }
31@@ -301,6 +306,7 @@
32 virtual QSize initialSurfaceSize() const = 0;
33 virtual void setInitialSurfaceSize(const QSize &size) = 0;
34 virtual MirSurfaceListInterface* surfaceList() = 0;
35+ virtual MirSurfaceListInterface* promptSurfaceList() = 0;
36 /// @endcond
37
38 Q_SIGNALS:
39
40=== modified file 'include/unity/shell/application/CMakeLists.txt'
41--- include/unity/shell/application/CMakeLists.txt 2016-04-13 16:40:06 +0000
42+++ include/unity/shell/application/CMakeLists.txt 2016-05-17 19:40:32 +0000
43@@ -7,7 +7,7 @@
44
45 set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
46
47-set(VERSION 15)
48+set(VERSION 16)
49 set(PKGCONFIG_NAME "unity-shell-application")
50 set(PKGCONFIG_DESCRIPTION "Unity shell Application APIs")
51 set(PKGCONFIG_REQUIRES "Qt5Core")
52
53=== modified file 'include/unity/shell/application/MirSurfaceInterface.h'
54--- include/unity/shell/application/MirSurfaceInterface.h 2016-04-13 16:47:27 +0000
55+++ include/unity/shell/application/MirSurfaceInterface.h 2016-05-17 19:40:32 +0000
56@@ -134,11 +134,6 @@
57 */
58 Q_PROPERTY(bool focused READ focused NOTIFY focusedChanged)
59
60- /**
61- * @brief The list of prompt surfaces under this one
62- */
63- Q_PROPERTY(unity::shell::application::MirSurfaceListInterface* promptSurfaceList READ promptSurfaceList CONSTANT)
64-
65 public:
66 /// @cond
67 MirSurfaceInterface(QObject *parent = nullptr) : QObject(parent) {}
68@@ -175,8 +170,6 @@
69 virtual Mir::ShellChrome shellChrome() const = 0;
70
71 virtual bool focused() const = 0;
72-
73- virtual MirSurfaceListInterface* promptSurfaceList() = 0;
74 /// @endcond
75
76 /**
77
78=== modified file 'include/unity/shell/application/MirSurfaceListInterface.h'
79--- include/unity/shell/application/MirSurfaceListInterface.h 2016-04-13 16:47:27 +0000
80+++ include/unity/shell/application/MirSurfaceListInterface.h 2016-05-17 19:40:32 +0000
81@@ -39,6 +39,14 @@
82 * This is the same as rowCount, added in order to keep compatibility with QML ListModels.
83 */
84 Q_PROPERTY(int count READ count NOTIFY countChanged)
85+
86+ /**
87+ * @brief The first (index 0) surface in this model
88+ *
89+ * Will always match the result of get(0). But being a property, it's more appropriate
90+ * for use in qml bindinds (JS expression gets reevaluated when it changes)
91+ */
92+ Q_PROPERTY(unity::shell::application::MirSurfaceInterface* first READ first NOTIFY firstChanged)
93 public:
94 /**
95 * @brief The Roles supported by the model
96@@ -69,11 +77,20 @@
97 }
98
99 int count() const { return rowCount(); }
100+
101+ MirSurfaceInterface *first() {
102+ if (rowCount() > 0) {
103+ return get(0);
104+ } else {
105+ return nullptr;
106+ }
107+ }
108 /// @endcond
109
110 Q_SIGNALS:
111 /// @cond
112 void countChanged();
113+ void firstChanged();
114 /// @endcond
115 };
116
117
118=== modified file 'test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h'
119--- test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h 2016-04-13 16:47:27 +0000
120+++ test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h 2016-05-17 19:40:32 +0000
121@@ -1,5 +1,5 @@
122 /*
123- * Copyright 2013,2015 Canonical Ltd.
124+ * Copyright 2013,2015,2016 Canonical Ltd.
125 *
126 * This program is free software; you can redistribute it and/or modify
127 * it under the terms of the GNU Lesser General Public License as published by
128@@ -63,6 +63,7 @@
129 void setInitialSurfaceSize(const QSize &) override {}
130
131 MirSurfaceListInterface* surfaceList() override { return nullptr; }
132+ MirSurfaceListInterface* promptSurfaceList() override { return nullptr; }
133
134 private:
135 QString m_appId;

Subscribers

People subscribed via source and target branches

to all changes: