Merge lp:~savilerow-team/savilerow/unity-scope-selfserviceupgrades-newapi into lp:~savilerow-team/savilerow/unity-scope-selfserviceupgrades

Proposed by Chris Wayne
Status: Merged
Merged at revision: 15
Proposed branch: lp:~savilerow-team/savilerow/unity-scope-selfserviceupgrades-newapi
Merge into: lp:~savilerow-team/savilerow/unity-scope-selfserviceupgrades
Diff against target: 154 lines (+25/-18)
6 files modified
CMakeLists.txt (+2/-2)
debian/changelog (+6/-0)
src/SelfServiceUpgradesQuery.cpp (+2/-2)
src/SelfServiceUpgradesQuery.h (+4/-4)
src/SelfServiceUpgradesScope.cpp (+7/-7)
src/SelfServiceUpgradesScope.h (+4/-3)
To merge this branch: bzr merge lp:~savilerow-team/savilerow/unity-scope-selfserviceupgrades-newapi
Reviewer Review Type Date Requested Status
Scott Sweeny (community) Approve
Review via email: [email protected]

Description of the change

New api

To post a comment you must log in.
Revision history for this message
Scott Sweeny (ssweeny) wrote :

B/I/R for me. Please add a changelog entry and merge.

review: Approve
16. By Chris Wayne

releasing package unity-scope-selfserviceupgrades version 0.3

17. By Chris Wayne

Fix install location

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-02-22 05:46:49 +0000
3+++ CMakeLists.txt 2014-03-27 03:44:10 +0000
4@@ -26,9 +26,9 @@
5 SET(GETTEXT_PACKAGE unity-scope-selfserviceupgrades)
6 SET(LOCALE_DIR "${CMAKE_INSTALL_DATADIR}/locale")
7
8-SET(CUSTOM_INSTALL_LIBDIR /custom/usr/lib/arm-linux-gnueabihf)
9+SET(CUSTOM_INSTALL_LIBDIR /custom/lib/arm-linux-gnueabihf)
10 SET(CUSTOM_INSTALL_DATADIR /custom/xdg/data/)
11-SET(SCOPE_INSTALL_DIR ${CUSTOM_INSTALL_LIBDIR}/unity/scopes/scope-selfserviceupgrades/)
12+SET(SCOPE_INSTALL_DIR ${CUSTOM_INSTALL_LIBDIR}/unity-scopes/scope-selfserviceupgrades/)
13
14 CONFIGURE_FILE(
15 "${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in"
16
17=== modified file 'debian/changelog'
18--- debian/changelog 2014-02-03 19:39:24 +0000
19+++ debian/changelog 2014-03-27 03:44:10 +0000
20@@ -1,3 +1,9 @@
21+unity-scope-selfserviceupgrades (0.3) trusty; urgency=medium
22+
23+ * Update for new api
24+
25+ -- Chris Wayne <[email protected]> Wed, 26 Mar 2014 22:28:00 -0400
26+
27 unity-scope-selfserviceupgrades (0.2) UNRELEASED; urgency=low
28
29 * Update renderer.json with karni's fixes
30
31=== modified file 'src/SelfServiceUpgradesQuery.cpp'
32--- src/SelfServiceUpgradesQuery.cpp 2014-02-22 05:46:49 +0000
33+++ src/SelfServiceUpgradesQuery.cpp 2014-03-27 03:44:10 +0000
34@@ -33,8 +33,8 @@
35 using namespace std;
36 using namespace unity::scopes;
37
38-SelfServiceUpgradesQuery::SelfServiceUpgradesQuery(Query const& query, QStringList const& scopes, QString const& locale)
39- : SearchQuery(),
40+SelfServiceUpgradesQuery::SelfServiceUpgradesQuery(CannedQuery const& query, QStringList const& scopes, QString const& locale)
41+ : SearchQueryBase(),
42 query_(query),
43 scopes_(scopes)
44 {
45
46=== modified file 'src/SelfServiceUpgradesQuery.h'
47--- src/SelfServiceUpgradesQuery.h 2014-02-12 02:14:37 +0000
48+++ src/SelfServiceUpgradesQuery.h 2014-03-27 03:44:10 +0000
49@@ -20,21 +20,21 @@
50 #define SELFSERVICEUPGRADESQUERY_H
51
52 #include <unity/scopes/ScopeBase.h>
53-#include <unity/scopes/Query.h>
54+#include <unity/scopes/SearchQueryBase.h>
55 #include <QStringList>
56 #include <string>
57 #include <memory>
58
59-class SelfServiceUpgradesQuery: public unity::scopes::SearchQuery
60+class SelfServiceUpgradesQuery: public unity::scopes::SearchQueryBase
61 {
62 public:
63- SelfServiceUpgradesQuery(unity::scopes::Query const& query, QStringList const& scopes, QString const& locale);
64+ SelfServiceUpgradesQuery(unity::scopes::CannedQuery const& query, QStringList const& scopes, QString const& locale);
65
66 virtual void run(unity::scopes::SearchReplyProxy const& reply) override;
67 virtual void cancelled() override;
68
69 private:
70- unity::scopes::Query query_;
71+ unity::scopes::CannedQuery query_;
72 QStringList scopes_;
73 };
74
75
76=== modified file 'src/SelfServiceUpgradesScope.cpp'
77--- src/SelfServiceUpgradesScope.cpp 2014-02-19 04:46:24 +0000
78+++ src/SelfServiceUpgradesScope.cpp 2014-03-27 03:44:10 +0000
79@@ -72,17 +72,17 @@
80 return VERSION;
81 }
82
83-QueryBase::UPtr SelfServiceUpgradesScope::create_query(Query const& query, SearchMetadata const&)
84+SearchQueryBase::UPtr SelfServiceUpgradesScope::search(const CannedQuery &query, SearchMetadata const&)
85 {
86 QStringList scopes;
87- QueryBase::UPtr q(new SelfServiceUpgradesQuery(query, scopes, m_locale));
88+ SearchQueryBase::UPtr q(new SelfServiceUpgradesQuery(query, scopes, m_locale));
89 return q;
90 }
91
92-QueryBase::UPtr SelfServiceUpgradesScope::preview(Result const& result,
93+PreviewQueryBase::UPtr SelfServiceUpgradesScope::preview(Result const& result,
94 ActionMetadata const& hints)
95 {
96- QueryBase::UPtr previewer(new SelfServiceUpgradesPreview(*this, result));
97+ PreviewQueryBase::UPtr previewer(new SelfServiceUpgradesPreview(*this, result));
98 return previewer;
99 }
100
101@@ -112,10 +112,10 @@
102 reply->register_layout({layout});
103
104 PreviewWidget header("header", "header");
105- header.add_component("title", "title");
106+ header.add_attribute_mapping("title", "title");
107
108 PreviewWidget art("art", "image");
109- art.add_component("source", "art");
110+ art.add_attribute_mapping("source", "art");
111
112 PreviewWidget actions("actions", "actions");
113 {
114@@ -124,7 +124,7 @@
115 {"id", Variant("open")},
116 {"label", result["action"]}
117 });
118- actions.add_attribute("actions", builder.end());
119+ actions.add_attribute_value("actions", builder.end());
120 }
121
122 reply->push({art, header, actions});
123
124=== modified file 'src/SelfServiceUpgradesScope.h'
125--- src/SelfServiceUpgradesScope.h 2014-02-19 04:46:24 +0000
126+++ src/SelfServiceUpgradesScope.h 2014-03-27 03:44:10 +0000
127@@ -21,6 +21,7 @@
128 #define SELFSERVICEUPGRADESSCOPE_H
129
130 #include <unity/scopes/ScopeBase.h>
131+#include <unity/scopes/SearchQueryBase.h>
132 #include <unity/scopes/PreviewReply.h>
133 #include <unity/scopes/PreviewWidget.h>
134 #include <unity/scopes/VariantBuilder.h>
135@@ -40,8 +41,8 @@
136 virtual int start(std::string const&, unity::scopes::RegistryProxy const&) override;
137 virtual void stop() override {}
138 virtual void run() override {}
139- virtual unity::scopes::QueryBase::UPtr create_query(unity::scopes::Query const& query, unity::scopes::SearchMetadata const&) override;
140- virtual unity::scopes::QueryBase::UPtr preview(unity::scopes::Result const&, unity::scopes::ActionMetadata const&) override;
141+ virtual unity::scopes::SearchQueryBase::UPtr search(unity::scopes::CannedQuery const& query, unity::scopes::SearchMetadata const&) override;
142+ virtual unity::scopes::PreviewQueryBase::UPtr preview(unity::scopes::Result const&, unity::scopes::ActionMetadata const&) override;
143
144 private:
145 void appendIfEnabled(QStringList &scopeToQuery, const QString &scopeId) const;
146@@ -55,7 +56,7 @@
147 //gulong m_disabledScopesSig;
148 };
149
150-class SelfServiceUpgradesPreview : public unity::scopes::PreviewQuery
151+class SelfServiceUpgradesPreview : public unity::scopes::PreviewQueryBase
152 {
153 public:
154 SelfServiceUpgradesPreview(SelfServiceUpgradesScope &scope, unity::scopes::Result const& result);

Subscribers

People subscribed via source and target branches

to all changes: