Merge lp:~mzanetti/unity-api/launcheritems-popularity into lp:unity-api

Proposed by Michael Zanetti
Status: Approved
Approved by: Lukáš Tinkl
Approved revision: 279
Proposed branch: lp:~mzanetti/unity-api/launcheritems-popularity
Merge into: lp:unity-api
Diff against target: 125 lines (+34/-1)
6 files modified
debian/changelog (+6/-0)
include/unity/shell/launcher/CMakeLists.txt (+1/-1)
include/unity/shell/launcher/LauncherItemInterface.h (+7/-0)
test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.cpp (+15/-0)
test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.h (+4/-0)
test/qmltest/unity/shell/launcher/tst_Launcher.qml (+1/-0)
To merge this branch: bzr merge lp:~mzanetti/unity-api/launcheritems-popularity
Reviewer Review Type Date Requested Status
Lukáš Tinkl (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+321708@code.launchpad.net

Commit message

Add popularity field to LauncherItem

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

FAILED: Continuous integration, rev:277
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~mzanetti/unity-api/launcheritems-popularity/+merge/321708/+edit-commit-message

https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/169/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4837
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4865
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4676/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
278. By Michael Zanetti

merge trunk

279. By Michael Zanetti

bump version numbers

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

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

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

review: Approve (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

LGTM

review: Approve

Unmerged revisions

279. By Michael Zanetti

bump version numbers

278. By Michael Zanetti

merge trunk

277. By Michael Zanetti

add popularity field to launcheritems

276. By Michael Zanetti

merge prereq

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-04 08:27:28 +0000
@@ -1,3 +1,9 @@
1unity-api (8.7) UNRELEASED; urgency=medium
2
3 * Add popularity field to LauncherItem
4
5 -- Michael Zanetti <michael.zanetti@canonical.com> Tue, 04 Apr 2017 10:26:39 +0200
6
1unity-api (8.6+17.04.20170317-0ubuntu1) zesty; urgency=medium7unity-api (8.6+17.04.20170317-0ubuntu1) zesty; urgency=medium
28
3 [ Michael Zanetti ]9 [ Michael Zanetti ]
410
=== 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-04 08:27:28 +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-04 08:27:28 +0000
@@ -62,6 +62,11 @@
62 Q_PROPERTY(QStringList keywords READ keywords NOTIFY keywordsChanged)62 Q_PROPERTY(QStringList keywords READ keywords NOTIFY keywordsChanged)
6363
64 /**64 /**
65 * @brief The popularity of this application, e.g. usage count given by Zeitgeist
66 */
67 Q_PROPERTY(uint popularity READ popularity NOTIFY popularityChanged)
68
69 /**
65 * @brief A flag whether the item is pinned or not70 * @brief A flag whether the item is pinned or not
66 */71 */
67 Q_PROPERTY(bool pinned READ pinned NOTIFY pinnedChanged)72 Q_PROPERTY(bool pinned READ pinned NOTIFY pinnedChanged)
@@ -140,6 +145,7 @@
140 virtual QString name() const = 0;145 virtual QString name() const = 0;
141 virtual QString icon() const = 0;146 virtual QString icon() const = 0;
142 virtual QStringList keywords() const = 0;147 virtual QStringList keywords() const = 0;
148 virtual uint popularity() const = 0;
143 virtual bool pinned() const = 0;149 virtual bool pinned() const = 0;
144 virtual bool running() const = 0;150 virtual bool running() const = 0;
145 virtual bool recent() const = 0;151 virtual bool recent() const = 0;
@@ -155,6 +161,7 @@
155 void nameChanged(const QString &name);161 void nameChanged(const QString &name);
156 void iconChanged(const QString &icon);162 void iconChanged(const QString &icon);
157 void keywordsChanged(const QStringList &keywords);163 void keywordsChanged(const QStringList &keywords);
164 void popularityChanged(uint popularity);
158 void pinnedChanged(bool pinned);165 void pinnedChanged(bool pinned);
159 void runningChanged(bool running);166 void runningChanged(bool running);
160 void recentChanged(bool running);167 void recentChanged(bool running);
161168
=== 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-04 08:27:28 +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,20 @@
75 }76 }
76}77}
7778
79uint MockLauncherItem::popularity() const
80{
81 return m_popularity;
82}
83
84void MockLauncherItem::setPopularity(uint popularity)
85{
86 if (m_popularity != popularity)
87 {
88 m_popularity = popularity;
89 Q_EMIT popularityChanged(m_popularity);
90 }
91}
92
78bool MockLauncherItem::pinned() const93bool MockLauncherItem::pinned() const
79{94{
80 return m_pinned;95 return m_pinned;
8196
=== 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-04 08:27:28 +0000
@@ -40,6 +40,9 @@
40 QStringList keywords() const override;40 QStringList keywords() const override;
41 void setKeywords(const QStringList &keywords);41 void setKeywords(const QStringList &keywords);
4242
43 uint popularity() const override;
44 void setPopularity(uint popularity);
45
43 bool pinned() const override;46 bool pinned() const override;
44 void setPinned(bool pinned);47 void setPinned(bool pinned);
4548
@@ -73,6 +76,7 @@
73 QString m_name;76 QString m_name;
74 QString m_icon;77 QString m_icon;
75 QStringList m_keywords;78 QStringList m_keywords;
79 uint m_popularity;
76 bool m_pinned;80 bool m_pinned;
77 bool m_running;81 bool m_running;
78 bool m_recent;82 bool m_recent;
7983
=== 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-04 08:27:28 +0000
@@ -145,6 +145,7 @@
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[popularity]", constant: "popularity", type: "number" },
148 { tag: "Item.properties[pinned]", property: "pinned", type: "boolean" },149 { tag: "Item.properties[pinned]", property: "pinned", type: "boolean" },
149 { tag: "Item.properties[recent]", property: "recent", type: "boolean" },150 { tag: "Item.properties[recent]", property: "recent", type: "boolean" },
150 { tag: "Item.properties[running]", property: "running", type: "boolean" },151 { tag: "Item.properties[running]", property: "running", type: "boolean" },

Subscribers

People subscribed via source and target branches

to all changes: