Merge lp:~mterry/unity-api/no-touch-no-lifecycle into lp:unity-api

Proposed by Michael Terry on 2015-09-29
Status: Merged
Approved by: Gerry Boland on 2015-10-27
Approved revision: 192
Merged at revision: 192
Proposed branch: lp:~mterry/unity-api/no-touch-no-lifecycle
Merge into: lp:unity-api
Diff against target: 156 lines (+35/-1)
9 files modified
README (+8/-0)
debian/changelog (+6/-0)
include/unity/shell/application/ApplicationInfoInterface.h (+6/-0)
include/unity/shell/application/ApplicationManagerInterface.h (+2/-0)
include/unity/shell/application/CMakeLists.txt (+1/-1)
test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.cpp (+5/-0)
test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h (+2/-0)
test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.cpp (+2/-0)
test/qmltest/unity/shell/application/tst_Application.qml (+3/-0)
To merge this branch: bzr merge lp:~mterry/unity-api/no-touch-no-lifecycle
Reviewer Review Type Date Requested Status
Gerry Boland 2015-09-29 Approve on 2015-11-04
PS Jenkins bot continuous-integration Approve on 2015-10-27
Review via email: mp+272829@code.launchpad.net

Commit Message

Add new isTouchApp property to ApplicationInfoInterface.

Adding isTouchApp gives upper layers more information it may use to decide whether it should suspend an app.

Description of the Change

Add new isTouchApp property to ApplicationInfoInterface.

Adding isTouchApp gives upper layers more information it may use to decide whether it should suspend an app.

Related MPs:
https://code.launchpad.net/~mterry/qtmir/no-touch-no-lifecycle/+merge/272791
https://code.launchpad.net/~mterry/unity8/no-touch-no-lifecycle/+merge/272844

To post a comment you must log in.
190. By Michael Terry on 2015-10-01

Remove canSuspend

191. By Michael Terry on 2015-10-01

Add isTouchApp to application manager roles

192. By Michael Terry on 2015-10-27

Merge from trunk

Gerry Boland (gerboland) wrote :

LGTM

review: Approve
193. By Michael Terry on 2015-10-30

Bump VERSION for unity-shell-application

Gerry Boland (gerboland) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2013-06-26 23:47:34 +0000
3+++ README 2015-10-30 16:56:31 +0000
4@@ -218,6 +218,14 @@
5 See astyle-config for more details.
6
7
8+Versioning
9+----------
10+
11+When adding API, remember to both bump:
12+- the debian/changelog version and
13+- the VERSION field in the relevant CMakeLists.txt file
14+
15+
16 Test suite
17 ----------
18
19
20=== modified file 'debian/changelog'
21--- debian/changelog 2015-10-21 11:48:38 +0000
22+++ debian/changelog 2015-10-30 16:56:31 +0000
23@@ -1,3 +1,9 @@
24+unity-api (7.102) UNRELEASED; urgency=medium
25+
26+ * Add isTouchApp to ApplicationInfoInterface
27+
28+ -- Michael Terry <mterry@ubuntu.com> Tue, 29 Sep 2015 13:36:51 -0400
29+
30 unity-api (7.101+15.10.20151021-0ubuntu1) wily; urgency=medium
31
32 [ Daniel d'Andrada ]
33
34=== modified file 'include/unity/shell/application/ApplicationInfoInterface.h'
35--- include/unity/shell/application/ApplicationInfoInterface.h 2015-06-19 12:02:05 +0000
36+++ include/unity/shell/application/ApplicationInfoInterface.h 2015-10-30 16:56:31 +0000
37@@ -199,6 +199,11 @@
38 */
39 Q_PROPERTY(bool rotatesWindowContents READ rotatesWindowContents CONSTANT)
40
41+ /**
42+ * @brief Whether the application is an app targeting the Ubuntu Touch platform.
43+ */
44+ Q_PROPERTY(bool isTouchApp READ isTouchApp CONSTANT)
45+
46 protected:
47 /// @cond
48 ApplicationInfoInterface(const QString &appId, QObject* parent = 0): QObject(parent) { Q_UNUSED(appId) }
49@@ -269,6 +274,7 @@
50 virtual QColor splashColorFooter() const = 0;
51 virtual Qt::ScreenOrientations supportedOrientations() const = 0;
52 virtual bool rotatesWindowContents() const = 0;
53+ virtual bool isTouchApp() const = 0;
54 /// @endcond
55
56 Q_SIGNALS:
57
58=== modified file 'include/unity/shell/application/ApplicationManagerInterface.h'
59--- include/unity/shell/application/ApplicationManagerInterface.h 2015-06-19 12:02:05 +0000
60+++ include/unity/shell/application/ApplicationManagerInterface.h 2015-10-30 16:56:31 +0000
61@@ -70,6 +70,7 @@
62 m_roleNames.insert(RoleStage, "stage");
63 m_roleNames.insert(RoleState, "state");
64 m_roleNames.insert(RoleFocused, "focused");
65+ m_roleNames.insert(RoleIsTouchApp, "isTouchApp");
66
67 connect(this, SIGNAL(rowsInserted(QModelIndex, int, int)), SIGNAL(countChanged()));
68 connect(this, SIGNAL(rowsRemoved(QModelIndex, int, int)), SIGNAL(countChanged()));
69@@ -92,6 +93,7 @@
70 RoleStage,
71 RoleState,
72 RoleFocused,
73+ RoleIsTouchApp,
74 };
75
76 /// @cond
77
78=== modified file 'include/unity/shell/application/CMakeLists.txt'
79--- include/unity/shell/application/CMakeLists.txt 2015-09-29 14:27:02 +0000
80+++ include/unity/shell/application/CMakeLists.txt 2015-10-30 16:56:31 +0000
81@@ -7,7 +7,7 @@
82
83 set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
84
85-set(VERSION 9)
86+set(VERSION 10)
87 set(PKGCONFIG_NAME "unity-shell-application")
88 set(PKGCONFIG_DESCRIPTION "Unity shell Application APIs")
89 set(PKGCONFIG_REQUIRES "Qt5Core")
90
91=== modified file 'test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.cpp'
92--- test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.cpp 2015-06-19 12:02:05 +0000
93+++ test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.cpp 2015-10-30 16:56:31 +0000
94@@ -144,3 +144,8 @@
95 {
96 return false;
97 }
98+
99+bool MockApplicationInfo::isTouchApp() const
100+{
101+ return true;
102+}
103
104=== modified file 'test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h'
105--- test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h 2015-06-19 12:02:05 +0000
106+++ test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h 2015-10-30 16:56:31 +0000
107@@ -55,6 +55,8 @@
108 Qt::ScreenOrientations supportedOrientations() const override;
109 bool rotatesWindowContents() const override;
110
111+ bool isTouchApp() const override;
112+
113 private:
114 QString m_appId;
115 QString m_name;
116
117=== modified file 'test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.cpp'
118--- test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.cpp 2015-06-19 12:02:05 +0000
119+++ test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.cpp 2015-10-30 16:56:31 +0000
120@@ -66,6 +66,8 @@
121 return item->state();
122 case RoleFocused:
123 return item->focused();
124+ case RoleIsTouchApp:
125+ return item->isTouchApp();
126 }
127
128 return QVariant();
129
130=== modified file 'test/qmltest/unity/shell/application/tst_Application.qml'
131--- test/qmltest/unity/shell/application/tst_Application.qml 2015-06-19 12:02:05 +0000
132+++ test/qmltest/unity/shell/application/tst_Application.qml 2015-10-30 16:56:31 +0000
133@@ -69,6 +69,7 @@
134 { enum: "RoleStage" },
135 { enum: "RoleState" },
136 { enum: "RoleFocused" },
137+ { enum: "RoleIsTouchApp" },
138 ];
139 }
140
141@@ -88,6 +89,7 @@
142 { tag: "ApplicationManager.roles[stage]", role: "stage", type: "number" },
143 { tag: "ApplicationManager.roles[state]", role: "state", type: "number" },
144 { tag: "ApplicationManager.roles[focused]", role: "focused", type: "boolean" },
145+ { tag: "ApplicationManager.roles[isTouchApp]", role: "isTouchApp", type: "boolean" },
146 ];
147 }
148
149@@ -143,6 +145,7 @@
150 { tag: "ApplicationInfo.properties[state]", property: "state", type: "number" },
151 { tag: "ApplicationInfo.properties[requestedState]", property: "requestedState", type: "number" },
152 { tag: "ApplicationInfo.properties[focused]", property: "focused", type: "boolean" },
153+ { tag: "ApplicationInfo.properties[isTouchApp]", constant: "isTouchApp", type: "boolean" },
154 { tag: "ApplicationInfo.properties[splashTitle]", constant: "splashTitle", type: "string" },
155 { tag: "ApplicationInfo.properties[splashImage]", constant: "splashImage", type: "url" },
156 { tag: "ApplicationInfo.properties[splashShowHeader]", constant: "splashShowHeader", type: "boolean"},

Subscribers

People subscribed via source and target branches

to all changes: