1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-26 19:19:16 +02:00

Split the config header to config+hash headers

This commit is contained in:
2023-01-26 01:11:56 +01:00
parent 51511a9bf9
commit af3e5d41c2
15 changed files with 30 additions and 26 deletions

View File

@ -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
View 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