package created using the webbuild interface [release 1.15.0-1mamba;Tue Sep 08 2020]
This commit is contained in:
parent
e23c298d73
commit
72014cc303
@ -1,2 +1,5 @@
|
|||||||
# qmapshack
|
# qmapshack
|
||||||
|
|
||||||
|
Use QMapShack to plan your next outdoor trip or to visualize and archive all the GPS recordings of your past exciting adventures.
|
||||||
|
QMapShack is the next generation of the famous QLandkarte GT application. And of course it's even better and easier to use.
|
||||||
|
|
||||||
|
40
qmapshack-1.15.0-fix_crash_in_profile.patch
Normal file
40
qmapshack-1.15.0-fix_crash_in_profile.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From 277626d9d3482fe0c64ad66a30c8d7dc7416f81b Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Floyd <jfloyd@bigpond.net.au>
|
||||||
|
Date: Wed, 24 Jun 2020 13:39:31 +1000
|
||||||
|
Subject: [PATCH] [QMS-217] Fix Crash in Profile
|
||||||
|
|
||||||
|
Routino_GetProfiles returns a NULL result if profile is not in profiles.
|
||||||
|
Catch this error and display error message.
|
||||||
|
|
||||||
|
This coding error predates latest profiles work.
|
||||||
|
---
|
||||||
|
changelog.txt | 1 +
|
||||||
|
src/qmapshack/gis/rte/router/CRouterRoutino.cpp | 8 ++++++++
|
||||||
|
2 files changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/qmapshack/gis/rte/router/CRouterRoutino.cpp b/src/qmapshack/gis/rte/router/CRouterRoutino.cpp
|
||||||
|
index 91ba62c3..cc32674c 100644
|
||||||
|
--- a/src/qmapshack/gis/rte/router/CRouterRoutino.cpp
|
||||||
|
+++ b/src/qmapshack/gis/rte/router/CRouterRoutino.cpp
|
||||||
|
@@ -378,6 +378,10 @@ void CRouterRoutino::calcRoute(const IGisItem::key_t& key)
|
||||||
|
QString strLanguage = comboLanguage->currentData(Qt::UserRole).toString();
|
||||||
|
|
||||||
|
Routino_Profile *profile = Routino_GetProfile(strProfile.toUtf8());
|
||||||
|
+ if( profile == NULL )
|
||||||
|
+ {
|
||||||
|
+ throw tr("Required profile '%1' is not the current profiles file.").arg(strProfile);
|
||||||
|
+ }
|
||||||
|
Routino_Translation *translation = Routino_GetTranslation(strLanguage.toUtf8());
|
||||||
|
|
||||||
|
int res = Routino_ValidateProfile(data, profile);
|
||||||
|
@@ -466,6 +470,10 @@ int CRouterRoutino::calcRoute(const QPointF& p1, const QPointF& p2, QPolygonF& c
|
||||||
|
QString strLanguage = comboLanguage->currentData(Qt::UserRole).toString();
|
||||||
|
|
||||||
|
Routino_Profile *profile = Routino_GetProfile(strProfile.toUtf8());
|
||||||
|
+ if( profile == NULL )
|
||||||
|
+ {
|
||||||
|
+ throw tr("Required profile '%1' is not the current profiles file.").arg(strProfile);
|
||||||
|
+ }
|
||||||
|
Routino_Translation *translation = Routino_GetTranslation(strLanguage.toUtf8());
|
||||||
|
|
||||||
|
|
251
qmapshack-1.15.0-libqt5-5.15.0-0.patch
Normal file
251
qmapshack-1.15.0-libqt5-5.15.0-0.patch
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
From a0eda8480f32cd38bfb8510a9fe40e8a6d620825 Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Floyd <jfloyd@bigpond.net.au>
|
||||||
|
Date: Sat, 23 May 2020 16:10:57 +1000
|
||||||
|
Subject: [PATCH] [QMS-158] Change Routino Profiles search for
|
||||||
|
[prefix-]profiles.xml
|
||||||
|
|
||||||
|
Changes the Routino profiles search to include
|
||||||
|
1) dbase-folder/prefix-profiles.xml
|
||||||
|
2) dbase-folder/profiles.xml
|
||||||
|
3) routino-shared-system-folder/profiles.xml
|
||||||
|
|
||||||
|
Requires parsing the profiles file in the routing functions to allow
|
||||||
|
changing to a new routing database during a session by calling a new
|
||||||
|
method loadProfiles. This means that the name of the profiles.xml being
|
||||||
|
used must be known.
|
||||||
|
|
||||||
|
buildDatabaseList method is expanded to check and keep the first
|
||||||
|
available profiles file for each routing database that is loaded. This
|
||||||
|
is kept in the UserData item of the UI comboDatabase instance in a map
|
||||||
|
variable along with the database pointer for each database item.
|
||||||
|
|
||||||
|
Includes Latest Changes based on Review
|
||||||
|
|
||||||
|
loadProfiles is now called in buildDatabaseList to check if the xml is
|
||||||
|
OK and when database is changed from gui.
|
||||||
|
Changelog now sequestial.
|
||||||
|
|
||||||
|
More changes to avoid aborts and segmentation errors.
|
||||||
|
|
||||||
|
Moved the failure messagebox from loadProfiles to buildDatabaseList.
|
||||||
|
This allows the database prefix to be referenced in the message. Message
|
||||||
|
is expanded to notify user that the profiles file needs to be fixed and
|
||||||
|
that the database associated with the failed profiles is ignored.
|
||||||
|
|
||||||
|
Reset currentProfilesPath for test loads!
|
||||||
|
|
||||||
|
New Review cleanups
|
||||||
|
|
||||||
|
Move 158 entry in changelog to new version!
|
||||||
|
---
|
||||||
|
changelog.txt | 1 +
|
||||||
|
.../gis/rte/router/CRouterRoutino.cpp | 99 ++++++++++++++++---
|
||||||
|
src/qmapshack/gis/rte/router/CRouterRoutino.h | 2 +
|
||||||
|
3 files changed, 87 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/qmapshack/gis/rte/router/CRouterRoutino.cpp b/src/qmapshack/gis/rte/router/CRouterRoutino.cpp
|
||||||
|
index 81f37fa4..91ba62c3 100644
|
||||||
|
--- a/src/qmapshack/gis/rte/router/CRouterRoutino.cpp
|
||||||
|
+++ b/src/qmapshack/gis/rte/router/CRouterRoutino.cpp
|
||||||
|
@@ -29,10 +29,8 @@
|
||||||
|
#include <QtWidgets>
|
||||||
|
#include <routino.h>
|
||||||
|
|
||||||
|
-
|
||||||
|
QPointer<CProgressDialog> CRouterRoutino::progress;
|
||||||
|
|
||||||
|
-
|
||||||
|
int ProgressFunc(double complete)
|
||||||
|
{
|
||||||
|
if(CRouterRoutino::progress.isNull())
|
||||||
|
@@ -64,15 +62,9 @@ CRouterRoutino::CRouterRoutino(QWidget *parent)
|
||||||
|
comboMode->addItem(tr("Shortest"));
|
||||||
|
comboMode->addItem(tr("Quickest"));
|
||||||
|
|
||||||
|
+
|
||||||
|
int res = 0;
|
||||||
|
IAppSetup *setup = IAppSetup::getPlatformInstance();
|
||||||
|
- res = Routino_ParseXMLProfiles(setup->routinoPath("profiles.xml").toUtf8());
|
||||||
|
- if(res)
|
||||||
|
- {
|
||||||
|
- QMessageBox::critical(this, "Routino...", xlateRoutinoError(Routino_errno), QMessageBox::Abort);
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
res = Routino_ParseXMLTranslations(setup->routinoPath("translations.xml").toUtf8());
|
||||||
|
if(res)
|
||||||
|
{
|
||||||
|
@@ -233,6 +225,11 @@ void CRouterRoutino::buildDatabaseList()
|
||||||
|
QRegExp re("(.*)-segments.mem");
|
||||||
|
freeDatabaseList();
|
||||||
|
|
||||||
|
+ // initialise
|
||||||
|
+ currentProfilesPath = "";
|
||||||
|
+
|
||||||
|
+ IAppSetup *setup = IAppSetup::getPlatformInstance();
|
||||||
|
+
|
||||||
|
for(const QString &path : dbPaths)
|
||||||
|
{
|
||||||
|
QDir dir(path);
|
||||||
|
@@ -248,33 +245,98 @@ void CRouterRoutino::buildDatabaseList()
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // qDebug() << "buildDatabase Prefix" << prefix;
|
||||||
|
+
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
Routino_Database * data = Routino_LoadDatabase(dir.absolutePath().toLocal8Bit(), prefix.toLocal8Bit());
|
||||||
|
#else
|
||||||
|
Routino_Database * data = Routino_LoadDatabase(dir.absolutePath().toUtf8(), prefix.toUtf8());
|
||||||
|
#endif
|
||||||
|
- if(data)
|
||||||
|
+ qDebug() << "Loaded Routino DB" << dir.absolutePath().toUtf8().data() << " " << prefix.toUtf8().data();
|
||||||
|
+
|
||||||
|
+ if(data == nullptr)
|
||||||
|
+ {
|
||||||
|
+ QMessageBox::critical(this, "Routino ...", xlateRoutinoError(Routino_errno), QMessageBox::Abort);
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ /* determine the profile to use for each database*/
|
||||||
|
+ QVariantMap dmap;
|
||||||
|
+ dmap["db"] = QVariant ((qulonglong)data);
|
||||||
|
+
|
||||||
|
+ /* check possible profiles.xml locations and use the first available */
|
||||||
|
+ int pError = 0;
|
||||||
|
+ dmap["profilesPath"] = "";
|
||||||
|
+ QStringList profilesPaths = {
|
||||||
|
+ dir.filePath(prefix+"-profiles.xml"),
|
||||||
|
+ dir.filePath("profiles.xml"),
|
||||||
|
+ setup->routinoPath("profiles.xml").toUtf8()
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ for(const QString& profilePath : profilesPaths)
|
||||||
|
+ {
|
||||||
|
+ QFileInfo pinfo(profilePath);
|
||||||
|
+ if( pinfo.isReadable())
|
||||||
|
+ {
|
||||||
|
+ dmap["profilesPath"] = pinfo.filePath();
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if( dmap["profilesPath"].toString().isEmpty() )
|
||||||
|
+ {
|
||||||
|
+ QMessageBox::critical(this, "Routino...",tr("Could not find a profiles XML file in expected folders. Routino Routing will not function"), QMessageBox::Ok);
|
||||||
|
+ pError = 1;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ /* ensure we always reload */
|
||||||
|
+ currentProfilesPath = "";
|
||||||
|
+ /* check if profile will load - will abort if not good */
|
||||||
|
+ pError = loadProfiles(dmap["profilesPath"].toString());
|
||||||
|
+ }
|
||||||
|
+ qDebug() << "Profile ... Using \n" << dmap["profilesPath"].toString();
|
||||||
|
+
|
||||||
|
+ if( pError == 0 )
|
||||||
|
{
|
||||||
|
- comboDatabase->addItem(prefix.replace("_", " "), quint64(data));
|
||||||
|
+ comboDatabase->addItem(prefix.replace("_", " "), dmap);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- QMessageBox::critical(this, "Routino...", xlateRoutinoError(Routino_errno), QMessageBox::Abort);
|
||||||
|
+ const QString& msg = tr(
|
||||||
|
+ "%1\n"
|
||||||
|
+ "Error in '%2'\n"
|
||||||
|
+ "This needs to be fixed\n"
|
||||||
|
+ "The associated database '%3' is ignored"
|
||||||
|
+ ).arg(xlateRoutinoError(Routino_errno)).arg(dmap["profilesPath"].toString()).arg(prefix);
|
||||||
|
+
|
||||||
|
+ QMessageBox::warning(this, "Routino...", msg, QMessageBox::Ok);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ currentProfilesPath = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
void CRouterRoutino::freeDatabaseList()
|
||||||
|
{
|
||||||
|
for(int i = 0; i < comboDatabase->count(); i++)
|
||||||
|
{
|
||||||
|
- Routino_Database * data = (Routino_Database*)comboDatabase->itemData(i, Qt::UserRole).toULongLong();
|
||||||
|
+ QVariantMap map = comboDatabase->itemData(i,Qt::UserRole).toMap();
|
||||||
|
+ Routino_Database * data = (Routino_Database*)(map["db"].toULongLong());
|
||||||
|
Routino_UnloadDatabase(data);
|
||||||
|
}
|
||||||
|
comboDatabase->clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
+int CRouterRoutino::loadProfiles(const QString& profilesPath)
|
||||||
|
+{
|
||||||
|
+ int res = 0;
|
||||||
|
+ if( currentProfilesPath != profilesPath)
|
||||||
|
+ {
|
||||||
|
+ currentProfilesPath = profilesPath;
|
||||||
|
+ res = Routino_ParseXMLProfiles(profilesPath.toUtf8());
|
||||||
|
+ }
|
||||||
|
+ return res;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void CRouterRoutino::updateHelpText()
|
||||||
|
{
|
||||||
|
bool haveDB = (comboDatabase->count() != 0);
|
||||||
|
@@ -301,12 +363,15 @@ void CRouterRoutino::calcRoute(const IGisItem::key_t& key)
|
||||||
|
throw QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
- Routino_Database * data = (Routino_Database*)comboDatabase->currentData(Qt::UserRole).toULongLong();
|
||||||
|
+ QVariantMap map = comboDatabase->currentData(Qt::UserRole).toMap();
|
||||||
|
+ Routino_Database * data = (Routino_Database*)(map["db"].toULongLong());
|
||||||
|
if(nullptr == data)
|
||||||
|
{
|
||||||
|
throw QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ loadProfiles(map["profilesPath"].toString());
|
||||||
|
+
|
||||||
|
rte->reset();
|
||||||
|
|
||||||
|
QString strProfile = comboProfile->currentData(Qt::UserRole).toString();
|
||||||
|
@@ -388,18 +453,22 @@ int CRouterRoutino::calcRoute(const QPointF& p1, const QPointF& p2, QPolygonF& c
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
- Routino_Database * data = (Routino_Database*)comboDatabase->currentData(Qt::UserRole).toULongLong();
|
||||||
|
+ QVariantMap map = comboDatabase->currentData(Qt::UserRole).toMap();
|
||||||
|
+ Routino_Database * data = (Routino_Database*)(map["db"].toULongLong());
|
||||||
|
if(nullptr == data)
|
||||||
|
{
|
||||||
|
throw QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ loadProfiles(map["profilesPath"].toString());
|
||||||
|
+
|
||||||
|
QString strProfile = comboProfile->currentData(Qt::UserRole).toString();
|
||||||
|
QString strLanguage = comboLanguage->currentData(Qt::UserRole).toString();
|
||||||
|
|
||||||
|
Routino_Profile *profile = Routino_GetProfile(strProfile.toUtf8());
|
||||||
|
Routino_Translation *translation = Routino_GetTranslation(strLanguage.toUtf8());
|
||||||
|
|
||||||
|
+
|
||||||
|
int res = Routino_ValidateProfile(data, profile);
|
||||||
|
if(res != 0)
|
||||||
|
{
|
||||||
|
diff --git a/src/qmapshack/gis/rte/router/CRouterRoutino.h b/src/qmapshack/gis/rte/router/CRouterRoutino.h
|
||||||
|
index 13217532..7aae8c83 100644
|
||||||
|
--- a/src/qmapshack/gis/rte/router/CRouterRoutino.h
|
||||||
|
+++ b/src/qmapshack/gis/rte/router/CRouterRoutino.h
|
||||||
|
@@ -57,11 +57,13 @@ private slots:
|
||||||
|
virtual ~CRouterRoutino();
|
||||||
|
void buildDatabaseList();
|
||||||
|
void freeDatabaseList();
|
||||||
|
+ int loadProfiles(const QString& profilesPath);
|
||||||
|
void updateHelpText();
|
||||||
|
QString xlateRoutinoError(int err);
|
||||||
|
static CRouterRoutino * pSelf;
|
||||||
|
|
||||||
|
QStringList dbPaths;
|
||||||
|
+ QString currentProfilesPath;
|
||||||
|
|
||||||
|
QMutex mutex {QMutex::NonRecursive};
|
||||||
|
};
|
211
qmapshack-1.15.0-libqt5-5.15.0.patch
Normal file
211
qmapshack-1.15.0-libqt5-5.15.0.patch
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
From 1563ccbc7b1e912e1fced9e0a4a27a382415719d Mon Sep 17 00:00:00 2001
|
||||||
|
From: kiozen <oliver.eichler@gmx.de>
|
||||||
|
Date: Thu, 25 Jun 2020 13:27:20 +0200
|
||||||
|
Subject: [PATCH] [QMS-216] QMapShack does not compile with Qt-5.15
|
||||||
|
|
||||||
|
Add `#include <QPainterPath>` whereever `QPainterPath` is used.
|
||||||
|
|
||||||
|
Additionally ran code beautifier
|
||||||
|
---
|
||||||
|
changelog.txt | 1 +
|
||||||
|
.../gis/rte/router/CRouterOptimization.h | 2 +-
|
||||||
|
.../gis/rte/router/CRouterRoutino.cpp | 6 ++---
|
||||||
|
src/qmapshack/gis/wpt/CGisItemWpt.cpp | 1 +
|
||||||
|
src/qmapshack/helpers/CDraw.cpp | 1 +
|
||||||
|
src/qmapshack/map/CMapIMG.cpp | 1 +
|
||||||
|
src/qmapshack/mouse/IMouseSelect.cpp | 1 +
|
||||||
|
src/qmaptool/helpers/CDraw.cpp | 1 +
|
||||||
|
src/qmaptool/overlay/COverlayCutMap.cpp | 22 ++++++++++---------
|
||||||
|
9 files changed, 22 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/qmapshack/gis/rte/router/CRouterOptimization.h b/src/qmapshack/gis/rte/router/CRouterOptimization.h
|
||||||
|
index 17b699ef..34b8f376 100644
|
||||||
|
--- a/src/qmapshack/gis/rte/router/CRouterOptimization.h
|
||||||
|
+++ b/src/qmapshack/gis/rte/router/CRouterOptimization.h
|
||||||
|
@@ -19,9 +19,9 @@
|
||||||
|
#ifndef CROUTEROPTIMIZATION_H
|
||||||
|
#define CROUTEROPTIMIZATION_H
|
||||||
|
#include <gis/IGisLine.h>
|
||||||
|
+#include <QCoreApplication>
|
||||||
|
#include <QMap>
|
||||||
|
#include <QPolygonF>
|
||||||
|
-#include <QCoreApplication>
|
||||||
|
|
||||||
|
class CRouterOptimization
|
||||||
|
{
|
||||||
|
diff --git a/src/qmapshack/gis/rte/router/CRouterRoutino.cpp b/src/qmapshack/gis/rte/router/CRouterRoutino.cpp
|
||||||
|
index cc32674c..5b8e5770 100644
|
||||||
|
--- a/src/qmapshack/gis/rte/router/CRouterRoutino.cpp
|
||||||
|
+++ b/src/qmapshack/gis/rte/router/CRouterRoutino.cpp
|
||||||
|
@@ -267,7 +267,7 @@ void CRouterRoutino::buildDatabaseList()
|
||||||
|
int pError = 0;
|
||||||
|
dmap["profilesPath"] = "";
|
||||||
|
QStringList profilesPaths = {
|
||||||
|
- dir.filePath(prefix+"-profiles.xml"),
|
||||||
|
+ dir.filePath(prefix + "-profiles.xml"),
|
||||||
|
dir.filePath("profiles.xml"),
|
||||||
|
setup->routinoPath("profiles.xml").toUtf8()
|
||||||
|
};
|
||||||
|
@@ -283,7 +283,7 @@ void CRouterRoutino::buildDatabaseList()
|
||||||
|
}
|
||||||
|
if( dmap["profilesPath"].toString().isEmpty() )
|
||||||
|
{
|
||||||
|
- QMessageBox::critical(this, "Routino...",tr("Could not find a profiles XML file in expected folders. Routino Routing will not function"), QMessageBox::Ok);
|
||||||
|
+ QMessageBox::critical(this, "Routino...", tr("Could not find a profiles XML file in expected folders. Routino Routing will not function"), QMessageBox::Ok);
|
||||||
|
pError = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
@@ -319,7 +319,7 @@ void CRouterRoutino::freeDatabaseList()
|
||||||
|
{
|
||||||
|
for(int i = 0; i < comboDatabase->count(); i++)
|
||||||
|
{
|
||||||
|
- QVariantMap map = comboDatabase->itemData(i,Qt::UserRole).toMap();
|
||||||
|
+ QVariantMap map = comboDatabase->itemData(i, Qt::UserRole).toMap();
|
||||||
|
Routino_Database * data = (Routino_Database*)(map["db"].toULongLong());
|
||||||
|
Routino_UnloadDatabase(data);
|
||||||
|
}
|
||||||
|
diff --git a/src/qmapshack/gis/wpt/CGisItemWpt.cpp b/src/qmapshack/gis/wpt/CGisItemWpt.cpp
|
||||||
|
index c0dffa0f..0be0b00d 100644
|
||||||
|
--- a/src/qmapshack/gis/wpt/CGisItemWpt.cpp
|
||||||
|
+++ b/src/qmapshack/gis/wpt/CGisItemWpt.cpp
|
||||||
|
@@ -36,6 +36,7 @@
|
||||||
|
#include "mouse/IMouse.h"
|
||||||
|
#include "units/IUnit.h"
|
||||||
|
|
||||||
|
+#include <QPainterPath>
|
||||||
|
#include <QtWidgets>
|
||||||
|
#include <QtXml>
|
||||||
|
|
||||||
|
diff --git a/src/qmapshack/helpers/CDraw.cpp b/src/qmapshack/helpers/CDraw.cpp
|
||||||
|
index 803be18c..bd1437bf 100644
|
||||||
|
--- a/src/qmapshack/helpers/CDraw.cpp
|
||||||
|
+++ b/src/qmapshack/helpers/CDraw.cpp
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QImage>
|
||||||
|
+#include <QPainterPath>
|
||||||
|
#include <QPointF>
|
||||||
|
#include <QtMath>
|
||||||
|
|
||||||
|
diff --git a/src/qmapshack/map/CMapIMG.cpp b/src/qmapshack/map/CMapIMG.cpp
|
||||||
|
index 80a4a8ab..4a2e634d 100644
|
||||||
|
--- a/src/qmapshack/map/CMapIMG.cpp
|
||||||
|
+++ b/src/qmapshack/map/CMapIMG.cpp
|
||||||
|
@@ -32,6 +32,7 @@
|
||||||
|
#include "map/garmin/CGarminTyp.h"
|
||||||
|
#include "units/IUnit.h"
|
||||||
|
|
||||||
|
+#include <QPainterPath>
|
||||||
|
#include <QtWidgets>
|
||||||
|
|
||||||
|
#undef DEBUG_SHOW_SECT_DESC
|
||||||
|
diff --git a/src/qmapshack/mouse/IMouseSelect.cpp b/src/qmapshack/mouse/IMouseSelect.cpp
|
||||||
|
index 32535735..176a9221 100644
|
||||||
|
--- a/src/qmapshack/mouse/IMouseSelect.cpp
|
||||||
|
+++ b/src/qmapshack/mouse/IMouseSelect.cpp
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
#include "mouse/IMouseSelect.h"
|
||||||
|
#include "mouse/IScrOpt.h"
|
||||||
|
|
||||||
|
+#include <QPainterPath>
|
||||||
|
#include <QtWidgets>
|
||||||
|
|
||||||
|
IMouseSelect::IMouseSelect(CGisDraw *gis, CCanvas *canvas, CMouseAdapter *mouse)
|
||||||
|
diff --git a/src/qmaptool/helpers/CDraw.cpp b/src/qmaptool/helpers/CDraw.cpp
|
||||||
|
index 610951cf..8a0b2dab 100644
|
||||||
|
--- a/src/qmaptool/helpers/CDraw.cpp
|
||||||
|
+++ b/src/qmaptool/helpers/CDraw.cpp
|
||||||
|
@@ -24,6 +24,7 @@
|
||||||
|
#include <QImage>
|
||||||
|
#include <QPointF>
|
||||||
|
#include <QtMath>
|
||||||
|
+#include <QPainterPath>
|
||||||
|
|
||||||
|
QPen CDraw::penBorderBlue(QColor(10,10,150,220),2);
|
||||||
|
QPen CDraw::penBorderGray(Qt::lightGray,2);
|
||||||
|
diff --git a/src/qmaptool/overlay/COverlayCutMap.cpp b/src/qmaptool/overlay/COverlayCutMap.cpp
|
||||||
|
index 63bf0936..60d96a77 100644
|
||||||
|
--- a/src/qmaptool/overlay/COverlayCutMap.cpp
|
||||||
|
+++ b/src/qmaptool/overlay/COverlayCutMap.cpp
|
||||||
|
@@ -23,12 +23,14 @@
|
||||||
|
#include "overlay/COverlayCutMap.h"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
+#include <QPainterPath>
|
||||||
|
#include <QtWidgets>
|
||||||
|
+
|
||||||
|
using std::bind;
|
||||||
|
|
||||||
|
static inline qreal sqr(qreal a)
|
||||||
|
{
|
||||||
|
- return a*a;
|
||||||
|
+ return a * a;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline qreal sqrlen(const QPointF &a)
|
||||||
|
@@ -88,14 +90,14 @@ bool COverlayCutMap::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
|
||||||
|
path.addRect(rectMap);
|
||||||
|
path.addPolygon(shape);
|
||||||
|
|
||||||
|
- p.setPen(QPen(Qt::darkBlue,1));
|
||||||
|
+ p.setPen(QPen(Qt::darkBlue, 1));
|
||||||
|
|
||||||
|
p.setBrush((idxFocus1 == NOIDX) ? Qt::BDiagPattern : Qt::NoBrush);
|
||||||
|
p.drawPath(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
- QRectF dot1(0,0,5,5);
|
||||||
|
- QRectF dot2(0,0,7,7);
|
||||||
|
+ QRectF dot1(0, 0, 5, 5);
|
||||||
|
+ QRectF dot2(0, 0, 7, 7);
|
||||||
|
const QPointF& pt1 = idxFocus1 != NOIDX ? shape[idxFocus1] : NOPOINTF;
|
||||||
|
const QPointF& pt2 = idxFocus2 != NOIDX ? shape[idxFocus2] : NOPOINTF;
|
||||||
|
|
||||||
|
@@ -219,7 +221,7 @@ void COverlayCutMap::slotSetMode(mode_e m, bool on)
|
||||||
|
|
||||||
|
void COverlayCutMap::slotResetMask()
|
||||||
|
{
|
||||||
|
- int res = QMessageBox::question(this, tr("Delete mask..."), tr("Are you sure to delete complete mask?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes);
|
||||||
|
+ int res = QMessageBox::question(this, tr("Delete mask..."), tr("Are you sure to delete complete mask?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
||||||
|
if(res != QMessageBox::Yes)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
@@ -317,7 +319,7 @@ void COverlayCutMap::slotLoadShape()
|
||||||
|
qreal x, y;
|
||||||
|
in2 >> x >> y;
|
||||||
|
|
||||||
|
- QPointF pt(x,y);
|
||||||
|
+ QPointF pt(x, y);
|
||||||
|
context->convertCoord2Map(pt);
|
||||||
|
|
||||||
|
region << pt;
|
||||||
|
@@ -428,7 +430,7 @@ void COverlayCutMap::isCloseToLine(QPointF pt, QPolygonF line, qint32& idx1, qin
|
||||||
|
|
||||||
|
QPointF b = line[0];
|
||||||
|
QPointF dbq = b - pt;
|
||||||
|
- qreal dist = 30*30;
|
||||||
|
+ qreal dist = 30 * 30;
|
||||||
|
|
||||||
|
for (qint32 i = 1; i < count; ++i)
|
||||||
|
{
|
||||||
|
@@ -439,8 +441,8 @@ void COverlayCutMap::isCloseToLine(QPointF pt, QPolygonF line, qint32& idx1, qin
|
||||||
|
|
||||||
|
const QPointF dab = a - b;
|
||||||
|
|
||||||
|
- const qreal inv_sqrlen = 1./sqrlen(dab);
|
||||||
|
- const qreal t = (dab.x()*daq.x() + dab.y()*daq.y())*inv_sqrlen;
|
||||||
|
+ const qreal inv_sqrlen = 1. / sqrlen(dab);
|
||||||
|
+ const qreal t = (dab.x() * daq.x() + dab.y() * daq.y()) * inv_sqrlen;
|
||||||
|
if (t < 0.)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
@@ -448,7 +450,7 @@ void COverlayCutMap::isCloseToLine(QPointF pt, QPolygonF line, qint32& idx1, qin
|
||||||
|
qreal current_dist;
|
||||||
|
if (t <= 1.)
|
||||||
|
{
|
||||||
|
- current_dist = sqr(dab.x()*dbq.y() - dab.y()*dbq.x())*inv_sqrlen;
|
||||||
|
+ current_dist = sqr(dab.x() * dbq.y() - dab.y() * dbq.x()) * inv_sqrlen;
|
||||||
|
}
|
||||||
|
else//t>1.
|
||||||
|
{
|
102
qmapshack.spec
Normal file
102
qmapshack.spec
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
Name: qmapshack
|
||||||
|
Version: 1.15.0
|
||||||
|
Release: 1mamba
|
||||||
|
Summary: Application to plan outdoor trips and visualize and archive all the GPS recordings
|
||||||
|
Group: Graphical Desktop/Applications/Utilities
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
|
URL: https://github.com/Maproom/qmapshack/wiki
|
||||||
|
Source: https://github.com/Maproom/qmapshack.git/V_%{version}/qmapshack-%{version}.tar.bz2
|
||||||
|
Patch0: qmapshack-1.15.0-libqt5-5.15.0-0.patch
|
||||||
|
Patch1: qmapshack-1.15.0-libqt5-5.15.0.patch
|
||||||
|
Patch2: qmapshack-1.15.0-fix_crash_in_profile.patch
|
||||||
|
License: GPL
|
||||||
|
## AUTOBUILDREQ-BEGIN
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: ldconfig
|
||||||
|
BuildRequires: libGL-devel
|
||||||
|
BuildRequires: libQt5WebEngine-devel
|
||||||
|
BuildRequires: libgcc
|
||||||
|
BuildRequires: libgdal-devel
|
||||||
|
BuildRequires: libjpeg-devel
|
||||||
|
BuildRequires: libproj-devel
|
||||||
|
BuildRequires: libqt5-devel
|
||||||
|
BuildRequires: libquazip-devel
|
||||||
|
BuildRequires: libroutino-devel
|
||||||
|
BuildRequires: libsqlite-devel
|
||||||
|
BuildRequires: libstdc++6-devel
|
||||||
|
## AUTOBUILDREQ-END
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: routino
|
||||||
|
Requires: routino
|
||||||
|
Provides: qlandkartegt
|
||||||
|
Obsoletes: qlandkartegt
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
|
||||||
|
%description
|
||||||
|
Use QMapShack to plan your next outdoor trip or to visualize and archive all the GPS recordings of your past exciting adventures.
|
||||||
|
QMapShack is the next generation of the famous QLandkarte GT application. And of course it's even better and easier to use.
|
||||||
|
|
||||||
|
%debug_package
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cmake -d build
|
||||||
|
%make
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
%makeinstall -C build
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_bindir}/qmapshack
|
||||||
|
%{_bindir}/qmaptool
|
||||||
|
%{_bindir}/qmt_map2jnx
|
||||||
|
%{_bindir}/qmt_rgb2pct
|
||||||
|
%{_datadir}/applications/qmapshack.desktop
|
||||||
|
%{_datadir}/applications/qmaptool.desktop
|
||||||
|
%{_mandir}/man1/qmapshack.1*
|
||||||
|
%{_mandir}/man1/qmaptool.1*
|
||||||
|
%{_mandir}/man1/qmt_map2jnx.1*
|
||||||
|
%{_mandir}/man1/qmt_rgb2pct.1*
|
||||||
|
%{_datadir}/icons/hicolor/*/apps/QMap*.png
|
||||||
|
%{_datadir}/pixmaps/QMapShack.png
|
||||||
|
%{_datadir}/pixmaps/QMapTool.png
|
||||||
|
%{_datadir}/doc/HTML/QMSHelp.qch
|
||||||
|
%{_datadir}/doc/HTML/QMSHelp.qhc
|
||||||
|
%{_datadir}/doc/HTML/QMTHelp.qch
|
||||||
|
%{_datadir}/doc/HTML/QMTHelp.qhc
|
||||||
|
%dir %{_datadir}/qmapshack
|
||||||
|
%dir %{_datadir}/qmapshack/translations
|
||||||
|
%{_datadir}/qmapshack/translations/qmapshack_ca.qm
|
||||||
|
%{_datadir}/qmapshack/translations/qmapshack_cs.qm
|
||||||
|
%{_datadir}/qmapshack/translations/qmapshack_de.qm
|
||||||
|
%{_datadir}/qmapshack/translations/qmapshack_es.qm
|
||||||
|
%{_datadir}/qmapshack/translations/qmapshack_fr.qm
|
||||||
|
%{_datadir}/qmapshack/translations/qmapshack_it.qm
|
||||||
|
%{_datadir}/qmapshack/translations/qmapshack_nl.qm
|
||||||
|
%{_datadir}/qmapshack/translations/qmapshack_ru.qm
|
||||||
|
%dir %{_datadir}/qmaptool
|
||||||
|
%dir %{_datadir}/qmaptool/translations
|
||||||
|
%{_datadir}/qmaptool/translations/qmaptool_de.qm
|
||||||
|
%{_datadir}/qmaptool/translations/qmaptool_es.qm
|
||||||
|
%{_datadir}/qmaptool/translations/qmaptool_it.qm
|
||||||
|
%{_datadir}/qmaptool/translations/qmaptool_ru.qm
|
||||||
|
%dir %{_datadir}/qmt_rgb2pct
|
||||||
|
%dir %{_datadir}/qmt_rgb2pct/translations
|
||||||
|
%{_datadir}/qmt_rgb2pct/translations/qmt_rgb2pct_de.qm
|
||||||
|
%doc LICENSE
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Sep 08 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.15.0-1mamba
|
||||||
|
- package created using the webbuild interface
|
Loading…
Reference in New Issue
Block a user