Merge lp:~xavi-garcia-mena/qtcreator-plugin-ubuntu/template-comments into lp:qtcreator-plugin-ubuntu

Proposed by Xavi Garcia
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 312
Merged at revision: 316
Proposed branch: lp:~xavi-garcia-mena/qtcreator-plugin-ubuntu/template-comments
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 95 lines (+32/-1)
4 files modified
debian/control (+1/-1)
share/qtcreator/templates/wizards/ubuntu/scope/src/api/client.cpp (+16/-0)
share/qtcreator/templates/wizards/ubuntu/scope/src/scope/preview.cpp (+7/-0)
share/qtcreator/templates/wizards/ubuntu/scope/src/scope/query.cpp (+8/-0)
To merge this branch: bzr merge lp:~xavi-garcia-mena/qtcreator-plugin-ubuntu/template-comments
Reviewer Review Type Date Requested Status
Zoltan Balogh Approve
Pete Woods (community) Approve
Review via email: mp+244706@code.launchpad.net

Commit message

Updated debian/control to fix wrong dependency.

Description of the change

Added some new comments to the code.

Updated debian/control to fix wrong dependency.

To post a comment you must log in.
Revision history for this message
Pete Woods (pete-woods) :
review: Approve
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-12-12 09:19:25 +0000
3+++ debian/control 2014-12-15 10:24:43 +0000
4@@ -9,7 +9,7 @@
5 libqt5widgets5 (>= 5.3),
6 libsqlite3-dev,
7 qt5-qmake (>= 5.3),
8- qtcreator-dev (>= 3.1),
9+ qtcreator-dev (>= 3.1.1-0ubuntu7),
10 qtdeclarative5-dev-tools (>= 5.3),
11 qtdeclarative5-private-dev (>= 5.3),
12 qtquick1-5-dev (>= 5.3),
13
14=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope/src/api/client.cpp'
15--- share/qtcreator/templates/wizards/ubuntu/scope/src/api/client.cpp 2014-10-29 16:56:14 +0000
16+++ share/qtcreator/templates/wizards/ubuntu/scope/src/api/client.cpp 2014-12-15 10:24:43 +0000
17@@ -173,6 +173,13 @@
18 Client::ResultList Client::search(const string &query) {
19 ResultList results;
20
21+ // This is the method that we will call from the Query class.
22+ // It just returns some results.
23+ // You can add here your code to get results from an http API, from your local disk
24+ // or anywhere.
25+
26+ // In this case we just create some results withouth accessing any other source of
27+ // data
28 {
29 Result result;
30 result.uri = "uri";
31@@ -262,11 +269,20 @@
32 }
33
34 Client::Current Client::weather(const string& query) {
35+ // This is the method that we will call from the Query class.
36+ // It connects to an HTTP source and returns the results.
37+
38 @if "%ContentType%" == "network-netcpp-json"
39+
40+ // In this case we are going to retrieve JSON data.
41 json::Value root;
42 @elsif "%ContentType%" == "network-netcpp-qjson"
43+
44+ // In this case we are going to retrieve JSON data.
45 QJsonDocument root;
46 @elsif "%ContentType%" == "network-netcpp-qxml"
47+
48+ // In this case we are going to retrieve XML data.
49 QXmlStreamReader root;
50 @endif
51
52
53=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope/src/scope/preview.cpp'
54--- share/qtcreator/templates/wizards/ubuntu/scope/src/scope/preview.cpp 2014-09-03 14:56:27 +0000
55+++ share/qtcreator/templates/wizards/ubuntu/scope/src/scope/preview.cpp 2014-12-15 10:24:43 +0000
56@@ -24,6 +24,13 @@
57 // Support three different column layouts
58 sc::ColumnLayout layout1col(1), layout2col(2), layout3col(3);
59
60+ // We define 3 different layouts, that will be used depending on the
61+ // device. The shell (view) will decide which layout fits best.
62+ // If, for instance, we are executing in a tablet probably the view will use
63+ // 2 or more columns.
64+ // Column layout definitions are optional.
65+ // However, we recommend that scopes define layouts for the best visual appearance.
66+
67 // Single column layout
68 layout1col.add_column( { "image", "header", "summary" });
69
70
71=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope/src/scope/query.cpp'
72--- share/qtcreator/templates/wizards/ubuntu/scope/src/scope/query.cpp 2014-10-27 16:24:10 +0000
73+++ share/qtcreator/templates/wizards/ubuntu/scope/src/scope/query.cpp 2014-12-15 10:24:43 +0000
74@@ -116,6 +116,10 @@
75 // Trim the query string of whitespace
76 string query_string = alg::trim_copy(query.query_string());
77
78+ // the Client is the helper class that provides the results
79+ // without mixing APIs and scopes code.
80+ // Add your code to retreive xml, json, or any other kind of result
81+ // in the client.
82 Client::ResultList results;
83 if (query_string.empty()) {
84 // If the string is empty, pick a default
85@@ -167,6 +171,10 @@
86 // Trim the query string of whitespace
87 string query_string = alg::trim_copy(query.query_string());
88
89+ // the Client is the helper class that provides the results
90+ // without mixing APIs and scopes code.
91+ // Add your code to retreive xml, json, or any other kind of result
92+ // in the client.
93 Client::Current current;
94 if (query_string.empty()) {
95 // If the string is empty, get the current weather for London

Subscribers

People subscribed via source and target branches

to all changes: