mirror of
https://gitlab.com/smart-pattern/valentina.git
synced 2024-09-19 23:34:04 +02:00
Compare commits
6 commits
1e6179e69d
...
48da4ff899
Author | SHA1 | Date | |
---|---|---|---|
48da4ff899 | |||
647653a40a | |||
647cee5e36 | |||
178d260dff | |||
fb08b0a317 | |||
2691f0b9e4 |
|
@ -204,7 +204,7 @@ macos_task:
|
|||
matrix:
|
||||
- name: 'macOS Monterey 12 [signle bundle, no tests]'
|
||||
env:
|
||||
MULTI_BUNDLE: true
|
||||
MULTI_BUNDLE: false
|
||||
- name: 'macOS Monterey 12 [multi bundle, no tests]'
|
||||
env:
|
||||
MULTI_BUNDLE: false
|
||||
MULTI_BUNDLE: true
|
||||
|
|
|
@ -58,7 +58,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutLineWidth, (QLatin1String(
|
|||
int cachedLineWidth = -1;
|
||||
} // namespace
|
||||
|
||||
#ifndef QBS_BUILD
|
||||
#ifndef QPRINTENGINE_H
|
||||
Q_DECLARE_METATYPE(QMarginsF) // NOLINT
|
||||
#endif
|
||||
|
||||
|
|
|
@ -40,6 +40,10 @@
|
|||
#include "../vmisc/vsysexits.h"
|
||||
#include "../vmisc/vvalentinasettings.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||
#include "../vmisc/backport/text.h"
|
||||
#endif
|
||||
|
||||
#include <QtDebug>
|
||||
#include <QDir>
|
||||
#include <QProcess>
|
||||
|
|
|
@ -415,7 +415,11 @@ QChar LocaleSign0(const QLocale &locale)
|
|||
const QString sign = locale.toString(0);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -431,7 +435,11 @@ QChar LocaleSign1(const QLocale &locale)
|
|||
const QString sign = locale.toString(1);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -447,7 +455,11 @@ QChar LocaleSign2(const QLocale &locale)
|
|||
const QString sign = locale.toString(2);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -463,7 +475,11 @@ QChar LocaleSign3(const QLocale &locale)
|
|||
const QString sign = locale.toString(3);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -479,7 +495,11 @@ QChar LocaleSign4(const QLocale &locale)
|
|||
const QString sign = locale.toString(4);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -495,7 +515,11 @@ QChar LocaleSign5(const QLocale &locale)
|
|||
const QString sign = locale.toString(5);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -511,7 +535,11 @@ QChar LocaleSign6(const QLocale &locale)
|
|||
const QString sign = locale.toString(6);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -527,7 +555,11 @@ QChar LocaleSign7(const QLocale &locale)
|
|||
const QString sign = locale.toString(7);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -543,7 +575,11 @@ QChar LocaleSign8(const QLocale &locale)
|
|||
const QString sign = locale.toString(8);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -559,7 +595,11 @@ QChar LocaleSign9(const QLocale &locale)
|
|||
const QString sign = locale.toString(9);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
|
|
@ -34,4 +34,5 @@ HEADERS += \
|
|||
$$PWD/qmuformulabase.h \
|
||||
$$PWD/qmutokenparser.h \
|
||||
$$PWD/qmuparsercallback_p.h \
|
||||
$$PWD/make_unique.h
|
||||
$$PWD/make_unique.h \
|
||||
$$PWD/text.h
|
||||
|
|
|
@ -32,6 +32,7 @@ VDynamicLib {
|
|||
"qmutokenparser.h",
|
||||
"qmuparsercallback_p.h",
|
||||
"make_unique.h",
|
||||
"text.h"
|
||||
]
|
||||
|
||||
cpp.defines: ["QMUPARSER_LIBRARY", 'QMUP_VERSION="' + product.version + '"']
|
||||
|
|
|
@ -28,14 +28,18 @@
|
|||
#include <QTextStream>
|
||||
#include <QtDebug>
|
||||
#include <Qt>
|
||||
#include <QtMath>
|
||||
#include <map>
|
||||
#ifdef QMUP_USE_OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
|
||||
#include "qmudef.h"
|
||||
#include "../vmisc/vmath.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||
#include "text.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
|
|
@ -108,17 +108,6 @@ using qmusizetype = qsizetype;
|
|||
using qmusizetype = int;
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||
#include <QTextStream>
|
||||
namespace Qt
|
||||
{
|
||||
static auto endl = ::endl;
|
||||
static auto flush = ::flush;
|
||||
static auto dec = ::dec;
|
||||
static auto SkipEmptyParts = QString::SkipEmptyParts;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace qmu
|
||||
{
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
44
src/libs/qmuparser/text.h
Normal file
44
src/libs/qmuparser/text.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file text.h
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 21 2, 2023
|
||||
**
|
||||
** @brief
|
||||
** @copyright
|
||||
** This source code is part of the Valentina project, a pattern making
|
||||
** program, whose allow create and modeling patterns of clothing.
|
||||
** Copyright (C) 2023 Valentina project
|
||||
** <https://gitlab.com/smart-pattern/valentina> All Rights Reserved.
|
||||
**
|
||||
** Valentina is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** Valentina is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
#ifndef TEXT_H
|
||||
#define TEXT_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||
#include <QTextStream>
|
||||
namespace Qt
|
||||
{
|
||||
//static auto endl = ::endl;
|
||||
//static auto flush = ::flush;
|
||||
static auto dec = ::dec;
|
||||
//static auto SkipEmptyParts = QString::SkipEmptyParts;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // TEXT_H
|
|
@ -71,7 +71,7 @@ const qreal VCommonSettings::defaultScrollingAcceleration = 1.3;
|
|||
const qreal VCommonSettings::scrollingAccelerationMin = 1.0;
|
||||
const qreal VCommonSettings::scrollingAccelerationMax = 10.0;
|
||||
|
||||
#ifndef QBS_BUILD
|
||||
#ifndef QPRINTENGINE_H
|
||||
Q_DECLARE_METATYPE(QMarginsF) // NOLINT
|
||||
#endif
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "../vmisc/compatibility.h"
|
||||
#include "qglobal.h"
|
||||
|
||||
#ifndef QBS_BUILD
|
||||
#ifndef QPRINTENGINE_H
|
||||
Q_DECLARE_METATYPE(QMarginsF) // NOLINT
|
||||
#endif
|
||||
|
||||
|
|
|
@ -69,7 +69,11 @@ auto VPELocaleSign0(const QLocale &locale) -> QChar
|
|||
const QString sign = locale.toString(0);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -85,7 +89,11 @@ auto VPELocaleSign1(const QLocale &locale) -> QChar
|
|||
const QString sign = locale.toString(1);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -101,7 +109,11 @@ auto VPELocaleSign2(const QLocale &locale) -> QChar
|
|||
const QString sign = locale.toString(2);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -117,7 +129,11 @@ auto VPELocaleSign3(const QLocale &locale) -> QChar
|
|||
const QString sign = locale.toString(3);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -133,7 +149,11 @@ auto VPELocaleSign4(const QLocale &locale) -> QChar
|
|||
const QString sign = locale.toString(4);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -149,7 +169,11 @@ auto VPELocaleSign5(const QLocale &locale) -> QChar
|
|||
const QString sign = locale.toString(5);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -165,7 +189,11 @@ auto VPELocaleSign6(const QLocale &locale) -> QChar
|
|||
const QString sign = locale.toString(6);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -181,7 +209,11 @@ auto VPELocaleSign7(const QLocale &locale) -> QChar
|
|||
const QString sign = locale.toString(7);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -197,7 +229,11 @@ auto VPELocaleSign8(const QLocale &locale) -> QChar
|
|||
const QString sign = locale.toString(8);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -213,7 +249,11 @@ auto VPELocaleSign9(const QLocale &locale) -> QChar
|
|||
const QString sign = locale.toString(9);
|
||||
if (sign.size() == 1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
return sign.front();
|
||||
#else
|
||||
return sign.at(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
|
Loading…
Reference in a new issue