mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Split the config header to config+hash headers
This commit is contained in:
parent
51511a9bf9
commit
af3e5d41c2
@ -29,6 +29,7 @@ HEADERS += src/common/config.h \
|
||||
src/GUI/pluginparameters.h \
|
||||
src/common/garmin.h \
|
||||
src/common/coordinates.h \
|
||||
src/common/hash.h \
|
||||
src/common/linec.h \
|
||||
src/common/range.h \
|
||||
src/common/rectc.h \
|
||||
|
@ -28,10 +28,10 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
|
||||
#endif
|
||||
setApplicationVersion(APP_VERSION);
|
||||
|
||||
QTranslator *gpxsee = new QTranslator(this);
|
||||
if (gpxsee->load(QLocale::system(), "gpxsee", "_",
|
||||
QTranslator *app = new QTranslator(this);
|
||||
if (app->load(QLocale::system(), "gpxsee", "_",
|
||||
ProgramPaths::translationsDir()))
|
||||
installTranslator(gpxsee);
|
||||
installTranslator(app);
|
||||
|
||||
QTranslator *qt = new QTranslator(this);
|
||||
#if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <QStyle>
|
||||
#include <QTabBar>
|
||||
#include <QGeoPositionInfoSource>
|
||||
#include "common/config.h"
|
||||
#include "common/programpaths.h"
|
||||
#include "common/downloader.h"
|
||||
#include "data/data.h"
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <QList>
|
||||
#include <QFlags>
|
||||
#include "common/rectc.h"
|
||||
#include "common/config.h"
|
||||
#include "data/waypoint.h"
|
||||
#include "map/projection.h"
|
||||
#include "searchpointer.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef SEARCHPOINTER_H
|
||||
#define SEARCHPOINTER_H
|
||||
|
||||
#include "common/config.h"
|
||||
#include "common/hash.h"
|
||||
|
||||
template <class T>
|
||||
class SearchPointer
|
||||
|
@ -1,21 +1,7 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QPoint>
|
||||
|
||||
#define APP_NAME "GPXSee"
|
||||
#define APP_HOMEPAGE "http://www.gpxsee.org"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#define HASH_T uint
|
||||
#else // QT6
|
||||
#define HASH_T size_t
|
||||
#endif // QT6
|
||||
|
||||
inline HASH_T qHash(const QPoint &p)
|
||||
{
|
||||
return ::qHash(p.x()) ^ ::qHash(p.y());
|
||||
}
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
18
src/common/hash.h
Normal file
18
src/common/hash.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef HASH_H
|
||||
#define HASH_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QPoint>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#define HASH_T uint
|
||||
#else // QT6
|
||||
#define HASH_T size_t
|
||||
#endif // QT6
|
||||
|
||||
inline HASH_T qHash(const QPoint &p)
|
||||
{
|
||||
return ::qHash(p.x()) ^ ::qHash(p.y());
|
||||
}
|
||||
|
||||
#endif // HASH_H
|
@ -4,7 +4,7 @@
|
||||
#include <QString>
|
||||
#include <QCache>
|
||||
#include <QByteArray>
|
||||
#include "common/config.h"
|
||||
#include "common/hash.h"
|
||||
#include "area.h"
|
||||
|
||||
class QString;
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <QVector>
|
||||
#include <QPixmap>
|
||||
#include <QDebug>
|
||||
#include "common/config.h"
|
||||
#include "common/hash.h"
|
||||
#include "common/coordinates.h"
|
||||
#include "link.h"
|
||||
#include "style.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define IMG_SHIELD_H
|
||||
|
||||
#include <QString>
|
||||
#include "common/config.h"
|
||||
#include "common/hash.h"
|
||||
|
||||
#define FIRST_SHIELD Shield::USInterstate
|
||||
#define LAST_SHIELD Shield::Oval
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <QImageReader>
|
||||
#include <QBuffer>
|
||||
#include <QtConcurrent>
|
||||
#include "common/hash.h"
|
||||
#include "osm.h"
|
||||
#include "tile.h"
|
||||
#include "aqmmap.h"
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QHash>
|
||||
#include "common/config.h"
|
||||
#include "map.h"
|
||||
|
||||
class AQMMap : public Map
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QFile>
|
||||
#include <QCache>
|
||||
#include <QPainterPath>
|
||||
#include "common/config.h"
|
||||
#include "common/hash.h"
|
||||
#include "common/rectc.h"
|
||||
#include "common/rtree.h"
|
||||
#include "common/range.h"
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <QRegularExpression>
|
||||
#include "common/coordinates.h"
|
||||
#include "common/rectc.h"
|
||||
#include "common/config.h"
|
||||
#include "tar.h"
|
||||
#include "ozf.h"
|
||||
#include "image.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <QSet>
|
||||
#include <QList>
|
||||
#include <QHash>
|
||||
#include "common/config.h"
|
||||
#include "common/hash.h"
|
||||
#include "common/rectc.h"
|
||||
#include "common/kv.h"
|
||||
#include "common/downloader.h"
|
||||
|
Loading…
Reference in New Issue
Block a user