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

Proposed by Chris Wayne
Status: Merged
Merged at revision: 15
Proposed branch: lp:~savilerow-team/savilerow/unity-scope-selfserviceplan-newapi
Merge into: lp:~savilerow-team/savilerow/unity-scope-selfserviceplan
Diff against target: 150 lines (+25/-19)
6 files modified
CMakeLists.txt (+2/-2)
debian/changelog (+6/-0)
src/SelfServicePlanQuery.cpp (+2/-2)
src/SelfServicePlanQuery.h (+4/-4)
src/SelfServicePlanScope.cpp (+7/-7)
src/SelfServicePlanScope.h (+4/-4)
To merge this branch: bzr merge lp:~savilerow-team/savilerow/unity-scope-selfserviceplan-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 :

75 - header.add_component("title", "title");
76 + header.add_atribute_mapping("title", "title");
77
78 PreviewWidget art("art", "image");
79 - art.add_component("source", "art");
80 + art.add_atribute_mapping("source", "art");
81
82 PreviewWidget description("description", "text");
83 - description.add_component("text", "summary");
84 + description.add_atribute_mapping("text", "summary");

Should be add_attribute_mapping

review: Needs Fixing
16. By Chris Wayne

Typing is hard

Revision history for this message
Scott Sweeny (ssweeny) wrote :

Retested and B/I/R for me. Looks good.

review: Approve
17. By Chris Wayne

releasing package unity-scope-selfserviceplan version 0.3

18. 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:17:13 +0000
3+++ CMakeLists.txt 2014-03-27 03:43:44 +0000
4@@ -26,9 +26,9 @@
5 SET(GETTEXT_PACKAGE unity-scope-selfserviceplan)
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-selfserviceplan/)
12+SET(SCOPE_INSTALL_DIR ${CUSTOM_INSTALL_LIBDIR}/unity-scopes/scope-selfserviceplan/)
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:36:16 +0000
19+++ debian/changelog 2014-03-27 03:43:44 +0000
20@@ -1,3 +1,9 @@
21+unity-scope-selfserviceplan (0.3) trusty; urgency=medium
22+
23+ * Update for new api
24+
25+ -- Chris Wayne <[email protected]> Wed, 26 Mar 2014 22:27:35 -0400
26+
27 unity-scope-selfserviceplan (0.2) UNRELEASED; urgency=medium
28
29 * Update renderer.json with karni's fixes
30
31=== modified file 'src/SelfServicePlanQuery.cpp'
32--- src/SelfServicePlanQuery.cpp 2014-02-22 05:17:13 +0000
33+++ src/SelfServicePlanQuery.cpp 2014-03-27 03:43:44 +0000
34@@ -33,8 +33,8 @@
35 using namespace std;
36 using namespace unity::scopes;
37
38-SelfServicePlanQuery::SelfServicePlanQuery(Query const& query, QStringList const& scopes, QString const& locale)
39- : SearchQuery(),
40+SelfServicePlanQuery::SelfServicePlanQuery(CannedQuery const& query, QStringList const& scopes, QString const& locale)
41+ : SearchQueryBase(),
42 query_(query),
43 scopes_(scopes)
44 {
45
46=== modified file 'src/SelfServicePlanQuery.h'
47--- src/SelfServicePlanQuery.h 2014-02-12 02:14:18 +0000
48+++ src/SelfServicePlanQuery.h 2014-03-27 03:43:44 +0000
49@@ -20,21 +20,21 @@
50 #define SELFSERVICEPLANQUERY_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 SelfServicePlanQuery: public unity::scopes::SearchQuery
60+class SelfServicePlanQuery: public unity::scopes::SearchQueryBase
61 {
62 public:
63- SelfServicePlanQuery(unity::scopes::Query const& query, QStringList const& scopes, QString const& locale);
64+ SelfServicePlanQuery(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/SelfServicePlanScope.cpp'
77--- src/SelfServicePlanScope.cpp 2014-02-19 04:14:32 +0000
78+++ src/SelfServicePlanScope.cpp 2014-03-27 03:43:44 +0000
79@@ -72,17 +72,17 @@
80 return VERSION;
81 }
82
83-QueryBase::UPtr SelfServicePlanScope::create_query(Query const& query, SearchMetadata const&)
84+SearchQueryBase::UPtr SelfServicePlanScope::search(const CannedQuery &query, SearchMetadata const&)
85 {
86 QStringList scopes;
87- QueryBase::UPtr q(new SelfServicePlanQuery(query, scopes, m_locale));
88+ SearchQueryBase::UPtr q(new SelfServicePlanQuery(query, scopes, m_locale));
89 return q;
90 }
91
92-QueryBase::UPtr SelfServicePlanScope::preview(Result const& result,
93+PreviewQueryBase::UPtr SelfServicePlanScope::preview(Result const& result,
94 ActionMetadata const& hints)
95 {
96- QueryBase::UPtr previewer(new SelfServicePlanPreview(*this, result));
97+ PreviewQueryBase::UPtr previewer(new SelfServicePlanPreview(*this, result));
98 return previewer;
99 }
100
101@@ -112,13 +112,13 @@
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 description("description", "text");
113- description.add_component("text", "summary");
114+ description.add_attribute_mapping("text", "summary");
115
116 reply->push({art, header, description,});
117 }
118
119=== modified file 'src/SelfServicePlanScope.h'
120--- src/SelfServicePlanScope.h 2014-02-19 04:14:32 +0000
121+++ src/SelfServicePlanScope.h 2014-03-27 03:43:44 +0000
122@@ -21,7 +21,7 @@
123 #define SELFSERVICEPLANSCOPE_H
124
125 #include <unity/scopes/ScopeBase.h>
126-#include <unity/scopes/Query.h>
127+#include <unity/scopes/SearchQueryBase.h>
128 #include <unity/scopes/PreviewReply.h>
129 #include <unity/scopes/PreviewWidget.h>
130 #include <unity/scopes/VariantBuilder.h>
131@@ -41,8 +41,8 @@
132 virtual int start(std::string const&, unity::scopes::RegistryProxy const&) override;
133 virtual void stop() override {}
134 virtual void run() override {}
135- virtual unity::scopes::QueryBase::UPtr create_query(unity::scopes::Query const& query, unity::scopes::SearchMetadata const&) override;
136- virtual unity::scopes::QueryBase::UPtr preview(unity::scopes::Result const&, unity::scopes::ActionMetadata const&) override;
137+ virtual unity::scopes::SearchQueryBase::UPtr search(unity::scopes::CannedQuery const& query, unity::scopes::SearchMetadata const&) override;
138+ virtual unity::scopes::PreviewQueryBase::UPtr preview(unity::scopes::Result const&, unity::scopes::ActionMetadata const&) override;
139
140 private:
141 void appendIfEnabled(QStringList &scopeToQuery, const QString &scopeId) const;
142@@ -56,7 +56,7 @@
143 //gulong m_disabledScopesSig;
144 };
145
146-class SelfServicePlanPreview : public unity::scopes::PreviewQuery
147+class SelfServicePlanPreview : public unity::scopes::PreviewQueryBase
148 {
149 public:
150 SelfServicePlanPreview(SelfServicePlanScope &scope, unity::scopes::Result const& result);

Subscribers

People subscribed via source and target branches

to all changes: