Merge lp:~marcustomlinson/qtcreator-plugin-ubuntu/lp-1508418 into lp:qtcreator-plugin-ubuntu

Proposed by Marcus Tomlinson
Status: Merged
Approved by: Benjamin Zeller
Approved revision: 417
Merged at revision: 417
Proposed branch: lp:~marcustomlinson/qtcreator-plugin-ubuntu/lp-1508418
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 110 lines (+25/-21)
4 files modified
share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/api/client.cpp (+10/-10)
share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/scope/query.cpp (+1/-0)
share/qtcreator/templates/wizards/ubuntu/scope/src/client.cpp (+10/-10)
share/qtcreator/templates/wizards/ubuntu/scope/tests/unit/test-scope.py (+4/-1)
To merge this branch: bzr merge lp:~marcustomlinson/qtcreator-plugin-ubuntu/lp-1508418
Reviewer Review Type Date Requested Status
Benjamin Zeller Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+275166@code.launchpad.net

Commit message

Fixed scopes templates:
* OpenWeatherMap now requires an APPID key for all requests.
* Fixed "'cerr' was not declared in this scope" error in query.cpp.
* Fixed import in test-scope.py.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
417. By Marcus Tomlinson

Fixed import in test-scope.py

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/api/client.cpp'
2--- share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/api/client.cpp 2015-06-11 10:03:53 +0000
3+++ share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/api/client.cpp 2015-10-21 16:02:48 +0000
4@@ -289,14 +289,13 @@
5 // Build a URI and get the contents.
6 // The fist parameter forms the path part of the URI.
7 // The second parameter forms the CGI parameters.
8- get(
9- { "data", "2.5", "weather" },
10- { { "q", query }, { "units", "metric" }
11+ get( { "data", "2.5", "weather" },
12+ { { "q", query }, { "units", "metric" }
13+ , { "APPID", "2b12bf09b4e0ab0c1aa5e32a9a3f0cdc" }
14 @if "%ContentType%" == "network-netcpp-qxml"
15- , { "mode", "xml" }
16+ , { "mode", "xml" }
17 @endif
18- },
19- root);
20+ }, root);
21 // e.g. http://api.openweathermap.org/data/2.5/weather?q=QUERY&units=metric
22
23 Current result;
24@@ -385,12 +384,13 @@
25 // Build a URI and get the contents
26 // The fist parameter forms the path part of the URI.
27 // The second parameter forms the CGI parameters.
28- get( { "data", "2.5", "forecast", "daily" }, { { "q", query }, { "units",
29- "metric" }, { "cnt", to_string(cnt) }
30+ get( { "data", "2.5", "forecast", "daily" },
31+ { { "q", query }, { "units", "metric" }, { "cnt", to_string(cnt) }
32+ , { "APPID", "2b12bf09b4e0ab0c1aa5e32a9a3f0cdc" }
33 @if "%ContentType%" == "network-netcpp-qxml"
34- , { "mode", "xml" }
35+ , { "mode", "xml" }
36 @endif
37- }, root);
38+ }, root);
39 // e.g. http://api.openweathermap.org/data/2.5/forecast/daily/?q=QUERY&units=metric&cnt=7
40
41 Forecast result;
42
43=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/scope/query.cpp'
44--- share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/scope/query.cpp 2015-06-11 10:03:53 +0000
45+++ share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/scope/query.cpp 2015-10-21 16:02:48 +0000
46@@ -10,6 +10,7 @@
47 #include <unity/scopes/SearchReply.h>
48
49 #include <iomanip>
50+#include <iostream>
51 #include <sstream>
52
53 namespace sc = unity::scopes;
54
55=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope/src/client.cpp'
56--- share/qtcreator/templates/wizards/ubuntu/scope/src/client.cpp 2015-05-13 07:23:03 +0000
57+++ share/qtcreator/templates/wizards/ubuntu/scope/src/client.cpp 2015-10-21 16:02:48 +0000
58@@ -288,14 +288,13 @@
59 // Build a URI and get the contents.
60 // The fist parameter forms the path part of the URI.
61 // The second parameter forms the CGI parameters.
62- get(
63- { "data", "2.5", "weather" },
64- { { "q", query }, { "units", "metric" }
65+ get( { "data", "2.5", "weather" },
66+ { { "q", query }, { "units", "metric" }
67+ , { "APPID", "2b12bf09b4e0ab0c1aa5e32a9a3f0cdc" }
68 @if "%ContentType%" == "network-netcpp-qxml"
69- , { "mode", "xml" }
70+ , { "mode", "xml" }
71 @endif
72- },
73- root);
74+ }, root);
75 // e.g. http://api.openweathermap.org/data/2.5/weather?q=QUERY&units=metric
76
77 Current result;
78@@ -384,12 +383,13 @@
79 // Build a URI and get the contents
80 // The fist parameter forms the path part of the URI.
81 // The second parameter forms the CGI parameters.
82- get( { "data", "2.5", "forecast", "daily" }, { { "q", query }, { "units",
83- "metric" }, { "cnt", to_string(cnt) }
84+ get( { "data", "2.5", "forecast", "daily" },
85+ { { "q", query }, { "units", "metric" }, { "cnt", to_string(cnt) }
86+ , { "APPID", "2b12bf09b4e0ab0c1aa5e32a9a3f0cdc" }
87 @if "%ContentType%" == "network-netcpp-qxml"
88- , { "mode", "xml" }
89+ , { "mode", "xml" }
90 @endif
91- }, root);
92+ }, root);
93 // e.g. http://api.openweathermap.org/data/2.5/forecast/daily/?q=QUERY&units=metric&cnt=7
94
95 Forecast result;
96
97=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope/tests/unit/test-scope.py'
98--- share/qtcreator/templates/wizards/ubuntu/scope/tests/unit/test-scope.py 2015-05-14 07:41:37 +0000
99+++ share/qtcreator/templates/wizards/ubuntu/scope/tests/unit/test-scope.py 2015-10-21 16:02:48 +0000
100@@ -1,6 +1,9 @@
101 #!/usr/bin/env python3
102
103-from scope_harness import *
104+from scope_harness import (
105+ CategoryListMatcher, CategoryListMatcherMode, CategoryMatcher,
106+ Parameters, ResultMatcher, ScopeHarness
107+)
108 from scope_harness.testing import *
109 import unittest, sys, os
110 from subprocess import Popen, PIPE

Subscribers

People subscribed via source and target branches