gnu: gnucash: Disable the stress-options-test using a phase.
[jackhill/guix/guix.git] / gnu / packages / patches / gpsbabel-qstring.patch
1 Extracted from following patch of gpsbabel:
2 https://github.com/gpsbabel/gpsbabel/commit/604178aa8ad4d3c3ad218df24c1e9a6a1f683bb3
3
4 From 604178aa8ad4d3c3ad218df24c1e9a6a1f683bb3 Mon Sep 17 00:00:00 2001
5 From: Harel Mazor <harel.mazor@gmail.com>
6 Date: Tue, 24 Jan 2017 00:35:04 +0200
7 Subject: [PATCH] Added geojson read capablity, moved magic strings to
8 constants, fixed windows compilation issues.
9
10 --- a/tef_xml.cc
11 +++ b/tef_xml.cc
12 @@ -72,11 +72,11 @@ tef_start(xg_string args, const QXmlStreamAttributes* attrv)
13 bool valid = false;
14
15 foreach(QXmlStreamAttribute attr, *attrv) {
16 - if (attr.name().compare("Comment", Qt::CaseInsensitive) == 0) {
17 - if (attr.value().compare("TourExchangeFormat", Qt::CaseInsensitive) == 0) {
18 + if (attr.name().compare(QString("Comment"), Qt::CaseInsensitive) == 0) {
19 + if (attr.value().compare(QString("TourExchangeFormat"), Qt::CaseInsensitive) == 0) {
20 valid = true;
21 }
22 - } else if (attr.name().compare("Version", Qt::CaseInsensitive) == 0) {
23 + } else if (attr.name().compare(QString("Version"), Qt::CaseInsensitive) == 0) {
24 version = attr.value().toString().toDouble();
25 }
26 }
27 @@ -95,9 +95,9 @@ tef_header(xg_string args, const QXmlStreamAttributes* attrv)
28 {
29 route = route_head_alloc();
30 foreach(QXmlStreamAttribute attr, *attrv) {
31 - if (attr.name().compare("Name", Qt::CaseInsensitive) == 0) {
32 + if (attr.name().compare(QString("Name"), Qt::CaseInsensitive) == 0) {
33 route->rte_name = attr.value().toString().trimmed();
34 - } else if (attr.name().compare("Software", Qt::CaseInsensitive) == 0) {
35 + } else if (attr.name().compare(QString("Software"), Qt::CaseInsensitive) == 0) {
36 route->rte_desc = attr.value().toString().trimmed();
37 }
38 }
39 @@ -248,20 +248,20 @@ tef_item_start(xg_string args, const QXmlStreamAttributes* attrv)
40 QString attrstr = attr.value().toString();
41 QByteArray attrtext = attrstr.toUtf8();
42
43 - if (attr.name().compare("SegDescription", Qt::CaseInsensitive) == 0) {
44 + if (attr.name().compare(QString("SegDescription"), Qt::CaseInsensitive) == 0) {
45 wpt_tmp->shortname = attrstr.trimmed();
46 - } else if (attr.name().compare("PointDescription", Qt::CaseInsensitive) == 0) {
47 + } else if (attr.name().compare(QString("PointDescription"), Qt::CaseInsensitive) == 0) {
48 wpt_tmp->description = attrstr.trimmed();
49 - } else if (attr.name().compare("ViaStation", Qt::CaseInsensitive) == 0 &&
50 - attr.value().compare("true", Qt::CaseInsensitive) == 0) {
51 + } else if (attr.name().compare(QString("ViaStation"), Qt::CaseInsensitive) == 0 &&
52 + attr.value().compare(QString("true"), Qt::CaseInsensitive) == 0) {
53 wpt_tmp->wpt_flags.fmt_use = 1; /* only a flag */
54
55 /* new in TEF V2 */
56 - } else if (attr.name().compare("Instruction", Qt::CaseInsensitive) == 0) {
57 + } else if (attr.name().compare(QString("Instruction"), Qt::CaseInsensitive) == 0) {
58 wpt_tmp->description = attrstr.trimmed();
59 - } else if (attr.name().compare("Altitude", Qt::CaseInsensitive) == 0) {
60 + } else if (attr.name().compare(QString("Altitude"), Qt::CaseInsensitive) == 0) {
61 wpt_tmp->altitude = attrstr.toDouble();
62 - } else if (attr.name().compare("TimeStamp", Qt::CaseInsensitive) == 0) {
63 + } else if (attr.name().compare(QString("TimeStamp"), Qt::CaseInsensitive) == 0) {
64 /* nothing for the moment */
65 }
66 }
67 --
68 2.16.1
69