Fix build issues.

This commit is contained in:
Roman Telezhynskyi 2023-06-27 14:22:49 +03:00
parent eaf9d65339
commit 85bda5a28b
6 changed files with 27 additions and 6 deletions

View File

@ -143,7 +143,8 @@ Module {
else if (product.windeployqt.noCompilerRuntime)
cmdArgs.push("--no-compiler-runtime")
if (product.windeployqt.noVirtualkeyboard && Utilities.versionCompare(Qt.core.version, "6.5") < 0)
if (product.windeployqt.noVirtualkeyboard &&
Utilities.versionCompare(product.Qt.core.version, "6.5") < 0)
cmdArgs.push("--no-virtualkeyboard")
if (product.windeployqt.json)
@ -158,7 +159,7 @@ Module {
if (product.windeployqt.verbose !== undefined)
cmdArgs.push("--verbose", product.windeployqt.verbose)
cmdArgs.push(product.installDir + "/" + input.fileName);
cmdArgs.push(product.installDir + "\\" + input.fileName);
var cmd = new Command(product.Qt.core.binPath + "/" + windeployqtProgram, cmdArgs);
cmd.jobPool = "windeployqt";

View File

@ -71,7 +71,7 @@ Q_REQUIRED_RESULT auto ParseCorrectiosn(const QJsonObject &correctionsObject) ->
for (auto segmentsIt = segmentsObject.constBegin(); segmentsIt != segmentsObject.constEnd(); ++segmentsIt)
{
bool correct = segmentsIt.value().toBool();
if (not correct)
if (!correct)
{
segments.insert(segmentsIt.key().toInt(), correct);
}

View File

@ -409,4 +409,14 @@ template <typename T, typename N> inline auto Sliced(const T &list, N pos, N n)
#endif
}
//---------------------------------------------------------------------------------------------------------------------
inline auto Back(const QString &str) -> QChar
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
return str.back();
#else
return str.at(str.size() - 1);
#endif
}
#endif // COMPATIBILITY_H

View File

@ -32,6 +32,10 @@
#include <QString>
#include <QXmlStreamReader>
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
#include "../defglobal.h"
#endif
class QFile;
class VSvgFont;
class VSvgFontEngine;

View File

@ -33,9 +33,11 @@
#include <QtMath>
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
#include "../vmisc/diagnostic.h"
#include "../diagnostic.h"
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
#include "../compatibility.h"
namespace
{
QT_WARNING_PUSH
@ -68,12 +70,12 @@ auto IsSeparator(const QString &currentToken, const QChar &ch) -> bool
return true;
}
if (ch == '-' && !currentToken.isEmpty() && currentToken.back() != 'e' && currentToken.back() != 'E')
if (ch == '-' && !currentToken.isEmpty() && Back(currentToken) != 'e' && Back(currentToken) != 'E')
{
return true;
}
if (ch == '+' && !currentToken.isEmpty() && currentToken.back() != 'e' && currentToken.back() != 'E')
if (ch == '+' && !currentToken.isEmpty() && Back(currentToken) != 'e' && Back(currentToken) != 'E')
{
return true;
}

View File

@ -34,6 +34,10 @@
#include <QPointF>
#include <QString>
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
#include "../defglobal.h"
#endif
class QPainterPath;
struct VSVGPathCommand