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
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-03-17 11:08:20 +0000
3+++ debian/changelog 2017-04-04 08:27:28 +0000
4@@ -1,3 +1,9 @@
5+unity-api (8.7) UNRELEASED; urgency=medium
6+
7+ * Add popularity field to LauncherItem
8+
9+ -- Michael Zanetti <michael.zanetti@canonical.com> Tue, 04 Apr 2017 10:26:39 +0200
10+
11 unity-api (8.6+17.04.20170317-0ubuntu1) zesty; urgency=medium
12
13 [ Michael Zanetti ]
14
15=== modified file 'include/unity/shell/launcher/CMakeLists.txt'
16--- include/unity/shell/launcher/CMakeLists.txt 2017-02-24 12:57:54 +0000
17+++ include/unity/shell/launcher/CMakeLists.txt 2017-04-04 08:27:28 +0000
18@@ -7,7 +7,7 @@
19
20 set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
21
22-set(VERSION 12)
23+set(VERSION 13)
24 set(PKGCONFIG_NAME "unity-shell-launcher")
25 set(PKGCONFIG_DESCRIPTION "Unity shell Launcher APIs")
26 set(PKGCONFIG_REQUIRES "Qt5Core")
27
28=== modified file 'include/unity/shell/launcher/LauncherItemInterface.h'
29--- include/unity/shell/launcher/LauncherItemInterface.h 2016-11-16 18:52:33 +0000
30+++ include/unity/shell/launcher/LauncherItemInterface.h 2017-04-04 08:27:28 +0000
31@@ -62,6 +62,11 @@
32 Q_PROPERTY(QStringList keywords READ keywords NOTIFY keywordsChanged)
33
34 /**
35+ * @brief The popularity of this application, e.g. usage count given by Zeitgeist
36+ */
37+ Q_PROPERTY(uint popularity READ popularity NOTIFY popularityChanged)
38+
39+ /**
40 * @brief A flag whether the item is pinned or not
41 */
42 Q_PROPERTY(bool pinned READ pinned NOTIFY pinnedChanged)
43@@ -140,6 +145,7 @@
44 virtual QString name() const = 0;
45 virtual QString icon() const = 0;
46 virtual QStringList keywords() const = 0;
47+ virtual uint popularity() const = 0;
48 virtual bool pinned() const = 0;
49 virtual bool running() const = 0;
50 virtual bool recent() const = 0;
51@@ -155,6 +161,7 @@
52 void nameChanged(const QString &name);
53 void iconChanged(const QString &icon);
54 void keywordsChanged(const QStringList &keywords);
55+ void popularityChanged(uint popularity);
56 void pinnedChanged(bool pinned);
57 void runningChanged(bool running);
58 void recentChanged(bool running);
59
60=== modified file 'test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.cpp'
61--- test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.cpp 2016-11-16 18:52:33 +0000
62+++ test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.cpp 2017-04-04 08:27:28 +0000
63@@ -28,6 +28,7 @@
64 m_desktopFile(desktopFile),
65 m_name(name),
66 m_icon(icon),
67+ m_popularity(0),
68 m_pinned(false),
69 m_running(false),
70 m_recent(false),
71@@ -75,6 +76,20 @@
72 }
73 }
74
75+uint MockLauncherItem::popularity() const
76+{
77+ return m_popularity;
78+}
79+
80+void MockLauncherItem::setPopularity(uint popularity)
81+{
82+ if (m_popularity != popularity)
83+ {
84+ m_popularity = popularity;
85+ Q_EMIT popularityChanged(m_popularity);
86+ }
87+}
88+
89 bool MockLauncherItem::pinned() const
90 {
91 return m_pinned;
92
93=== modified file 'test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.h'
94--- test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.h 2016-12-14 15:57:28 +0000
95+++ test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherItem.h 2017-04-04 08:27:28 +0000
96@@ -40,6 +40,9 @@
97 QStringList keywords() const override;
98 void setKeywords(const QStringList &keywords);
99
100+ uint popularity() const override;
101+ void setPopularity(uint popularity);
102+
103 bool pinned() const override;
104 void setPinned(bool pinned);
105
106@@ -73,6 +76,7 @@
107 QString m_name;
108 QString m_icon;
109 QStringList m_keywords;
110+ uint m_popularity;
111 bool m_pinned;
112 bool m_running;
113 bool m_recent;
114
115=== modified file 'test/qmltest/unity/shell/launcher/tst_Launcher.qml'
116--- test/qmltest/unity/shell/launcher/tst_Launcher.qml 2017-02-24 12:55:28 +0000
117+++ test/qmltest/unity/shell/launcher/tst_Launcher.qml 2017-04-04 08:27:28 +0000
118@@ -145,6 +145,7 @@
119 { tag: "Item.properties[name]", constant: "name", type: "string" },
120 { tag: "Item.properties[icon]", constant: "icon", type: "string" },
121 { tag: "Item.properties[keywords]", constant: "keywords", type: "object" },
122+ { tag: "Item.properties[popularity]", constant: "popularity", type: "number" },
123 { tag: "Item.properties[pinned]", property: "pinned", type: "boolean" },
124 { tag: "Item.properties[recent]", property: "recent", type: "boolean" },
125 { tag: "Item.properties[running]", property: "running", type: "boolean" },

Subscribers

People subscribed via source and target branches

to all changes: