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
=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/api/client.cpp'
--- share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/api/client.cpp 2015-06-11 10:03:53 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/api/client.cpp 2015-10-21 16:02:48 +0000
@@ -289,14 +289,13 @@
289 // Build a URI and get the contents.289 // Build a URI and get the contents.
290 // The fist parameter forms the path part of the URI.290 // The fist parameter forms the path part of the URI.
291 // The second parameter forms the CGI parameters.291 // The second parameter forms the CGI parameters.
292 get(292 get( { "data", "2.5", "weather" },
293 { "data", "2.5", "weather" },293 { { "q", query }, { "units", "metric" }
294 { { "q", query }, { "units", "metric" }294 , { "APPID", "2b12bf09b4e0ab0c1aa5e32a9a3f0cdc" }
295@if "%ContentType%" == "network-netcpp-qxml"295@if "%ContentType%" == "network-netcpp-qxml"
296 , { "mode", "xml" }296 , { "mode", "xml" }
297@endif297@endif
298 },298 }, root);
299 root);
300 // e.g. http://api.openweathermap.org/data/2.5/weather?q=QUERY&units=metric299 // e.g. http://api.openweathermap.org/data/2.5/weather?q=QUERY&units=metric
301300
302 Current result;301 Current result;
@@ -385,12 +384,13 @@
385 // Build a URI and get the contents384 // Build a URI and get the contents
386 // The fist parameter forms the path part of the URI.385 // The fist parameter forms the path part of the URI.
387 // The second parameter forms the CGI parameters.386 // The second parameter forms the CGI parameters.
388 get( { "data", "2.5", "forecast", "daily" }, { { "q", query }, { "units",387 get( { "data", "2.5", "forecast", "daily" },
389 "metric" }, { "cnt", to_string(cnt) }388 { { "q", query }, { "units", "metric" }, { "cnt", to_string(cnt) }
389 , { "APPID", "2b12bf09b4e0ab0c1aa5e32a9a3f0cdc" }
390@if "%ContentType%" == "network-netcpp-qxml"390@if "%ContentType%" == "network-netcpp-qxml"
391 , { "mode", "xml" }391 , { "mode", "xml" }
392@endif392@endif
393 }, root);393 }, root);
394 // e.g. http://api.openweathermap.org/data/2.5/forecast/daily/?q=QUERY&units=metric&cnt=7394 // e.g. http://api.openweathermap.org/data/2.5/forecast/daily/?q=QUERY&units=metric&cnt=7
395395
396 Forecast result;396 Forecast result;
397397
=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/scope/query.cpp'
--- share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/scope/query.cpp 2015-06-11 10:03:53 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/scope/query.cpp 2015-10-21 16:02:48 +0000
@@ -10,6 +10,7 @@
10#include <unity/scopes/SearchReply.h>10#include <unity/scopes/SearchReply.h>
1111
12#include <iomanip>12#include <iomanip>
13#include <iostream>
13#include <sstream>14#include <sstream>
1415
15namespace sc = unity::scopes;16namespace sc = unity::scopes;
1617
=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope/src/client.cpp'
--- share/qtcreator/templates/wizards/ubuntu/scope/src/client.cpp 2015-05-13 07:23:03 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope/src/client.cpp 2015-10-21 16:02:48 +0000
@@ -288,14 +288,13 @@
288 // Build a URI and get the contents.288 // Build a URI and get the contents.
289 // The fist parameter forms the path part of the URI.289 // The fist parameter forms the path part of the URI.
290 // The second parameter forms the CGI parameters.290 // The second parameter forms the CGI parameters.
291 get(291 get( { "data", "2.5", "weather" },
292 { "data", "2.5", "weather" },292 { { "q", query }, { "units", "metric" }
293 { { "q", query }, { "units", "metric" }293 , { "APPID", "2b12bf09b4e0ab0c1aa5e32a9a3f0cdc" }
294@if "%ContentType%" == "network-netcpp-qxml"294@if "%ContentType%" == "network-netcpp-qxml"
295 , { "mode", "xml" }295 , { "mode", "xml" }
296@endif296@endif
297 },297 }, root);
298 root);
299 // e.g. http://api.openweathermap.org/data/2.5/weather?q=QUERY&units=metric298 // e.g. http://api.openweathermap.org/data/2.5/weather?q=QUERY&units=metric
300299
301 Current result;300 Current result;
@@ -384,12 +383,13 @@
384 // Build a URI and get the contents383 // Build a URI and get the contents
385 // The fist parameter forms the path part of the URI.384 // The fist parameter forms the path part of the URI.
386 // The second parameter forms the CGI parameters.385 // The second parameter forms the CGI parameters.
387 get( { "data", "2.5", "forecast", "daily" }, { { "q", query }, { "units",386 get( { "data", "2.5", "forecast", "daily" },
388 "metric" }, { "cnt", to_string(cnt) }387 { { "q", query }, { "units", "metric" }, { "cnt", to_string(cnt) }
388 , { "APPID", "2b12bf09b4e0ab0c1aa5e32a9a3f0cdc" }
389@if "%ContentType%" == "network-netcpp-qxml"389@if "%ContentType%" == "network-netcpp-qxml"
390 , { "mode", "xml" }390 , { "mode", "xml" }
391@endif391@endif
392 }, root);392 }, root);
393 // e.g. http://api.openweathermap.org/data/2.5/forecast/daily/?q=QUERY&units=metric&cnt=7393 // e.g. http://api.openweathermap.org/data/2.5/forecast/daily/?q=QUERY&units=metric&cnt=7
394394
395 Forecast result;395 Forecast result;
396396
=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope/tests/unit/test-scope.py'
--- share/qtcreator/templates/wizards/ubuntu/scope/tests/unit/test-scope.py 2015-05-14 07:41:37 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope/tests/unit/test-scope.py 2015-10-21 16:02:48 +0000
@@ -1,6 +1,9 @@
1#!/usr/bin/env python31#!/usr/bin/env python3
22
3from scope_harness import *3from scope_harness import (
4 CategoryListMatcher, CategoryListMatcherMode, CategoryMatcher,
5 Parameters, ResultMatcher, ScopeHarness
6)
4from scope_harness.testing import *7from scope_harness.testing import *
5import unittest, sys, os8import unittest, sys, os
6from subprocess import Popen, PIPE9from subprocess import Popen, PIPE

Subscribers

People subscribed via source and target branches