unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 8ba1a7213ba38b4276a10313cbff99e6491f230f 3445 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
 
Extracted from following patch of gpsbabel:
https://github.com/gpsbabel/gpsbabel/commit/604178aa8ad4d3c3ad218df24c1e9a6a1f683bb3

From 604178aa8ad4d3c3ad218df24c1e9a6a1f683bb3 Mon Sep 17 00:00:00 2001
From: Harel Mazor <harel.mazor@gmail.com>
Date: Tue, 24 Jan 2017 00:35:04 +0200
Subject: [PATCH] Added geojson read capablity, moved magic strings to
 constants, fixed windows compilation issues.

--- a/tef_xml.cc
+++ b/tef_xml.cc
@@ -72,11 +72,11 @@ tef_start(xg_string args, const QXmlStreamAttributes* attrv)
   bool valid = false;
 
   foreach(QXmlStreamAttribute attr, *attrv) {
-    if (attr.name().compare("Comment", Qt::CaseInsensitive) == 0) {
-      if (attr.value().compare("TourExchangeFormat", Qt::CaseInsensitive) == 0) {
+    if (attr.name().compare(QString("Comment"), Qt::CaseInsensitive) == 0) {
+      if (attr.value().compare(QString("TourExchangeFormat"), Qt::CaseInsensitive) == 0) {
         valid = true;
       }
-    } else if (attr.name().compare("Version", Qt::CaseInsensitive) == 0) {
+    } else if (attr.name().compare(QString("Version"), Qt::CaseInsensitive) == 0) {
       version = attr.value().toString().toDouble();
     }
   }
@@ -95,9 +95,9 @@ tef_header(xg_string args, const QXmlStreamAttributes* attrv)
 {
   route = route_head_alloc();
   foreach(QXmlStreamAttribute attr, *attrv) {
-    if (attr.name().compare("Name", Qt::CaseInsensitive) == 0) {
+    if (attr.name().compare(QString("Name"), Qt::CaseInsensitive) == 0) {
       route->rte_name = attr.value().toString().trimmed();
-    } else if (attr.name().compare("Software", Qt::CaseInsensitive) == 0) {
+    } else if (attr.name().compare(QString("Software"), Qt::CaseInsensitive) == 0) {
       route->rte_desc = attr.value().toString().trimmed();
     }
   }
@@ -248,20 +248,20 @@ tef_item_start(xg_string args, const QXmlStreamAttributes* attrv)
     QString attrstr = attr.value().toString();
     QByteArray attrtext = attrstr.toUtf8();
 
-    if (attr.name().compare("SegDescription", Qt::CaseInsensitive) == 0) {
+    if (attr.name().compare(QString("SegDescription"), Qt::CaseInsensitive) == 0) {
       wpt_tmp->shortname = attrstr.trimmed();
-    } else if (attr.name().compare("PointDescription", Qt::CaseInsensitive) == 0) {
+    } else if (attr.name().compare(QString("PointDescription"), Qt::CaseInsensitive) == 0) {
       wpt_tmp->description = attrstr.trimmed();
-    } else if (attr.name().compare("ViaStation", Qt::CaseInsensitive) == 0 &&
-               attr.value().compare("true", Qt::CaseInsensitive) == 0) {
+    } else if (attr.name().compare(QString("ViaStation"), Qt::CaseInsensitive) == 0 &&
+               attr.value().compare(QString("true"), Qt::CaseInsensitive) == 0) {
       wpt_tmp->wpt_flags.fmt_use = 1;  /* only a flag */
 
       /* new in TEF V2 */
-    } else if (attr.name().compare("Instruction", Qt::CaseInsensitive) == 0) {
+    } else if (attr.name().compare(QString("Instruction"), Qt::CaseInsensitive) == 0) {
       wpt_tmp->description = attrstr.trimmed();
-    } else if (attr.name().compare("Altitude", Qt::CaseInsensitive) == 0) {
+    } else if (attr.name().compare(QString("Altitude"), Qt::CaseInsensitive) == 0) {
       wpt_tmp->altitude = attrstr.toDouble();
-    } else if (attr.name().compare("TimeStamp", Qt::CaseInsensitive) == 0) {
+    } else if (attr.name().compare(QString("TimeStamp"), Qt::CaseInsensitive) == 0) {
       /* nothing for the moment */
     }
   }
-- 
2.16.1


debug log:

solving 8ba1a7213b ...
found 8ba1a7213b in https://git.savannah.gnu.org/cgit/guix.git

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).