[qlandkartegt] 03/03: Switch to Qt5 patches from upstream SVN.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Tue May 5 12:23:10 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository qlandkartegt.

commit 18a7ca01871b8375fd33f7a1ce5f2b12b701609f
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Tue May 5 13:24:19 2015 +0200

    Switch to Qt5 patches from upstream SVN.
---
 debian/patches/{qt5.patch => qt5-r4007.patch} | 126 +++++++++++---------------
 debian/patches/qt5-r4008.patch                |  38 ++++++++
 debian/patches/qt5-r4009.patch                |  64 +++++++++++++
 debian/patches/series                         |   4 +-
 4 files changed, 158 insertions(+), 74 deletions(-)

diff --git a/debian/patches/qt5.patch b/debian/patches/qt5-r4007.patch
similarity index 81%
rename from debian/patches/qt5.patch
rename to debian/patches/qt5-r4007.patch
index d102f1a..55dbb9c 100644
--- a/debian/patches/qt5.patch
+++ b/debian/patches/qt5-r4007.patch
@@ -1,63 +1,6 @@
-Description: Update for Qt5
- QString::toAscii() replaced by QString::toLatin1()
- QUrl.setEncodedQueryItems() replaced by QUrl.setQuery(QUrlQuery.setQueryItems())
-Author: Bas Couwenberg <sebastic at debian.org>
- .
- Patch was updated to include CMakeLists.txt changes in SVN r4007:
- http://sourceforge.net/p/qlandkartegt/code/4007/
-Author: Bas Couwenberg <sebastic at debian.org>
-Forwarded: http://sourceforge.net/p/qlandkartegt/mailman/message/34079968/
+Description: Patch to get QLGT compiled with Qt5
+Origin: http://sourceforge.net/p/qlandkartegt/code/4007/
 
---- a/src/CDlgEditWpt.cpp
-+++ b/src/CDlgEditWpt.cpp
-@@ -532,7 +532,7 @@ void CDlgEditWpt::slotUpdateBarcode()
-         {
-             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));
---- a/src/CRouteToolWidget.cpp
-+++ b/src/CRouteToolWidget.cpp
-@@ -1016,13 +1016,25 @@ void CRouteToolWidget::startBRouterServi
-         }
-     }
- 
-+#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;
- 
---- a/src/CExchangeGarmin.cpp
-+++ b/src/CExchangeGarmin.cpp
-@@ -21,6 +21,7 @@
- #include <QtDBus>
- #include <QtXml>
- #include <QtGui>
-+#include <QMessageBox>
- 
- CGarminTreeWidgetItem::CGarminTreeWidgetItem(const QString& id, QTreeWidget *parent)
-     : IDeviceTreeWidgetItem(id,parent)
 --- a/3rdparty/cache2gtiff/CMakeLists.txt
 +++ b/3rdparty/cache2gtiff/CMakeLists.txt
 @@ -50,9 +50,16 @@ include_directories(
@@ -72,7 +15,7 @@ Forwarded: http://sourceforge.net/p/qlandkartegt/mailman/message/34079968/
 +include_directories(
 +  ${QT_QTXML_INCLUDE_DIR}
 +)
-+endif(NOT QK_QT5_PORT)
++endif(QK_QT5_PORT)
 +
 +
  if(WIN32)
@@ -86,6 +29,27 @@ Forwarded: http://sourceforge.net/p/qlandkartegt/mailman/message/34079968/
  if(QK_QT5_PORT)
  qt5_use_modules(cache2gtiff  Widgets)
  qt5_use_modules(cache2gtiff  Xml)
+--- a/src/CDlgEditWpt.cpp
++++ b/src/CDlgEditWpt.cpp
+@@ -532,7 +532,7 @@ void CDlgEditWpt::slotUpdateBarcode()
+         {
+             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));
+--- a/src/CExchangeGarmin.cpp
++++ b/src/CExchangeGarmin.cpp
+@@ -21,6 +21,7 @@
+ #include <QtDBus>
+ #include <QtXml>
+ #include <QtGui>
++#include <QMessageBox>
+ 
+ CGarminTreeWidgetItem::CGarminTreeWidgetItem(const QString& id, QTreeWidget *parent)
+     : IDeviceTreeWidgetItem(id,parent)
 --- a/src/CMakeLists.txt
 +++ b/src/CMakeLists.txt
 @@ -668,20 +668,13 @@ if(UNIX)
@@ -125,21 +89,37 @@ Forwarded: http://sourceforge.net/p/qlandkartegt/mailman/message/34079968/
 +  ${QT_QTSCRIPT_INCLUDE_DIR}
 +  ${QT_OPENGL_INCLUDE_DIR}
 +)
-+endif(NOT QK_QT5_PORT)
++endif(QK_QT5_PORT)
 +
  
  if(NOT QK_QT5_SERIAL_PORT)
    set(qlandkarte_include_dirs
---- a/src/CTrackEditWidget.cpp
-+++ b/src/CTrackEditWidget.cpp
-@@ -769,7 +769,9 @@ void CTrackEditWidget::slotUpdate()
-         // 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);
+--- a/src/CRouteToolWidget.cpp
++++ b/src/CRouteToolWidget.cpp
+@@ -1016,13 +1016,25 @@ void CRouteToolWidget::startBRouterServi
          }
-         else
-         {
+     }
+ 
++#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 --git a/debian/patches/qt5-r4008.patch b/debian/patches/qt5-r4008.patch
new file mode 100644
index 0000000..dd697a7
--- /dev/null
+++ b/debian/patches/qt5-r4008.patch
@@ -0,0 +1,38 @@
+Description: More Qt5 fixes
+Origin: http://sourceforge.net/p/qlandkartegt/code/4008/
+
+--- a/3rdparty/cache2gtiff/CMakeLists.txt
++++ b/3rdparty/cache2gtiff/CMakeLists.txt
+@@ -57,7 +57,7 @@ if (NOT QK_QT5_PORT)
+ include_directories(
+   ${QT_QTXML_INCLUDE_DIR}
+ )
+-endif(QK_QT5_PORT)
++endif(NOT QK_QT5_PORT)
+ 
+ 
+ if(WIN32)
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -698,7 +698,7 @@ set(qlandkarte_include_dirs ${qlandkarte
+   ${QT_QTSCRIPT_INCLUDE_DIR}
+   ${QT_OPENGL_INCLUDE_DIR}
+ )
+-endif(QK_QT5_PORT)
++endif(NOT QK_QT5_PORT)
+ 
+ 
+ if(NOT QK_QT5_SERIAL_PORT)
+--- a/src/CTrackEditWidget.cpp
++++ b/src/CTrackEditWidget.cpp
+@@ -769,7 +769,9 @@ void CTrackEditWidget::slotUpdate()
+         // 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
+         {
diff --git a/debian/patches/qt5-r4009.patch b/debian/patches/qt5-r4009.patch
new file mode 100644
index 0000000..1eb43d4
--- /dev/null
+++ b/debian/patches/qt5-r4009.patch
@@ -0,0 +1,64 @@
+Description: Fix a few more degree strings
+Origin: http://sourceforge.net/p/qlandkartegt/code/4009/
+
+--- a/src/CCanvas.cpp
++++ b/src/CCanvas.cpp
+@@ -898,7 +898,7 @@ void CCanvas::mouseMoveEventCoord(QMouse
+             y_m *= RAD_TO_DEG;
+             lat = y_m < 0 ? "S" : "N";
+             lng = x_m < 0 ? "W" : "E";
+-            info += tr("[Grid: %1%2%5 %3%4%5] ").arg(lat).arg(qAbs(y_m), 0, 'f', 6).arg(lng).arg(qAbs(x_m), 0, 'f', 6).arg(QChar('\260'));
++            info += tr("[Grid: %1%2%5 %3%4%5] ").arg(lat).arg(qAbs(y_m), 0, 'f', 6).arg(lng).arg(qAbs(x_m), 0, 'f', 6).arg(QChar(0260));
+ 
+         }
+         else
+--- a/src/CMapDEMSlopeSetup.cpp
++++ b/src/CMapDEMSlopeSetup.cpp
+@@ -96,11 +96,11 @@ void CMapDEMSlopeSetup::slotValueChanged
+     }
+ 
+     const double * g = CMapDEM::grade[val];
+-    labelValue1->setText(QString("> %1\260").arg(g[1]));
+-    labelValue2->setText(QString("> %1\260").arg(g[2]));
+-    labelValue3->setText(QString("> %1\260").arg(g[3]));
+-    labelValue4->setText(QString("> %1\260").arg(g[4]));
+-    labelValue5->setText(QString("> %1\260").arg(g[5]));
++    labelValue1->setText(QString("> %1%2").arg(g[1]).arg(QChar(0260)));
++    labelValue2->setText(QString("> %1%2").arg(g[2]).arg(QChar(0260)));
++    labelValue3->setText(QString("> %1%2").arg(g[3]).arg(QChar(0260)));
++    labelValue4->setText(QString("> %1%2").arg(g[4]).arg(QChar(0260)));
++    labelValue5->setText(QString("> %1%2").arg(g[5]).arg(QChar(0260)));
+     labelGrade->setText(tr("Grade %1").arg(val));
+     dem->setGrade(val);
+ }
+--- a/src/COverlayArea.cpp
++++ b/src/COverlayArea.cpp
+@@ -937,7 +937,7 @@ void COverlayArea::drawDistanceInfo(proj
+ 
+     dist = ::distance(p1, p2, a1, a2);
+     IUnit::self().meter2distance(dist, val, unit);
+-    str = QString("%1 %2 %3\260").arg(val).arg(unit).arg(a2,0,'f',0);
++    str = QString("%1 %2 %3%4").arg(val).arg(unit).arg(a2,0,'f',0).arg(QChar(0260));
+ 
+     map.convertRad2Pt(p1.u, p1.v);
+     map.convertRad2Pt(p2.u, p2.v);
+--- a/src/CTrack.cpp
++++ b/src/CTrack.cpp
+@@ -788,7 +788,7 @@ CTrack::CTrack(QObject * parent)
+     {
+         setupMultiColor.resize(eMultiColorMax);
+         setupMultiColor[eMultiColorNone]    = multi_color_setup_t();
+-        setupMultiColor[eMultiColorSlope]   = multi_color_setup_t(CTrack::eMinMaxModeNoAuto, 0, 25, 120, 0, tr("Slope [\260]"));
++        setupMultiColor[eMultiColorSlope]   = multi_color_setup_t(CTrack::eMinMaxModeNoAuto, 0, 25, 120, 0, tr("Slope [%1]").arg(QChar(0260)));
+         setupMultiColor[eMultiColorEle]     = multi_color_setup_t(CTrack::eMinMaxModeAuto, 0,  0, 240, 0, tr("Elevation [m]"));
+         setupMultiColor[eMultiColorSpeed]   = multi_color_setup_t(CTrack::eMinMaxModeAuto, 0,  0, 240, 0, tr("Speed [km/h]"));
+ 
+@@ -2020,7 +2020,7 @@ QString CTrack::getTrkPtInfo1(pt_t& trkp
+     if(trkpt.slope2 != WPT_NOFLOAT)
+     {
+         if(str.count()) str += " ";
+-        str += tr("slope: %1\260").arg(trkpt.slope2,0,'f',0);
++        str += tr("slope: %1%2").arg(trkpt.slope2,0,'f',0).arg(QChar(0260));
+     }
+ 
+     if(trkpt.speed != WPT_NOFLOAT)
diff --git a/debian/patches/series b/debian/patches/series
index 5237163..bec3f25 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,4 +3,6 @@
 03-set_user_agent.patch
 04-qlandkartegt-desktop-exec.patch
 05-https-osm-tiles.patch
-qt5.patch
+qt5-r4007.patch
+qt5-r4008.patch
+qt5-r4009.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/qlandkartegt.git



More information about the Pkg-grass-devel mailing list