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

Proposed by Daniel d'Andrada
Status: Merged
Approved by: Michael Zanetti
Approved revision: no longer in the source branch.
Merged at revision: 246
Proposed branch: lp:~dandrader/unity-api/removeApplicationStage
Merge into: lp:unity-api
Diff against target: 185 lines (+9/-38)
8 files modified
debian/changelog (+7/-0)
include/unity/shell/application/ApplicationInfoInterface.h (+0/-10)
include/unity/shell/application/ApplicationManagerInterface.h (+0/-2)
include/unity/shell/application/CMakeLists.txt (+1/-1)
test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.cpp (+1/-16)
test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h (+0/-4)
test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.cpp (+0/-2)
test/qmltest/unity/shell/application/tst_Application.qml (+0/-3)
To merge this branch: bzr merge lp:~dandrader/unity-api/removeApplicationStage
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+297764@code.launchpad.net

Commit message

Remove ApplicationInfoInterface.stage property

And remove "stage" role from ApplicationManagerInterface accordingly

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

FAILED: Continuous integration, rev:236
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/89/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2009/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2037
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1954
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1954
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1954
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1945/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1945/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1945/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1945/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1945/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1945/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1945/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1945/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1945/console

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

+1 in general, but:

* There's a "Stage" enum in ApplicationInfoInterface.h. Can that go away too?

* You forgot to update test/qmltest/unity/shell/application/tst_Application.qml

review: Needs Fixing
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

On 20/06/2016 08:43, Michael Zanetti wrote:
> * There's a "Stage" enum in ApplicationInfoInterface.h. Can that go away too?

That enum is still used in the code. We could move it to Mir.h...

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> On 20/06/2016 08:43, Michael Zanetti wrote:
> > * There's a "Stage" enum in ApplicationInfoInterface.h. Can that go away
> too?
>
> That enum is still used in the code. We could move it to Mir.h...

ok then. I don't require you to do that in this merge. Just clean up the failing tests and we're good.

239. By CI Train Bot Account

MirSurfaceInterface: add inputBounds property

240. By CI Train Bot Account

Releasing 7.116+16.10.20160620-0ubuntu1

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

On 20/06/2016 08:43, Michael Zanetti wrote:
> * You forgot to update test/qmltest/unity/shell/application/tst_Application.qml

Done.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

On 20/06/2016 11:12, Michael Zanetti wrote:
>> On 20/06/2016 08:43, Michael Zanetti wrote:
>>> * There's a "Stage" enum in ApplicationInfoInterface.h. Can that go away
>> too?
>>
>> That enum is still used in the code. We could move it to Mir.h...
> ok then. I don't require you to do that in this merge. Just clean up the failing tests and we're good.

Actually it doesn't belong to Mir.h as "stage" is a unity8 concept.

Tried removing it but in unity8 there's both qml and cpp code refering
to it. Also from multiple qml files. So having it in
ApplicationInfoInterface.h is quite handy. To remove it from there I
would have to add it to another header file in unity8. Or maybe turn it
into a "bool sideStage" property. Yeah, that sideStage boolean would
solve it. But then it would be an API change in unity8, making it a more
complex branch tha also modifies code instead of simply removing unused
stuff.

Fixed the qml test.

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

PASSED: Continuous integration, rev:239
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/91/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2090
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2118
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2029
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2029
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2029
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2020
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2020/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2020
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2020/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2020
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2020/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2020
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2020/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2020
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2020/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2020
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2020/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2020
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2020/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2020
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2020/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2020
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2020/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

yip yip

review: Approve
241. By Daniel d'Andrada

Remove ApplicationInfoInterface.stage property

And remove "stage" role from ApplicationManagerInterface accordingly

242. By Daniel d'Andrada

Update tests

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2016-06-20 14:39:15 +0000
+++ debian/changelog 2016-07-25 18:44:12 +0000
@@ -1,3 +1,10 @@
1unity-api (7.117) UNRELEASED; urgency=medium
2
3 * ApplicationInfoInterface: remove "stage" property
4 * ApplicationManagerInterface: remove "stage" role
5
6 -- Daniel d'Andrada <daniel.dandrada@canonical.com> Mon, 25 Jul 2016 10:55:56 -0300
7
1unity-api (7.116+16.10.20160620-0ubuntu1) yakkety; urgency=medium8unity-api (7.116+16.10.20160620-0ubuntu1) yakkety; urgency=medium
29
3 * MirSurfaceInterface: add inputBounds property10 * MirSurfaceInterface: add inputBounds property
411
=== modified file 'include/unity/shell/application/ApplicationInfoInterface.h'
--- include/unity/shell/application/ApplicationInfoInterface.h 2016-05-19 10:17:07 +0000
+++ include/unity/shell/application/ApplicationInfoInterface.h 2016-07-25 18:44:12 +0000
@@ -79,13 +79,6 @@
79 Q_PROPERTY(QUrl icon READ icon NOTIFY iconChanged)79 Q_PROPERTY(QUrl icon READ icon NOTIFY iconChanged)
8080
81 /**81 /**
82 * @brief The application's stage.
83 *
84 * Holds the stage where this application is currently located.
85 */
86 Q_PROPERTY(Stage stage READ stage WRITE setStage NOTIFY stageChanged)
87
88 /**
89 * @brief The application's state.82 * @brief The application's state.
90 *83 *
91 * Holds the current application state.84 * Holds the current application state.
@@ -296,8 +289,6 @@
296 virtual QString name() const = 0;289 virtual QString name() const = 0;
297 virtual QString comment() const = 0;290 virtual QString comment() const = 0;
298 virtual QUrl icon() const = 0;291 virtual QUrl icon() const = 0;
299 virtual Stage stage() const = 0;
300 virtual void setStage(Stage) = 0;
301 virtual State state() const = 0;292 virtual State state() const = 0;
302 virtual RequestedState requestedState() const = 0;293 virtual RequestedState requestedState() const = 0;
303 virtual void setRequestedState(RequestedState) = 0;294 virtual void setRequestedState(RequestedState) = 0;
@@ -325,7 +316,6 @@
325 void nameChanged(const QString &name);316 void nameChanged(const QString &name);
326 void commentChanged(const QString &comment);317 void commentChanged(const QString &comment);
327 void iconChanged(const QUrl &icon);318 void iconChanged(const QUrl &icon);
328 void stageChanged(Stage stage);
329 void stateChanged(State state);319 void stateChanged(State state);
330 void requestedStateChanged(RequestedState value);320 void requestedStateChanged(RequestedState value);
331 void focusedChanged(bool focused);321 void focusedChanged(bool focused);
332322
=== modified file 'include/unity/shell/application/ApplicationManagerInterface.h'
--- include/unity/shell/application/ApplicationManagerInterface.h 2016-05-13 09:35:14 +0000
+++ include/unity/shell/application/ApplicationManagerInterface.h 2016-07-25 18:44:12 +0000
@@ -67,7 +67,6 @@
67 m_roleNames.insert(RoleName, "name");67 m_roleNames.insert(RoleName, "name");
68 m_roleNames.insert(RoleComment, "comment");68 m_roleNames.insert(RoleComment, "comment");
69 m_roleNames.insert(RoleIcon, "icon");69 m_roleNames.insert(RoleIcon, "icon");
70 m_roleNames.insert(RoleStage, "stage");
71 m_roleNames.insert(RoleState, "state");70 m_roleNames.insert(RoleState, "state");
72 m_roleNames.insert(RoleFocused, "focused");71 m_roleNames.insert(RoleFocused, "focused");
73 m_roleNames.insert(RoleIsTouchApp, "isTouchApp");72 m_roleNames.insert(RoleIsTouchApp, "isTouchApp");
@@ -92,7 +91,6 @@
92 RoleName,91 RoleName,
93 RoleComment,92 RoleComment,
94 RoleIcon,93 RoleIcon,
95 RoleStage,
96 RoleState,94 RoleState,
97 RoleFocused,95 RoleFocused,
98 RoleIsTouchApp,96 RoleIsTouchApp,
9997
=== modified file 'include/unity/shell/application/CMakeLists.txt'
--- include/unity/shell/application/CMakeLists.txt 2016-06-20 14:06:02 +0000
+++ include/unity/shell/application/CMakeLists.txt 2016-07-25 18:44:12 +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 19)10set(VERSION 20)
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 'test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.cpp'
--- test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.cpp 2016-05-18 13:35:36 +0000
+++ test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.cpp 2016-07-25 18:44:12 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2013 Canonical Ltd.2 * Copyright 2013,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
@@ -27,7 +27,6 @@
27 m_name(name),27 m_name(name),
28 m_comment(comment),28 m_comment(comment),
29 m_icon(icon),29 m_icon(icon),
30 m_stage(MainStage),
31 m_state(Running),30 m_state(Running),
32 m_focused(false),31 m_focused(false),
33 m_exemptFromLifecycle(false)32 m_exemptFromLifecycle(false)
@@ -55,20 +54,6 @@
55 return m_icon;54 return m_icon;
56}55}
5756
58ApplicationInfoInterface::Stage MockApplicationInfo::stage() const
59{
60 return m_stage;
61}
62
63void MockApplicationInfo::setStage(ApplicationInfoInterface::Stage stage)
64{
65 if (m_stage != stage)
66 {
67 m_stage = stage;
68 Q_EMIT stageChanged(m_stage);
69 }
70}
71
72ApplicationInfoInterface::State MockApplicationInfo::state() const57ApplicationInfoInterface::State MockApplicationInfo::state() const
73{58{
74 return m_state;59 return m_state;
7560
=== modified file 'test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h'
--- test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h 2016-05-19 10:17:07 +0000
+++ test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h 2016-07-25 18:44:12 +0000
@@ -34,9 +34,6 @@
34 QString comment() const;34 QString comment() const;
35 QUrl icon() const;35 QUrl icon() const;
3636
37 ApplicationInfoInterface::Stage stage() const;
38 void setStage(ApplicationInfoInterface::Stage stage);
39
40 ApplicationInfoInterface::State state() const;37 ApplicationInfoInterface::State state() const;
41 void setState(ApplicationInfoInterface::State state);38 void setState(ApplicationInfoInterface::State state);
4239
@@ -71,7 +68,6 @@
71 QString m_name;68 QString m_name;
72 QString m_comment;69 QString m_comment;
73 QUrl m_icon;70 QUrl m_icon;
74 ApplicationInfoInterface::Stage m_stage;
75 ApplicationInfoInterface::State m_state;71 ApplicationInfoInterface::State m_state;
76 bool m_focused;72 bool m_focused;
77 bool m_exemptFromLifecycle;73 bool m_exemptFromLifecycle;
7874
=== modified file 'test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.cpp'
--- test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.cpp 2015-12-03 17:07:15 +0000
+++ test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.cpp 2016-07-25 18:44:12 +0000
@@ -60,8 +60,6 @@
60 return item->comment();60 return item->comment();
61 case RoleIcon:61 case RoleIcon:
62 return item->icon();62 return item->icon();
63 case RoleStage:
64 return item->stage();
65 case RoleState:63 case RoleState:
66 return item->state();64 return item->state();
67 case RoleFocused:65 case RoleFocused:
6866
=== modified file 'test/qmltest/unity/shell/application/tst_Application.qml'
--- test/qmltest/unity/shell/application/tst_Application.qml 2015-12-03 17:07:15 +0000
+++ test/qmltest/unity/shell/application/tst_Application.qml 2016-07-25 18:44:12 +0000
@@ -66,7 +66,6 @@
66 { enum: "RoleName" },66 { enum: "RoleName" },
67 { enum: "RoleComment" },67 { enum: "RoleComment" },
68 { enum: "RoleIcon" },68 { enum: "RoleIcon" },
69 { enum: "RoleStage" },
70 { enum: "RoleState" },69 { enum: "RoleState" },
71 { enum: "RoleFocused" },70 { enum: "RoleFocused" },
72 { enum: "RoleIsTouchApp" },71 { enum: "RoleIsTouchApp" },
@@ -87,7 +86,6 @@
87 { tag: "ApplicationManager.roles[name]", role: "name", type: "string" },86 { tag: "ApplicationManager.roles[name]", role: "name", type: "string" },
88 { tag: "ApplicationManager.roles[comment]", role: "comment", type: "string" },87 { tag: "ApplicationManager.roles[comment]", role: "comment", type: "string" },
89 { tag: "ApplicationManager.roles[icon]", role: "icon", type: "object" },88 { tag: "ApplicationManager.roles[icon]", role: "icon", type: "object" },
90 { tag: "ApplicationManager.roles[stage]", role: "stage", type: "number" },
91 { tag: "ApplicationManager.roles[state]", role: "state", type: "number" },89 { tag: "ApplicationManager.roles[state]", role: "state", type: "number" },
92 { tag: "ApplicationManager.roles[focused]", role: "focused", type: "boolean" },90 { tag: "ApplicationManager.roles[focused]", role: "focused", type: "boolean" },
93 { tag: "ApplicationManager.roles[isTouchApp]", role: "isTouchApp", type: "boolean" },91 { tag: "ApplicationManager.roles[isTouchApp]", role: "isTouchApp", type: "boolean" },
@@ -143,7 +141,6 @@
143 { tag: "ApplicationInfo.properties[name]", property: "name", type: "string" },141 { tag: "ApplicationInfo.properties[name]", property: "name", type: "string" },
144 { tag: "ApplicationInfo.properties[comment]", property: "comment", type: "string" },142 { tag: "ApplicationInfo.properties[comment]", property: "comment", type: "string" },
145 { tag: "ApplicationInfo.properties[icon]", property: "icon", type: "object" },143 { tag: "ApplicationInfo.properties[icon]", property: "icon", type: "object" },
146 { tag: "ApplicationInfo.properties[stage]", property: "stage", type: "number" },
147 { tag: "ApplicationInfo.properties[state]", property: "state", type: "number" },144 { tag: "ApplicationInfo.properties[state]", property: "state", type: "number" },
148 { tag: "ApplicationInfo.properties[requestedState]", property: "requestedState", type: "number" },145 { tag: "ApplicationInfo.properties[requestedState]", property: "requestedState", type: "number" },
149 { tag: "ApplicationInfo.properties[focused]", property: "focused", type: "boolean" },146 { tag: "ApplicationInfo.properties[focused]", property: "focused", type: "boolean" },

Subscribers

People subscribed via source and target branches

to all changes: