Fix build with qmake.

This commit is contained in:
Roman Telezhynskyi 2023-02-14 14:55:19 +02:00
parent 04d2a1c631
commit db8c776e36
9 changed files with 36 additions and 20 deletions

View File

@ -27,6 +27,8 @@
*************************************************************************/
#include "vparsererrorhandler.h"
#include <QTextDocument>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
//---------------------------------------------------------------------------------------------------------------------
auto VParserErrorHandler::StatusMessage() const -> QString

View File

@ -28,6 +28,8 @@
#ifndef VPARSERERRORHANDLER_H
#define VPARSERERRORHANDLER_H
#include <QtGlobal>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QAbstractMessageHandler>
#include <QSourceLocation>

View File

@ -109,6 +109,7 @@ using qmusizetype = int;
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
#include <QTextStream>
namespace Qt
{
static auto endl = ::endl;

View File

@ -35,7 +35,6 @@
#include <QtCore/qcontainerfwd.h>
#include "../vmisc/def.h"
#include "../vlayout/vtextmanager.h"
class QGraphicsItem;
class QPrinter;

View File

@ -33,6 +33,7 @@
#include <QSet>
#include <QVector>
#include <QFontMetrics>
#include <QLibraryInfo>
#include "defglobal.h"
@ -338,7 +339,8 @@ inline auto VLocaleCharacter(const QChar &character) -> QChar
}
//---------------------------------------------------------------------------------------------------------------------
inline auto DropEventPos(const QDropEvent *event) -> QPoint
template <typename T>
inline auto DropEventPos(const T *event) -> QPoint
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
return event->position().toPoint();

View File

@ -28,8 +28,11 @@
#include "vpropertydef.h"
#include <QChar>
#include <QLocale>
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocalePositiveSign(const QLocale &locale)
auto VPELocalePositiveSign(const QLocale &locale) -> QChar
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const QString sign = locale.positiveSign();
@ -45,7 +48,7 @@ QChar VPELocalePositiveSign(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleNegativeSign(const QLocale &locale)
auto VPELocaleNegativeSign(const QLocale &locale) -> QChar
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const QString sign = locale.negativeSign();
@ -61,7 +64,7 @@ QChar VPELocaleNegativeSign(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleSign0(const QLocale &locale)
auto VPELocaleSign0(const QLocale &locale) -> QChar
{
const QString sign = locale.toString(0);
if (sign.size() == 1)
@ -77,7 +80,7 @@ QChar VPELocaleSign0(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleSign1(const QLocale &locale)
auto VPELocaleSign1(const QLocale &locale) -> QChar
{
const QString sign = locale.toString(1);
if (sign.size() == 1)
@ -93,7 +96,7 @@ QChar VPELocaleSign1(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleSign2(const QLocale &locale)
auto VPELocaleSign2(const QLocale &locale) -> QChar
{
const QString sign = locale.toString(2);
if (sign.size() == 1)
@ -109,7 +112,7 @@ QChar VPELocaleSign2(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleSign3(const QLocale &locale)
auto VPELocaleSign3(const QLocale &locale) -> QChar
{
const QString sign = locale.toString(3);
if (sign.size() == 1)
@ -125,7 +128,7 @@ QChar VPELocaleSign3(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleSign4(const QLocale &locale)
auto VPELocaleSign4(const QLocale &locale) -> QChar
{
const QString sign = locale.toString(4);
if (sign.size() == 1)
@ -141,7 +144,7 @@ QChar VPELocaleSign4(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleSign5(const QLocale &locale)
auto VPELocaleSign5(const QLocale &locale) -> QChar
{
const QString sign = locale.toString(5);
if (sign.size() == 1)
@ -157,7 +160,7 @@ QChar VPELocaleSign5(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleSign6(const QLocale &locale)
auto VPELocaleSign6(const QLocale &locale) -> QChar
{
const QString sign = locale.toString(6);
if (sign.size() == 1)
@ -173,7 +176,7 @@ QChar VPELocaleSign6(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleSign7(const QLocale &locale)
auto VPELocaleSign7(const QLocale &locale) -> QChar
{
const QString sign = locale.toString(7);
if (sign.size() == 1)
@ -189,7 +192,7 @@ QChar VPELocaleSign7(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleSign8(const QLocale &locale)
auto VPELocaleSign8(const QLocale &locale) -> QChar
{
const QString sign = locale.toString(8);
if (sign.size() == 1)
@ -205,7 +208,7 @@ QChar VPELocaleSign8(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleSign9(const QLocale &locale)
auto VPELocaleSign9(const QLocale &locale) -> QChar
{
const QString sign = locale.toString(9);
if (sign.size() == 1)
@ -221,7 +224,7 @@ QChar VPELocaleSign9(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleExpUpper(const QLocale &locale)
auto VPELocaleExpUpper(const QLocale &locale) -> QChar
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const QString sign = locale.exponential();
@ -237,7 +240,7 @@ QChar VPELocaleExpUpper(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleExpLower(const QLocale &locale)
auto VPELocaleExpLower(const QLocale &locale) -> QChar
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const QString sign = locale.exponential();
@ -253,7 +256,7 @@ QChar VPELocaleExpLower(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleDecimalPoint(const QLocale &locale)
auto VPELocaleDecimalPoint(const QLocale &locale) -> QChar
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const QString sign = locale.decimalPoint();
@ -269,7 +272,7 @@ QChar VPELocaleDecimalPoint(const QLocale &locale)
}
//---------------------------------------------------------------------------------------------------------------------
QChar VPELocaleGroupSeparator(const QLocale &locale)
auto VPELocaleGroupSeparator(const QLocale &locale) -> QChar
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const QString sign = locale.groupSeparator();

View File

@ -37,6 +37,9 @@ using vpesizetype = qsizetype;
using vpesizetype = int;
#endif
class QLocale;
class QChar;
VPROPERTYEXPLORERSHARED_EXPORT auto VPELocalePositiveSign(const QLocale &locale) -> QChar;
VPROPERTYEXPLORERSHARED_EXPORT auto VPELocaleNegativeSign(const QLocale &locale) -> QChar;
VPROPERTYEXPLORERSHARED_EXPORT auto VPELocaleSign0(const QLocale &locale) -> QChar;

View File

@ -75,7 +75,8 @@ SOURCES += \
tst_readval.cpp \
tst_vtranslatevars.cpp \
tst_vabstractpiece.cpp \
tst_vtooluniondetails.cpp
tst_vtooluniondetails.cpp \
tst_xsdschema.cpp
*msvc*:SOURCES += stable.cpp
@ -104,7 +105,8 @@ HEADERS += \
tst_readval.h \
tst_vtranslatevars.h \
tst_vabstractpiece.h \
tst_vtooluniondetails.h
tst_vtooluniondetails.h \
tst_xsdschema.h
# Set using ccache. Function enable_ccache() defined in common.pri.
$$enable_ccache()

View File

@ -35,6 +35,8 @@
#include "../ifc/xml/vwatermarkconverter.h"
#include "../ifc/xml/vparsererrorhandler.h"
#include <QTest>
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <xercesc/parsers/XercesDOMParser.hpp>