Lines 72-82
Link Here
|
72 |
bool valid = false; |
72 |
bool valid = false; |
73 |
|
73 |
|
74 |
foreach(QXmlStreamAttribute attr, *attrv) { |
74 |
foreach(QXmlStreamAttribute attr, *attrv) { |
75 |
if (attr.name().compare("Comment", Qt::CaseInsensitive) == 0) { |
75 |
if (attr.name().compare(QStringLiteral("Comment"), Qt::CaseInsensitive) == 0) { |
76 |
if (attr.value().compare("TourExchangeFormat", Qt::CaseInsensitive) == 0) { |
76 |
if (attr.value().compare(QStringLiteral("TourExchangeFormat"), Qt::CaseInsensitive) == 0) { |
77 |
valid = true; |
77 |
valid = true; |
78 |
} |
78 |
} |
79 |
} else if (attr.name().compare("Version", Qt::CaseInsensitive) == 0) { |
79 |
} else if (attr.name().compare(QStringLiteral("Version"), Qt::CaseInsensitive) == 0) { |
80 |
version = attr.value().toString().toDouble(); |
80 |
version = attr.value().toString().toDouble(); |
81 |
} |
81 |
} |
82 |
} |
82 |
} |
Lines 95-103
Link Here
|
95 |
{ |
95 |
{ |
96 |
route = route_head_alloc(); |
96 |
route = route_head_alloc(); |
97 |
foreach(QXmlStreamAttribute attr, *attrv) { |
97 |
foreach(QXmlStreamAttribute attr, *attrv) { |
98 |
if (attr.name().compare("Name", Qt::CaseInsensitive) == 0) { |
98 |
if (attr.name().compare(QStringLiteral("Name"), Qt::CaseInsensitive) == 0) { |
99 |
route->rte_name = attr.value().toString().trimmed(); |
99 |
route->rte_name = attr.value().toString().trimmed(); |
100 |
} else if (attr.name().compare("Software", Qt::CaseInsensitive) == 0) { |
100 |
} else if (attr.name().compare(QStringLiteral("Software"), Qt::CaseInsensitive) == 0) { |
101 |
route->rte_desc = attr.value().toString().trimmed(); |
101 |
route->rte_desc = attr.value().toString().trimmed(); |
102 |
} |
102 |
} |
103 |
} |
103 |
} |
Lines 248-267
Link Here
|
248 |
QString attrstr = attr.value().toString(); |
248 |
QString attrstr = attr.value().toString(); |
249 |
QByteArray attrtext = attrstr.toUtf8(); |
249 |
QByteArray attrtext = attrstr.toUtf8(); |
250 |
|
250 |
|
251 |
if (attr.name().compare("SegDescription", Qt::CaseInsensitive) == 0) { |
251 |
if (attr.name().compare(QStringLiteral("SegDescription"), Qt::CaseInsensitive) == 0) { |
252 |
wpt_tmp->shortname = attrstr.trimmed(); |
252 |
wpt_tmp->shortname = attrstr.trimmed(); |
253 |
} else if (attr.name().compare("PointDescription", Qt::CaseInsensitive) == 0) { |
253 |
} else if (attr.name().compare(QStringLiteral("PointDescription"), Qt::CaseInsensitive) == 0) { |
254 |
wpt_tmp->description = attrstr.trimmed(); |
254 |
wpt_tmp->description = attrstr.trimmed(); |
255 |
} else if (attr.name().compare("ViaStation", Qt::CaseInsensitive) == 0 && |
255 |
} else if (attr.name().compare(QStringLiteral("ViaStation"), Qt::CaseInsensitive) == 0 && |
256 |
attr.value().compare("true", Qt::CaseInsensitive) == 0) { |
256 |
attr.value().compare(QStringLiteral("true"), Qt::CaseInsensitive) == 0) { |
257 |
wpt_tmp->wpt_flags.fmt_use = 1; /* only a flag */ |
257 |
wpt_tmp->wpt_flags.fmt_use = 1; /* only a flag */ |
258 |
|
258 |
|
259 |
/* new in TEF V2 */ |
259 |
/* new in TEF V2 */ |
260 |
} else if (attr.name().compare("Instruction", Qt::CaseInsensitive) == 0) { |
260 |
} else if (attr.name().compare(QStringLiteral("Instruction"), Qt::CaseInsensitive) == 0) { |
261 |
wpt_tmp->description = attrstr.trimmed(); |
261 |
wpt_tmp->description = attrstr.trimmed(); |
262 |
} else if (attr.name().compare("Altitude", Qt::CaseInsensitive) == 0) { |
262 |
} else if (attr.name().compare(QStringLiteral("Altitude"), Qt::CaseInsensitive) == 0) { |
263 |
wpt_tmp->altitude = attrstr.toDouble(); |
263 |
wpt_tmp->altitude = attrstr.toDouble(); |
264 |
} else if (attr.name().compare("TimeStamp", Qt::CaseInsensitive) == 0) { |
264 |
} else if (attr.name().compare(QStringLiteral("TimeStamp"), Qt::CaseInsensitive) == 0) { |
265 |
/* nothing for the moment */ |
265 |
/* nothing for the moment */ |
266 |
} |
266 |
} |
267 |
} |
267 |
} |