Merge lp:~marcustomlinson/qtcreator-plugin-ubuntu/fix-xml-scope-templates into lp:qtcreator-plugin-ubuntu

Proposed by Marcus Tomlinson
Status: Merged
Approved by: Benjamin Zeller
Approved revision: 420
Merged at revision: 420
Proposed branch: lp:~marcustomlinson/qtcreator-plugin-ubuntu/fix-xml-scope-templates
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 51 lines (+4/-12)
2 files modified
share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/api/client.cpp (+2/-6)
share/qtcreator/templates/wizards/ubuntu/scope/src/client.cpp (+2/-6)
To merge this branch: bzr merge lp:~marcustomlinson/qtcreator-plugin-ubuntu/fix-xml-scope-templates
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Benjamin Zeller Approve
Review via email: mp+277434@code.launchpad.net

Commit message

Fix mistake in XML scope templates where only odd numbered XML nodes where being read, causing a blank top level "City, Country" title (second node in XML)

To post a comment you must log in.
Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

LGTM

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

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-10-21 11:14:10 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope-14.10/src/api/client.cpp 2015-11-13 11:40:32 +0000
@@ -353,9 +353,7 @@
353353
354 /* If token is StartElement, we'll see if we can read it.*/354 /* If token is StartElement, we'll see if we can read it.*/
355 if (token == QXmlStreamReader::StartElement) {355 if (token == QXmlStreamReader::StartElement) {
356 if (root.name() == "current") {356 if (root.name() == "city") {
357 root.readNext();
358 } else if (root.name() == "city") {
359 parseCity(result.city, root);357 parseCity(result.city, root);
360 } else if (root.name() == "weather") {358 } else if (root.name() == "weather") {
361 parseWeather(result.weather, root);359 parseWeather(result.weather, root);
@@ -464,9 +462,7 @@
464462
465 /* If token is StartElement, we'll see if we can read it.*/463 /* If token is StartElement, we'll see if we can read it.*/
466 if (token == QXmlStreamReader::StartElement) {464 if (token == QXmlStreamReader::StartElement) {
467 if (root.name() == "weatherdata") {465 if (root.name() == "location") {
468 root.readNext();
469 } else if (root.name() == "location") {
470 parseLocation(result.city, root);466 parseLocation(result.city, root);
471 } else if (root.name() == "forecast") {467 } else if (root.name() == "forecast") {
472 parseForecast(result.weather, root);468 parseForecast(result.weather, root);
473469
=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope/src/client.cpp'
--- share/qtcreator/templates/wizards/ubuntu/scope/src/client.cpp 2015-10-21 11:14:10 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope/src/client.cpp 2015-11-13 11:40:32 +0000
@@ -352,9 +352,7 @@
352352
353 /* If token is StartElement, we'll see if we can read it.*/353 /* If token is StartElement, we'll see if we can read it.*/
354 if (token == QXmlStreamReader::StartElement) {354 if (token == QXmlStreamReader::StartElement) {
355 if (root.name() == "current") {355 if (root.name() == "city") {
356 root.readNext();
357 } else if (root.name() == "city") {
358 parseCity(result.city, root);356 parseCity(result.city, root);
359 } else if (root.name() == "weather") {357 } else if (root.name() == "weather") {
360 parseWeather(result.weather, root);358 parseWeather(result.weather, root);
@@ -463,9 +461,7 @@
463461
464 /* If token is StartElement, we'll see if we can read it.*/462 /* If token is StartElement, we'll see if we can read it.*/
465 if (token == QXmlStreamReader::StartElement) {463 if (token == QXmlStreamReader::StartElement) {
466 if (root.name() == "weatherdata") {464 if (root.name() == "location") {
467 root.readNext();
468 } else if (root.name() == "location") {
469 parseLocation(result.city, root);465 parseLocation(result.city, root);
470 } else if (root.name() == "forecast") {466 } else if (root.name() == "forecast") {
471 parseForecast(result.weather, root);467 parseForecast(result.weather, root);

Subscribers

People subscribed via source and target branches