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
=== modified file 'debian/changelog'
--- debian/changelog 2017-03-17 11:08:20 +0000
+++ debian/changelog 2017-04-05 13:40:48 +0000
@@ -1,3 +1,10 @@
1unity-api (8.7) UNRELEASED; urgency=medium
2
3 * Add popularity field to LauncherItem
4 * Add LauncherItemInterface::description
5
6 -- Lukáš Tinkl <lukas.tinkl@canonical.com> Tue, 4 Apr 2017 16:00:00 +0200
7
1unity-api (8.6+17.04.20170317-0ubuntu1) zesty; urgency=medium8unity-api (8.6+17.04.20170317-0ubuntu1) zesty; urgency=medium
29
3 [ Michael Zanetti ]10 [ Michael Zanetti ]
411
=== modified file 'include/unity/shell/launcher/AppDrawerModelInterface.h'
--- include/unity/shell/launcher/AppDrawerModelInterface.h 2016-12-23 09:14:43 +0000
+++ include/unity/shell/launcher/AppDrawerModelInterface.h 2017-04-05 13:40:48 +0000
@@ -43,6 +43,7 @@
43 RoleName,43 RoleName,
44 RoleIcon,44 RoleIcon,
45 RoleKeywords,45 RoleKeywords,
46 RoleDescription,
46 RoleUsage47 RoleUsage
47 };48 };
48 Q_ENUM(Roles)49 Q_ENUM(Roles)
@@ -60,6 +61,7 @@
60 roles.insert(RoleName, "name");61 roles.insert(RoleName, "name");
61 roles.insert(RoleIcon, "icon");62 roles.insert(RoleIcon, "icon");
62 roles.insert(RoleKeywords, "keywords");63 roles.insert(RoleKeywords, "keywords");
64 roles.insert(RoleDescription, "description");
63 roles.insert(RoleUsage, "usage");65 roles.insert(RoleUsage, "usage");
64 return roles;66 return roles;
65 }67 }
6668
=== modified file 'include/unity/shell/launcher/CMakeLists.txt'
--- include/unity/shell/launcher/CMakeLists.txt 2017-02-24 12:57:54 +0000
+++ include/unity/shell/launcher/CMakeLists.txt 2017-04-05 13:40:48 +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 12)10set(VERSION 13)
11set(PKGCONFIG_NAME "unity-shell-launcher")11set(PKGCONFIG_NAME "unity-shell-launcher")
12set(PKGCONFIG_DESCRIPTION "Unity shell Launcher APIs")12set(PKGCONFIG_DESCRIPTION "Unity shell Launcher APIs")
13set(PKGCONFIG_REQUIRES "Qt5Core")13set(PKGCONFIG_REQUIRES "Qt5Core")
1414
=== modified file 'include/unity/shell/launcher/LauncherItemInterface.h'
--- include/unity/shell/launcher/LauncherItemInterface.h 2016-11-16 18:52:33 +0000
+++ include/unity/shell/launcher/LauncherItemInterface.h 2017-04-05 13:40:48 +0000
@@ -52,6 +52,11 @@
52 Q_PROPERTY(QString name READ name NOTIFY nameChanged)52 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
5353
54 /**54 /**
55 * @brief Textual description of the application
56 */
57 Q_PROPERTY(QString description READ description NOTIFY descriptionChanged)
58
59 /**
55 * @brief The full path to the icon to be shown for the item.60 * @brief The full path to the icon to be shown for the item.
56 */61 */
57 Q_PROPERTY(QString icon READ icon NOTIFY iconChanged)62 Q_PROPERTY(QString icon READ icon NOTIFY iconChanged)
@@ -62,6 +67,11 @@
62 Q_PROPERTY(QStringList keywords READ keywords NOTIFY keywordsChanged)67 Q_PROPERTY(QStringList keywords READ keywords NOTIFY keywordsChanged)
6368
64 /**69 /**
70 * @brief The popularity of this application, e.g. usage count given by Zeitgeist
71 */
72 Q_PROPERTY(uint popularity READ popularity NOTIFY popularityChanged)
73
74 /**
65 * @brief A flag whether the item is pinned or not75 * @brief A flag whether the item is pinned or not
66 */76 */
67 Q_PROPERTY(bool pinned READ pinned NOTIFY pinnedChanged)77 Q_PROPERTY(bool pinned READ pinned NOTIFY pinnedChanged)
@@ -140,6 +150,8 @@
140 virtual QString name() const = 0;150 virtual QString name() const = 0;
141 virtual QString icon() const = 0;151 virtual QString icon() const = 0;
142 virtual QStringList keywords() const = 0;152 virtual QStringList keywords() const = 0;
153 virtual QString description() const = 0;
154 virtual uint popularity() const = 0;
143 virtual bool pinned() const = 0;155 virtual bool pinned() const = 0;
144 virtual bool running() const = 0;156 virtual bool running() const = 0;
145 virtual bool recent() const = 0;157 virtual bool recent() const = 0;
@@ -155,6 +167,8 @@
155 void nameChanged(const QString &name);167 void nameChanged(const QString &name);
156 void iconChanged(const QString &icon);168 void iconChanged(const QString &icon);
157 void keywordsChanged(const QStringList &keywords);169 void keywordsChanged(const QStringList &keywords);
170 void descriptionChanged(const QString &description);
171 void popularityChanged(uint popularity);
158 void pinnedChanged(bool pinned);172 void pinnedChanged(bool pinned);
159 void runningChanged(bool running);173 void runningChanged(bool running);
160 void recentChanged(bool running);174 void recentChanged(bool running);
161175
=== modified file 'test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.cpp'
--- test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.cpp 2016-11-16 18:52:33 +0000
+++ test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.cpp 2017-04-05 13:40:48 +0000
@@ -28,6 +28,7 @@
28 m_desktopFile(desktopFile),28 m_desktopFile(desktopFile),
29 m_name(name),29 m_name(name),
30 m_icon(icon),30 m_icon(icon),
31 m_popularity(0),
31 m_pinned(false),32 m_pinned(false),
32 m_running(false),33 m_running(false),
33 m_recent(false),34 m_recent(false),
@@ -75,6 +76,33 @@
75 }76 }
76}77}
7778
79QString MockLauncherItem::description() const
80{
81 return m_description;
82}
83
84void MockLauncherItem::setDescription(const QString &description)
85{
86 if (m_description != description) {
87 m_description = description;
88 Q_EMIT descriptionChanged(m_description);
89 }
90}
91
92uint MockLauncherItem::popularity() const
93{
94 return m_popularity;
95}
96
97void MockLauncherItem::setPopularity(uint popularity)
98{
99 if (m_popularity != popularity)
100 {
101 m_popularity = popularity;
102 Q_EMIT popularityChanged(m_popularity);
103 }
104}
105
78bool MockLauncherItem::pinned() const106bool MockLauncherItem::pinned() const
79{107{
80 return m_pinned;108 return m_pinned;
81109
=== modified file 'test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.h'
--- test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.h 2016-12-14 15:57:28 +0000
+++ test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.h 2017-04-05 13:40:48 +0000
@@ -40,6 +40,12 @@
40 QStringList keywords() const override;40 QStringList keywords() const override;
41 void setKeywords(const QStringList &keywords);41 void setKeywords(const QStringList &keywords);
4242
43 QString description() const override;
44 void setDescription(const QString &description);
45
46 uint popularity() const override;
47 void setPopularity(uint popularity);
48
43 bool pinned() const override;49 bool pinned() const override;
44 void setPinned(bool pinned);50 void setPinned(bool pinned);
4551
@@ -73,6 +79,8 @@
73 QString m_name;79 QString m_name;
74 QString m_icon;80 QString m_icon;
75 QStringList m_keywords;81 QStringList m_keywords;
82 QString m_description;
83 uint m_popularity;
76 bool m_pinned;84 bool m_pinned;
77 bool m_running;85 bool m_running;
78 bool m_recent;86 bool m_recent;
7987
=== modified file 'test/qmltest/unity/shell/launcher/tst_Launcher.qml'
--- test/qmltest/unity/shell/launcher/tst_Launcher.qml 2017-02-24 12:55:28 +0000
+++ test/qmltest/unity/shell/launcher/tst_Launcher.qml 2017-04-05 13:40:48 +0000
@@ -145,6 +145,8 @@
145 { tag: "Item.properties[name]", constant: "name", type: "string" },145 { tag: "Item.properties[name]", constant: "name", type: "string" },
146 { tag: "Item.properties[icon]", constant: "icon", type: "string" },146 { tag: "Item.properties[icon]", constant: "icon", type: "string" },
147 { tag: "Item.properties[keywords]", constant: "keywords", type: "object" },147 { tag: "Item.properties[keywords]", constant: "keywords", type: "object" },
148 { tag: "Item.properties[description]", constant: "description", type: "string" },
149 { tag: "Item.properties[popularity]", constant: "popularity", type: "number" },
148 { tag: "Item.properties[pinned]", property: "pinned", type: "boolean" },150 { tag: "Item.properties[pinned]", property: "pinned", type: "boolean" },
149 { tag: "Item.properties[recent]", property: "recent", type: "boolean" },151 { tag: "Item.properties[recent]", property: "recent", type: "boolean" },
150 { tag: "Item.properties[running]", property: "running", type: "boolean" },152 { tag: "Item.properties[running]", property: "running", type: "boolean" },

Subscribers

People subscribed via source and target branches

to all changes: