|
Added
Link Here
|
| 1 |
--- tef_xml.cc.orig 2018-04-11 18:10:39 UTC |
| 2 |
+++ tef_xml.cc |
| 3 |
@@ -72,11 +72,11 @@ |
| 4 |
bool valid = false; |
| 5 |
|
| 6 |
foreach(QXmlStreamAttribute attr, *attrv) { |
| 7 |
- if (attr.name().compare("Comment", Qt::CaseInsensitive) == 0) { |
| 8 |
- if (attr.value().compare("TourExchangeFormat", Qt::CaseInsensitive) == 0) { |
| 9 |
+ if (attr.name().compare(QLatin1String("Comment"), Qt::CaseInsensitive) == 0) { |
| 10 |
+ if (attr.value().compare(QLatin1String("TourExchangeFormat"), Qt::CaseInsensitive) == 0) { |
| 11 |
valid = true; |
| 12 |
} |
| 13 |
- } else if (attr.name().compare("Version", Qt::CaseInsensitive) == 0) { |
| 14 |
+ } else if (attr.name().compare(QLatin1String("Version"), Qt::CaseInsensitive) == 0) { |
| 15 |
version = attr.value().toString().toDouble(); |
| 16 |
} |
| 17 |
} |
| 18 |
@@ -95,9 +95,9 @@ |
| 19 |
{ |
| 20 |
route = route_head_alloc(); |
| 21 |
foreach(QXmlStreamAttribute attr, *attrv) { |
| 22 |
- if (attr.name().compare("Name", Qt::CaseInsensitive) == 0) { |
| 23 |
+ if (attr.name().compare(QLatin1String("Name"), Qt::CaseInsensitive) == 0) { |
| 24 |
route->rte_name = attr.value().toString().trimmed(); |
| 25 |
- } else if (attr.name().compare("Software", Qt::CaseInsensitive) == 0) { |
| 26 |
+ } else if (attr.name().compare(QLatin1String("Software"), Qt::CaseInsensitive) == 0) { |
| 27 |
route->rte_desc = attr.value().toString().trimmed(); |
| 28 |
} |
| 29 |
} |
| 30 |
@@ -248,20 +248,20 @@ |
| 31 |
QString attrstr = attr.value().toString(); |
| 32 |
QByteArray attrtext = attrstr.toUtf8(); |
| 33 |
|
| 34 |
- if (attr.name().compare("SegDescription", Qt::CaseInsensitive) == 0) { |
| 35 |
+ if (attr.name().compare(QLatin1String("SegDescription"), Qt::CaseInsensitive) == 0) { |
| 36 |
wpt_tmp->shortname = attrstr.trimmed(); |
| 37 |
- } else if (attr.name().compare("PointDescription", Qt::CaseInsensitive) == 0) { |
| 38 |
+ } else if (attr.name().compare(QLatin1String("PointDescription"), Qt::CaseInsensitive) == 0) { |
| 39 |
wpt_tmp->description = attrstr.trimmed(); |
| 40 |
- } else if (attr.name().compare("ViaStation", Qt::CaseInsensitive) == 0 && |
| 41 |
- attr.value().compare("true", Qt::CaseInsensitive) == 0) { |
| 42 |
+ } else if (attr.name().compare(QLatin1String("ViaStation"), Qt::CaseInsensitive) == 0 && |
| 43 |
+ attr.value().compare(QLatin1String("true"), Qt::CaseInsensitive) == 0) { |
| 44 |
wpt_tmp->wpt_flags.fmt_use = 1; /* only a flag */ |
| 45 |
|
| 46 |
/* new in TEF V2 */ |
| 47 |
- } else if (attr.name().compare("Instruction", Qt::CaseInsensitive) == 0) { |
| 48 |
+ } else if (attr.name().compare(QLatin1String("Instruction"), Qt::CaseInsensitive) == 0) { |
| 49 |
wpt_tmp->description = attrstr.trimmed(); |
| 50 |
- } else if (attr.name().compare("Altitude", Qt::CaseInsensitive) == 0) { |
| 51 |
+ } else if (attr.name().compare(QLatin1String("Altitude"), Qt::CaseInsensitive) == 0) { |
| 52 |
wpt_tmp->altitude = attrstr.toDouble(); |
| 53 |
- } else if (attr.name().compare("TimeStamp", Qt::CaseInsensitive) == 0) { |
| 54 |
+ } else if (attr.name().compare(QLatin1String("TimeStamp"), Qt::CaseInsensitive) == 0) { |
| 55 |
/* nothing for the moment */ |
| 56 |
} |
| 57 |
} |