summarylogtreecommitdiffstats
path: root/fix-qt5-build.patch
blob: b9da7ec6bf5b2a94243367a78ab6876fd73728ac (plain)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
diff -Naur qlandkartegt-1.8.1.orig/3rdparty/cache2gtiff/CMakeLists.txt qlandkartegt-1.8.1/3rdparty/cache2gtiff/CMakeLists.txt
--- qlandkartegt-1.8.1.orig/3rdparty/cache2gtiff/CMakeLists.txt	2014-08-08 11:53:46.000000000 +0200
+++ qlandkartegt-1.8.1/3rdparty/cache2gtiff/CMakeLists.txt	2017-02-07 14:29:11.273321944 +0100
@@ -50,9 +50,16 @@
     ${GDAL_INCLUDE_DIRS}
     ${PROJ_INCLUDE_DIRS}
     ${JPEG_INCLUDE_DIRS}
-    ${QT_QTXML_INCLUDE_DIR}
     ../../src/
 )
+
+if (NOT QK_QT5_PORT)
+include_directories(
+  ${QT_QTXML_INCLUDE_DIR}
+)
+endif(NOT QK_QT5_PORT)
+
+
 if(WIN32)
     include_directories(
         ${CMAKE_SOURCE_DIR}/Win32/
@@ -89,6 +96,7 @@
 )
 
 
+
 if(QK_QT5_PORT)
 qt5_use_modules(cache2gtiff  Widgets)
 qt5_use_modules(cache2gtiff  Xml)
diff -Naur qlandkartegt-1.8.1.orig/src/CDlgEditWpt.cpp qlandkartegt-1.8.1/src/CDlgEditWpt.cpp
--- qlandkartegt-1.8.1.orig/src/CDlgEditWpt.cpp	2015-02-03 09:38:09.000000000 +0100
+++ qlandkartegt-1.8.1/src/CDlgEditWpt.cpp	2017-02-07 14:29:03.253103094 +0100
@@ -531,7 +531,7 @@
         {
             barcode = barcode.left(177) + "...";
         }
-        dmtxEncodeDataMatrix( enc, barcode.size(), (unsigned char*)barcode.toAscii().data() );
+        dmtxEncodeDataMatrix( enc, barcode.size(), (unsigned char*)barcode.toLatin1().data() );
 
         QImage curBarCode( enc->image->pxl, enc->image->width, enc->image->height, QImage::Format_RGB32 );
         labelBarcode->setPixmap(QPixmap::fromImage(curBarCode));
diff -Naur qlandkartegt-1.8.1.orig/src/CExchangeGarmin.cpp qlandkartegt-1.8.1/src/CExchangeGarmin.cpp
--- qlandkartegt-1.8.1.orig/src/CExchangeGarmin.cpp	2014-08-08 11:53:40.000000000 +0200
+++ qlandkartegt-1.8.1/src/CExchangeGarmin.cpp	2017-02-07 14:29:03.253103094 +0100
@@ -21,6 +21,7 @@
 #include <QtDBus>
 #include <QtXml>
 #include <QtGui>
+#include <QMessageBox>
 
 CGarminTreeWidgetItem::CGarminTreeWidgetItem(const QString& id, QTreeWidget *parent)
     : IDeviceTreeWidgetItem(id,parent)
diff -Naur qlandkartegt-1.8.1.orig/src/CMakeLists.txt qlandkartegt-1.8.1/src/CMakeLists.txt
--- qlandkartegt-1.8.1.orig/src/CMakeLists.txt	2014-08-28 08:22:28.000000000 +0200
+++ qlandkartegt-1.8.1/src/CMakeLists.txt	2017-02-07 14:29:11.276655368 +0100
@@ -668,20 +668,13 @@
     add_definitions(-D_TTY_POSIX_ -Wall)
 endif(UNIX)
 
+
 set(qlandkarte_include_dirs
   ${CMAKE_BINARY_DIR}
   ${CMAKE_CURRENT_BINARY_DIR}
   ${OPENGL_INCLUDE_DIR}
   ${GDAL_INCLUDE_DIRS}
   ${PROJ_INCLUDE_DIRS}
-  ${QT_QTXML_INCLUDE_DIR}
-  ${QT_QTSQL_INCLUDE_DIR}
-  ${QT_QTOPENGL_INCLUDE_DIR}
-  ${QT_QTNETWORK_INCLUDE_DIR}
-  ${QT_QTDBUS_INCLUDE_DIR}
-  ${QT_QTWEBKIT_INCLUDE_DIR}
-  ${QT_QTSCRIPT_INCLUDE_DIR}
-  ${QT_OPENGL_INCLUDE_DIR}
   ${CMAKE_SOURCE_DIR}/include
   ${CMAKE_SOURCE_DIR}/3rdparty/QZip
   ${CMAKE_SOURCE_DIR}/3rdparty/QTextHtmlExporter
@@ -694,6 +687,19 @@
   ${QEXTSERIALPORT_INCLUDE_DIRS}
 )
 
+if (NOT QK_QT5_PORT)
+set(qlandkarte_include_dirs ${qlandkarte_include_dirs}
+  ${QT_QTXML_INCLUDE_DIR}
+  ${QT_QTSQL_INCLUDE_DIR}
+  ${QT_QTOPENGL_INCLUDE_DIR}
+  ${QT_QTNETWORK_INCLUDE_DIR}
+  ${QT_QTDBUS_INCLUDE_DIR}
+  ${QT_QTWEBKIT_INCLUDE_DIR}
+  ${QT_QTSCRIPT_INCLUDE_DIR}
+  ${QT_OPENGL_INCLUDE_DIR}
+)
+endif(NOT QK_QT5_PORT)
+
 
 if(NOT QK_QT5_SERIAL_PORT)
   set(qlandkarte_include_dirs
diff -Naur qlandkartegt-1.8.1.orig/src/CRouteToolWidget.cpp qlandkartegt-1.8.1/src/CRouteToolWidget.cpp
--- qlandkartegt-1.8.1.orig/src/CRouteToolWidget.cpp	2015-02-16 11:34:56.000000000 +0100
+++ qlandkartegt-1.8.1/src/CRouteToolWidget.cpp	2017-02-07 14:29:03.253103094 +0100
@@ -1016,13 +1016,25 @@
         }
     }
 
+#ifdef QK_QT5_PORT
+    QList< QPair<QString, QString> > queryItems;
+    queryItems << QPair<QString, QString>("lonlats",lonlats.toLatin1());
+    queryItems << QPair<QString, QString>("nogos", "");
+    queryItems << QPair<QString, QString>("profile", comboBRPreference->itemData(comboBRPreference->currentIndex()).toString());
+    queryItems << QPair<QString, QString>("alternativeidx", QString::number(rte.getRouteIdx()));
+    queryItems << QPair<QString, QString>("format", "gpx");
+    QUrlQuery urlQuery;
+    urlQuery.setQueryItems(queryItems);
+    url.setQuery(urlQuery);
+#else
     QList< QPair<QByteArray, QByteArray> > queryItems;
-    queryItems << QPair<QByteArray, QByteArray>(QByteArray("lonlats"),QByteArray(lonlats.toAscii()));
+    queryItems << QPair<QByteArray, QByteArray>(QByteArray("lonlats"),QByteArray(lonlats.toLatin1()));
     queryItems << QPair<QByteArray, QByteArray>(QByteArray("nogos"), QByteArray(""));
     queryItems << QPair<QByteArray, QByteArray>(QByteArray("profile"), comboBRPreference->itemData(comboBRPreference->currentIndex()).toByteArray());
     queryItems << QPair<QByteArray, QByteArray>(QByteArray("alternativeidx"), QVariant(rte.getRouteIdx()).toByteArray());
     queryItems << QPair<QByteArray, QByteArray>(QByteArray("format"), QByteArray("gpx"));
     url.setEncodedQueryItems(queryItems);
+#endif
 
     QNetworkRequest request;
 
diff -Naur qlandkartegt-1.8.1.orig/src/CTrackEditWidget.cpp qlandkartegt-1.8.1/src/CTrackEditWidget.cpp
--- qlandkartegt-1.8.1.orig/src/CTrackEditWidget.cpp	2015-02-03 09:59:03.000000000 +0100
+++ qlandkartegt-1.8.1/src/CTrackEditWidget.cpp	2017-02-07 14:29:11.276655368 +0100
@@ -769,7 +769,9 @@
         // azimuth
         if(trkpt->azimuth != WPT_NOFLOAT)
         {
-            str.sprintf("%1.0f\260",trkpt->azimuth);
+            const QChar degreeChar(0260);
+            str.sprintf("%1.0f",trkpt->azimuth);
+            str.append(degreeChar);
         }
         else
         {