Fix compatibility with < Qt 6.
This commit is contained in:
parent
5e6e1e2844
commit
cd0813f043
|
@ -27,18 +27,20 @@
|
|||
*************************************************************************/
|
||||
|
||||
#include "mapplication.h"
|
||||
#include "../fervor/fvupdater.h"
|
||||
#include "../ifc/exception/vexceptionbadid.h"
|
||||
#include "../ifc/exception/vexceptionconversionerror.h"
|
||||
#include "../ifc/exception/vexceptionemptyparameter.h"
|
||||
#include "../ifc/exception/vexceptionobjecterror.h"
|
||||
#include "../ifc/exception/vexceptionwrongid.h"
|
||||
#include "../qmuparser/qmuparsererror.h"
|
||||
#include "../vganalytics/def.h"
|
||||
#include "../vganalytics/vganalytics.h"
|
||||
#include "../vmisc/projectversion.h"
|
||||
#include "../vmisc/qt_dispatch/qt_dispatch.h"
|
||||
#include "../vmisc/theme/vapplicationstyle.h"
|
||||
#include "../vmisc/theme/vtheme.h"
|
||||
#include "../vmisc/vsysexits.h"
|
||||
#include "qtpreprocessorsupport.h"
|
||||
#include "tmainwindow.h"
|
||||
#include "version.h"
|
||||
|
||||
|
@ -46,10 +48,7 @@
|
|||
#include "../vmisc/diagnostic.h"
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
||||
|
||||
#include "../fervor/fvupdater.h"
|
||||
#include "../qmuparser/qmuparsererror.h"
|
||||
#include "../vmisc/qt_dispatch/qt_dispatch.h"
|
||||
|
||||
#include <QCommandLineParser>
|
||||
#include <QDir>
|
||||
#include <QFileOpenEvent>
|
||||
#include <QGlobalStatic>
|
||||
|
@ -63,6 +62,7 @@
|
|||
#include <QStyleFactory>
|
||||
#include <QThread>
|
||||
#include <QTranslator>
|
||||
#include <QUuid>
|
||||
#include <iostream>
|
||||
|
||||
#if !defined(BUILD_REVISION) && defined(QBS_BUILD)
|
||||
|
@ -82,9 +82,6 @@ Q_LOGGING_CATEGORY(mApp, "m.application") // NOLINT
|
|||
|
||||
QT_WARNING_POP
|
||||
|
||||
#include <QCommandLineParser>
|
||||
#include <QUuid>
|
||||
|
||||
namespace
|
||||
{
|
||||
QT_WARNING_PUSH
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
#include "dialogs/dialogsetupmultisize.h"
|
||||
#include "dialogs/dialogtapepreferences.h"
|
||||
#include "mapplication.h" // Should be last because of definning qApp
|
||||
#include "qtpreprocessorsupport.h"
|
||||
#include "ui_tmainwindow.h"
|
||||
#include "vlitepattern.h"
|
||||
#include "vtapesettings.h"
|
||||
|
|
|
@ -28,6 +28,12 @@
|
|||
#ifndef THEMEDEF_H
|
||||
#define THEMEDEF_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QtCore/QHashFunctions>
|
||||
#endif
|
||||
|
||||
enum class VColorRole
|
||||
{
|
||||
DefaultColor,
|
||||
|
@ -53,4 +59,12 @@ enum class VColorRole
|
|||
PieceNodeLabelLineColor
|
||||
};
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
Q_DECL_CONST_FUNCTION inline auto qHash(VColorRole key, uint seed = 0) noexcept -> uint
|
||||
{
|
||||
auto underlyingValue = static_cast<typename std::underlying_type<VColorRole>::type>(key);
|
||||
return ::qHash(underlyingValue, seed);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // THEMEDEF_H
|
||||
|
|
|
@ -28,7 +28,11 @@
|
|||
#ifndef VSTYLESHEETSTYLE_H
|
||||
#define VSTYLESHEETSTYLE_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QtCore/QtCompilerDetection>
|
||||
#endif
|
||||
|
||||
class QJsonObject;
|
||||
class QJsonValue;
|
||||
|
|
|
@ -34,10 +34,6 @@
|
|||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QtCore/QHashFunctions>
|
||||
#endif
|
||||
|
||||
#include "../vgeometry/vabstractcurve.h"
|
||||
#include "../vmisc/def.h"
|
||||
#include "../vmisc/vabstractvalapplication.h"
|
||||
|
@ -57,14 +53,6 @@ enum class Mode : qint8
|
|||
Show
|
||||
};
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
Q_DECL_CONST_FUNCTION inline auto qHash(VColor key, uint seed = 0) noexcept -> uint
|
||||
{
|
||||
auto underlyingValue = static_cast<typename std::underlying_type<VColor>::type>(key);
|
||||
return ::qHash(underlyingValue, seed);
|
||||
}
|
||||
#endif
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
|
||||
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
|
||||
|
|
|
@ -39,8 +39,7 @@
|
|||
#include <QtGlobal>
|
||||
|
||||
#include "../vmisc/def.h"
|
||||
#include "qtclasshelpermacros.h"
|
||||
#include "theme/themeDef.h"
|
||||
#include "../vmisc/theme/themeDef.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||
#include "../vmisc/defglobal.h"
|
||||
|
|
Loading…
Reference in New Issue
Block a user