Merge lp:~lukas-kde/unity-api/launcheritem-description into lp:unity-api

Proposed by Lukáš Tinkl
Status: Superseded
Proposed branch: lp:~lukas-kde/unity-api/launcheritem-description
Merge into: lp:unity-api
Diff against target: 178 lines (+62/-1)
7 files modified
debian/changelog (+7/-0)
include/unity/shell/launcher/AppDrawerModelInterface.h (+2/-0)
include/unity/shell/launcher/CMakeLists.txt (+1/-1)
include/unity/shell/launcher/LauncherItemInterface.h (+14/-0)
test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.cpp (+28/-0)
test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.h (+8/-0)
test/qmltest/unity/shell/launcher/tst_Launcher.qml (+2/-0)
To merge this branch: bzr merge lp:~lukas-kde/unity-api/launcheritem-description
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Unity Team Pending
Review via email: mp+321924@code.launchpad.net

This proposal has been superseded by a proposal from 2017-04-05.

Commit message

Add LauncherItemInterface::description

Description of the change

Add LauncherItemInterface::description

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)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
282. By Lukáš Tinkl

validate changelog

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

PASSED: Continuous integration, rev:282
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/178/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4901
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4929
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4737
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4737/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4737
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4737/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4737
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4737/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4737
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4737/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4737
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4737/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4737
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4737/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
283. By Lukáš Tinkl

rebase on top of lp:~mzanetti/unity-api/launcheritems-popularity

284. By Lukáš Tinkl

merge changelog

285. By Lukáš Tinkl

add a property test

286. By Lukáš Tinkl

resolve conflict

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

Unmerged revisions

286. By Lukáš Tinkl

resolve conflict

285. By Lukáš Tinkl

add a property test

284. By Lukáš Tinkl

merge changelog

283. By Lukáš Tinkl

rebase on top of lp:~mzanetti/unity-api/launcheritems-popularity

282. By Lukáš Tinkl

validate changelog

281. By Lukáš Tinkl

Add LauncherItemInterface::description

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 2017-03-17 11:08:20 +0000
3+++ debian/changelog 2017-04-05 13:40:48 +0000
4@@ -1,3 +1,10 @@
5+unity-api (8.7) UNRELEASED; urgency=medium
6+
7+ * Add popularity field to LauncherItem
8+ * Add LauncherItemInterface::description
9+
10+ -- Lukáš Tinkl <lukas.tinkl@canonical.com> Tue, 4 Apr 2017 16:00:00 +0200
11+
12 unity-api (8.6+17.04.20170317-0ubuntu1) zesty; urgency=medium
13
14 [ Michael Zanetti ]
15
16=== modified file 'include/unity/shell/launcher/AppDrawerModelInterface.h'
17--- include/unity/shell/launcher/AppDrawerModelInterface.h 2016-12-23 09:14:43 +0000
18+++ include/unity/shell/launcher/AppDrawerModelInterface.h 2017-04-05 13:40:48 +0000
19@@ -43,6 +43,7 @@
20 RoleName,
21 RoleIcon,
22 RoleKeywords,
23+ RoleDescription,
24 RoleUsage
25 };
26 Q_ENUM(Roles)
27@@ -60,6 +61,7 @@
28 roles.insert(RoleName, "name");
29 roles.insert(RoleIcon, "icon");
30 roles.insert(RoleKeywords, "keywords");
31+ roles.insert(RoleDescription, "description");
32 roles.insert(RoleUsage, "usage");
33 return roles;
34 }
35
36=== modified file 'include/unity/shell/launcher/CMakeLists.txt'
37--- include/unity/shell/launcher/CMakeLists.txt 2017-02-24 12:57:54 +0000
38+++ include/unity/shell/launcher/CMakeLists.txt 2017-04-05 13:40:48 +0000
39@@ -7,7 +7,7 @@
40
41 set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
42
43-set(VERSION 12)
44+set(VERSION 13)
45 set(PKGCONFIG_NAME "unity-shell-launcher")
46 set(PKGCONFIG_DESCRIPTION "Unity shell Launcher APIs")
47 set(PKGCONFIG_REQUIRES "Qt5Core")
48
49=== modified file 'include/unity/shell/launcher/LauncherItemInterface.h'
50--- include/unity/shell/launcher/LauncherItemInterface.h 2016-11-16 18:52:33 +0000
51+++ include/unity/shell/launcher/LauncherItemInterface.h 2017-04-05 13:40:48 +0000
52@@ -52,6 +52,11 @@
53 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
54
55 /**
56+ * @brief Textual description of the application
57+ */
58+ Q_PROPERTY(QString description READ description NOTIFY descriptionChanged)
59+
60+ /**
61 * @brief The full path to the icon to be shown for the item.
62 */
63 Q_PROPERTY(QString icon READ icon NOTIFY iconChanged)
64@@ -62,6 +67,11 @@
65 Q_PROPERTY(QStringList keywords READ keywords NOTIFY keywordsChanged)
66
67 /**
68+ * @brief The popularity of this application, e.g. usage count given by Zeitgeist
69+ */
70+ Q_PROPERTY(uint popularity READ popularity NOTIFY popularityChanged)
71+
72+ /**
73 * @brief A flag whether the item is pinned or not
74 */
75 Q_PROPERTY(bool pinned READ pinned NOTIFY pinnedChanged)
76@@ -140,6 +150,8 @@
77 virtual QString name() const = 0;
78 virtual QString icon() const = 0;
79 virtual QStringList keywords() const = 0;
80+ virtual QString description() const = 0;
81+ virtual uint popularity() const = 0;
82 virtual bool pinned() const = 0;
83 virtual bool running() const = 0;
84 virtual bool recent() const = 0;
85@@ -155,6 +167,8 @@
86 void nameChanged(const QString &name);
87 void iconChanged(const QString &icon);
88 void keywordsChanged(const QStringList &keywords);
89+ void descriptionChanged(const QString &description);
90+ void popularityChanged(uint popularity);
91 void pinnedChanged(bool pinned);
92 void runningChanged(bool running);
93 void recentChanged(bool running);
94
95=== modified file 'test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.cpp'
96--- test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.cpp 2016-11-16 18:52:33 +0000
97+++ test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.cpp 2017-04-05 13:40:48 +0000
98@@ -28,6 +28,7 @@
99 m_desktopFile(desktopFile),
100 m_name(name),
101 m_icon(icon),
102+ m_popularity(0),
103 m_pinned(false),
104 m_running(false),
105 m_recent(false),
106@@ -75,6 +76,33 @@
107 }
108 }
109
110+QString MockLauncherItem::description() const
111+{
112+ return m_description;
113+}
114+
115+void MockLauncherItem::setDescription(const QString &description)
116+{
117+ if (m_description != description) {
118+ m_description = description;
119+ Q_EMIT descriptionChanged(m_description);
120+ }
121+}
122+
123+uint MockLauncherItem::popularity() const
124+{
125+ return m_popularity;
126+}
127+
128+void MockLauncherItem::setPopularity(uint popularity)
129+{
130+ if (m_popularity != popularity)
131+ {
132+ m_popularity = popularity;
133+ Q_EMIT popularityChanged(m_popularity);
134+ }
135+}
136+
137 bool MockLauncherItem::pinned() const
138 {
139 return m_pinned;
140
141=== modified file 'test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.h'
142--- test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.h 2016-12-14 15:57:28 +0000
143+++ test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.h 2017-04-05 13:40:48 +0000
144@@ -40,6 +40,12 @@
145 QStringList keywords() const override;
146 void setKeywords(const QStringList &keywords);
147
148+ QString description() const override;
149+ void setDescription(const QString &description);
150+
151+ uint popularity() const override;
152+ void setPopularity(uint popularity);
153+
154 bool pinned() const override;
155 void setPinned(bool pinned);
156
157@@ -73,6 +79,8 @@
158 QString m_name;
159 QString m_icon;
160 QStringList m_keywords;
161+ QString m_description;
162+ uint m_popularity;
163 bool m_pinned;
164 bool m_running;
165 bool m_recent;
166
167=== modified file 'test/qmltest/unity/shell/launcher/tst_Launcher.qml'
168--- test/qmltest/unity/shell/launcher/tst_Launcher.qml 2017-02-24 12:55:28 +0000
169+++ test/qmltest/unity/shell/launcher/tst_Launcher.qml 2017-04-05 13:40:48 +0000
170@@ -145,6 +145,8 @@
171 { tag: "Item.properties[name]", constant: "name", type: "string" },
172 { tag: "Item.properties[icon]", constant: "icon", type: "string" },
173 { tag: "Item.properties[keywords]", constant: "keywords", type: "object" },
174+ { tag: "Item.properties[description]", constant: "description", type: "string" },
175+ { tag: "Item.properties[popularity]", constant: "popularity", type: "number" },
176 { tag: "Item.properties[pinned]", property: "pinned", type: "boolean" },
177 { tag: "Item.properties[recent]", property: "recent", type: "boolean" },
178 { tag: "Item.properties[running]", property: "running", type: "boolean" },

Subscribers

People subscribed via source and target branches

to all changes: