Support build with MSVC.
--HG-- branch : develop
This commit is contained in:
parent
336f2295f1
commit
a06a162100
|
@ -75,7 +75,6 @@ RESOURCES += \
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
share/resources/valentina.rc \
|
share/resources/valentina.rc \
|
||||||
share/resources/valentina.exe.manifest \
|
|
||||||
share/resources/icon/64x64/icon64x64.ico
|
share/resources/icon/64x64/icon64x64.ico
|
||||||
|
|
||||||
TRANSLATIONS += share/translations/valentina.ts \
|
TRANSLATIONS += share/translations/valentina.ts \
|
||||||
|
|
|
@ -182,14 +182,14 @@ void Calculator::InitCharacterSets()
|
||||||
{
|
{
|
||||||
//String with all unique symbols for supported alpabets.
|
//String with all unique symbols for supported alpabets.
|
||||||
// See script alphabets.py for generation and more information.
|
// See script alphabets.py for generation and more information.
|
||||||
const QString symbols = QStringLiteral("ցЀĆЈVӧĎАғΕĖӅИқΝĞơРңњΥĦШҫ̆جگĮаҳѕεشԶиһνԾрυلՆӝшËՎҔPÓՖXӛӟŞӣզhëծpóӞնxßվāŁЃֆĉЋCŬđ"
|
const QString symbols = QStringLiteral("ցЀĆЈVӧĎАғΕĖӅИқΝĞơРңњΥĦШҫ̆جگĮаҳѕεشԶиһνԾрυلՆӝшËՎҔPÓՖXӛӟŞӣզhëծpóӞնxßվāŁЃֆĉЋCŬđ\
|
||||||
"ҐГΒęҘЛΚŘġҠУGاհЫدԱҰгβطԹõлκKՁÀуςهՉÈыvیՑÐSOřӘћաőcӐթèkàѓżűðsķչøӥӔĀփїІĈЎґĐΗЖҙĘȚ"
|
ҐГΒęҘЛΚŘġҠУGاհЫدԱҰгβطԹõлκKՁÀуςهՉÈыvیՑÐSOřӘћաőcӐթèkàѓżűðsķչøӥӔĀփїІĈЎґĐΗЖҙĘȚ\
|
||||||
"ΟОҡĠآΧЦتЮұİزηжԸغοоÁՀقχцÉՈيюÑՐђӋіәťӆўáŠĺѐfөըnñŰӤӨӹոľЁրăЉŭċБӸēłΔҖЙŤěΜӜDСձģΤӰ"
|
ΟОҡĠآΧЦتЮұİزηжԸغοоÁՀقχцÉՈيюÑՐђӋіәťӆўáŠĺѐfөըnñŰӤӨӹոľЁրăЉŭċБӸēłΔҖЙŤěΜӜDСձģΤӰ\
|
||||||
"ЩīņحҮбưԳصδHйԻŇμӲӴсՃمτƠщՋєLQŹՓŕÖYśÞaգĽæiŽիӓîqճöyջþĂօЄӦĊЌΑĒДҗјΙȘĚМΡéĵĢФūӚΩبĪ"
|
ЩīņحҮбưԳصδHйԻŇμӲӴсՃمτƠщՋєLQŹՓŕÖYśÞaգĽæiŽիӓîqճöyջþĂօЄӦĊЌΑĒДҗјΙȘĚМΡéĵĢФūӚΩبĪ\
|
||||||
"ЬүќαذԲдҷιظԺмρՂфÇωوՊьÏՒTŚĻJբdçժlïӪղtպӫAւąЇčŃЏĕӯЗΖEțŮĝПΞأĥĹЧΦثÆӳЯIسŲԵзζԽпξكՅ"
|
ЬүќαذԲдҷιظԺмρՂфÇωوՊьÏՒTŚĻJբdçժlïӪղtպӫAւąЇčŃЏĕӯЗΖEțŮĝПΞأĥĹЧΦثÆӳЯIسŲԵзζԽпξكՅ\
|
||||||
"ÄчφNMՍӌяӢՕÔWÎŝÜџёźեägխoӒյôwĶBžսüЂĄև̈ЊČƏљΓВҕĔӮΛКĜΣТҥĤکЪƯخγвŅԴŪضλкԼĴσтÅՄنъÍՌR"
|
ÄчφNMՍӌяӢՕÔWÎŝÜџёźեägխoӒյôwĶBžսüЂĄև̈ЊČƏљΓВҕĔӮΛКĜΣТҥĤکЪƯخγвŅԴŪضλкԼĴσтÅՄنъÍՌR\
|
||||||
"ӕՔZÝŜbåդﻩjíլļrӵմzýռپêЅքćچЍďӱҒЕůėژșΘØҚНğńءΠFҢХħΨҪЭųįҶرҲеԷňعθҺнԿفπÂхՇψÊэšՏÒU"
|
ӕՔZÝŜbåդﻩjíլļrӵմzýռپêЅքćچЍďӱҒЕůėژșΘØҚНğńءΠFҢХħΨҪЭųįҶرҲеԷňعθҺнԿفπÂхՇψÊэšՏÒU\
|
||||||
"əÚѝŻşҤӑâeէŐımկòuշÕúտŔ");
|
əÚѝŻşҤӑâeէŐımկòuշÕúտŔ");
|
||||||
|
|
||||||
// Defining identifier character sets
|
// Defining identifier character sets
|
||||||
DefineNameChars(QStringLiteral("0123456789_") + symbols);
|
DefineNameChars(QStringLiteral("0123456789_") + symbols);
|
||||||
|
|
|
@ -1766,15 +1766,14 @@ void VApplication::restoreOverrideCursor(const QString &pixmapPath)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QStringList VApplication::LabelLanguages()
|
QStringList VApplication::LabelLanguages()
|
||||||
{
|
{
|
||||||
QStringList list{"de", // German
|
QStringList list = QStringList() << "de" // German
|
||||||
"en", // English
|
<< "en" // English
|
||||||
"fr", // French
|
<< "fr" // French
|
||||||
"ru", // Russian
|
<< "ru" // Russian
|
||||||
"uk", // Ukrainian
|
<< "uk" // Ukrainian
|
||||||
"hr", // Croatian
|
<< "hr" // Croatian
|
||||||
"sr", // Serbian
|
<< "sr" // Serbian
|
||||||
"bs" // Bosnian
|
<< "bs"; // Bosnian
|
||||||
};
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ VTranslation::VTranslation(const VTranslation &tr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QString VTranslation::VTranslation::translate() const
|
QString VTranslation::translate() const
|
||||||
{
|
{
|
||||||
return QCoreApplication::translate(mcontext.toUtf8().constData(), msourceText.toUtf8().constData(),
|
return QCoreApplication::translate(mcontext.toUtf8().constData(), msourceText.toUtf8().constData(),
|
||||||
mdisambiguation.toUtf8().constData(), mn);
|
mdisambiguation.toUtf8().constData(), mn);
|
||||||
|
|
|
@ -135,7 +135,7 @@ void PathPage::InitTable()
|
||||||
pathTable->setSelectionMode(QAbstractItemView::SingleSelection);
|
pathTable->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||||
pathTable->setShowGrid(false);
|
pathTable->setShowGrid(false);
|
||||||
|
|
||||||
QStringList tableHeader{tr("Type"), tr("Path")};
|
QStringList tableHeader = QStringList() << tr("Type") << tr("Path");
|
||||||
pathTable->setHorizontalHeaderLabels(tableHeader);
|
pathTable->setHorizontalHeaderLabels(tableHeader);
|
||||||
|
|
||||||
QString path;
|
QString path;
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <QException>
|
#include <QException>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
#include "../options.h"
|
||||||
|
|
||||||
class QWidget;
|
class QWidget;
|
||||||
|
|
||||||
|
@ -44,9 +45,9 @@ class VException : public QException
|
||||||
public:
|
public:
|
||||||
VException(const QString &what);
|
VException(const QString &what);
|
||||||
VException(const VException &e);
|
VException(const VException &e);
|
||||||
virtual ~VException() noexcept (true){}
|
Q_NORETURN virtual ~VException() V_NOEXCEPT_EXPR (true){}
|
||||||
|
|
||||||
virtual void raise() const;
|
Q_NORETURN virtual void raise() const;
|
||||||
// cppcheck-suppress unusedFunction
|
// cppcheck-suppress unusedFunction
|
||||||
virtual VException *clone() const;
|
virtual VException *clone() const;
|
||||||
virtual QString ErrorMessage() const;
|
virtual QString ErrorMessage() const;
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
VExceptionBadId(const QString &what, const quint32 &id);
|
VExceptionBadId(const QString &what, const quint32 &id);
|
||||||
VExceptionBadId(const QString &what, const QString &key);
|
VExceptionBadId(const QString &what, const QString &key);
|
||||||
VExceptionBadId(const VExceptionBadId &e);
|
VExceptionBadId(const VExceptionBadId &e);
|
||||||
virtual ~VExceptionBadId() noexcept (true){}
|
virtual ~VExceptionBadId() V_NOEXCEPT_EXPR (true){}
|
||||||
virtual QString ErrorMessage() const;
|
virtual QString ErrorMessage() const;
|
||||||
quint32 BadId() const;
|
quint32 BadId() const;
|
||||||
QString BadKey() const;
|
QString BadKey() const;
|
||||||
|
|
|
@ -50,7 +50,7 @@ VExceptionConversionError::VExceptionConversionError(const VExceptionConversionE
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VExceptionConversionError::~VExceptionConversionError() noexcept (true)
|
VExceptionConversionError::~VExceptionConversionError() V_NOEXCEPT_EXPR (true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -39,7 +39,7 @@ class VExceptionConversionError : public VException
|
||||||
public:
|
public:
|
||||||
VExceptionConversionError(const QString &what, const QString &str);
|
VExceptionConversionError(const QString &what, const QString &str);
|
||||||
VExceptionConversionError(const VExceptionConversionError &e);
|
VExceptionConversionError(const VExceptionConversionError &e);
|
||||||
virtual ~VExceptionConversionError() noexcept (true);
|
virtual ~VExceptionConversionError() V_NOEXCEPT_EXPR (true);
|
||||||
virtual QString ErrorMessage() const;
|
virtual QString ErrorMessage() const;
|
||||||
QString String() const;
|
QString String() const;
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -59,7 +59,7 @@ VExceptionEmptyParameter::VExceptionEmptyParameter(const VExceptionEmptyParamete
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VExceptionEmptyParameter::~VExceptionEmptyParameter() noexcept (true)
|
VExceptionEmptyParameter::~VExceptionEmptyParameter() V_NOEXCEPT_EXPR (true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -41,7 +41,7 @@ class VExceptionEmptyParameter : public VException
|
||||||
public:
|
public:
|
||||||
VExceptionEmptyParameter(const QString &what, const QString &name, const QDomElement &domElement);
|
VExceptionEmptyParameter(const QString &what, const QString &name, const QDomElement &domElement);
|
||||||
VExceptionEmptyParameter(const VExceptionEmptyParameter &e);
|
VExceptionEmptyParameter(const VExceptionEmptyParameter &e);
|
||||||
virtual ~VExceptionEmptyParameter() noexcept (true);
|
virtual ~VExceptionEmptyParameter() V_NOEXCEPT_EXPR (true);
|
||||||
virtual QString ErrorMessage() const;
|
virtual QString ErrorMessage() const;
|
||||||
virtual QString DetailedInformation() const;
|
virtual QString DetailedInformation() const;
|
||||||
QString Name() const;
|
QString Name() const;
|
||||||
|
|
|
@ -41,7 +41,7 @@ class VExceptionObjectError : public VException
|
||||||
public:
|
public:
|
||||||
VExceptionObjectError(const QString &what, const QDomElement &domElement);
|
VExceptionObjectError(const QString &what, const QDomElement &domElement);
|
||||||
VExceptionObjectError(const VExceptionObjectError &e);
|
VExceptionObjectError(const VExceptionObjectError &e);
|
||||||
virtual ~VExceptionObjectError() noexcept (true) {}
|
virtual ~VExceptionObjectError() V_NOEXCEPT_EXPR (true) {}
|
||||||
virtual QString ErrorMessage() const;
|
virtual QString ErrorMessage() const;
|
||||||
virtual QString DetailedInformation() const;
|
virtual QString DetailedInformation() const;
|
||||||
QString TagText() const;
|
QString TagText() const;
|
||||||
|
|
|
@ -39,5 +39,5 @@ VExceptionUndo::VExceptionUndo(const VExceptionUndo &e)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VExceptionUndo::~VExceptionUndo() noexcept (true)
|
VExceptionUndo::~VExceptionUndo() V_NOEXCEPT_EXPR (true)
|
||||||
{}
|
{}
|
||||||
|
|
|
@ -36,7 +36,7 @@ class VExceptionUndo : public VException
|
||||||
public:
|
public:
|
||||||
VExceptionUndo(const QString &what);
|
VExceptionUndo(const QString &what);
|
||||||
VExceptionUndo(const VExceptionUndo &e);
|
VExceptionUndo(const VExceptionUndo &e);
|
||||||
virtual ~VExceptionUndo() noexcept (true);
|
virtual ~VExceptionUndo() V_NOEXCEPT_EXPR (true);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // VEXCEPTIONUNDO_H
|
#endif // VEXCEPTIONUNDO_H
|
||||||
|
|
|
@ -41,7 +41,7 @@ class VExceptionWrongId : public VException
|
||||||
public:
|
public:
|
||||||
VExceptionWrongId(const QString &what, const QDomElement &domElement);
|
VExceptionWrongId(const QString &what, const QDomElement &domElement);
|
||||||
VExceptionWrongId(const VExceptionWrongId &e);
|
VExceptionWrongId(const VExceptionWrongId &e);
|
||||||
virtual ~VExceptionWrongId() noexcept (true){}
|
virtual ~VExceptionWrongId() V_NOEXCEPT_EXPR (true){}
|
||||||
virtual QString ErrorMessage() const;
|
virtual QString ErrorMessage() const;
|
||||||
virtual QString DetailedInformation() const;
|
virtual QString DetailedInformation() const;
|
||||||
QString TagText() const;
|
QString TagText() const;
|
||||||
|
|
|
@ -68,10 +68,15 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
currentScene(nullptr), sceneDraw(nullptr), sceneDetails(nullptr), mouseCoordinate(nullptr), helpLabel(nullptr),
|
currentScene(nullptr), sceneDraw(nullptr), sceneDetails(nullptr), mouseCoordinate(nullptr), helpLabel(nullptr),
|
||||||
isInitialized(false), dialogTable(nullptr), dialogTool(nullptr), dialogHistory(nullptr),
|
isInitialized(false), dialogTable(nullptr), dialogTool(nullptr), dialogHistory(nullptr),
|
||||||
comboBoxDraws(nullptr), curFile(QString()), mode(Draw::Calculation), currentDrawIndex(0),
|
comboBoxDraws(nullptr), curFile(QString()), mode(Draw::Calculation), currentDrawIndex(0),
|
||||||
currentToolBoxIndex(0), drawMode(true), recentFileActs{nullptr, nullptr, nullptr, nullptr, nullptr},
|
currentToolBoxIndex(0), drawMode(true), recentFileActs(),
|
||||||
separatorAct(nullptr), autoSaveTimer(nullptr), guiEnabled(true), gradationHeights(nullptr),
|
separatorAct(nullptr), autoSaveTimer(nullptr), guiEnabled(true), gradationHeights(nullptr),
|
||||||
gradationSizes(nullptr), toolOptions(nullptr)
|
gradationSizes(nullptr), toolOptions(nullptr)
|
||||||
{
|
{
|
||||||
|
for (int i = 0; i < MaxRecentFiles; ++i)
|
||||||
|
{
|
||||||
|
recentFileActs[i] = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
CreateActions();
|
CreateActions();
|
||||||
CreateMenus();
|
CreateMenus();
|
||||||
ToolBarDraws();
|
ToolBarDraws();
|
||||||
|
@ -889,13 +894,13 @@ void MainWindow::ToolBarTools()
|
||||||
QKeySequence::ZoomOut). For examle "+" is Qt::Key_Plus + Qt::KeypadModifier for keypad.
|
QKeySequence::ZoomOut). For examle "+" is Qt::Key_Plus + Qt::KeypadModifier for keypad.
|
||||||
Also for me don't work Qt:CTRL and work Qt::ControlModifier.*/
|
Also for me don't work Qt:CTRL and work Qt::ControlModifier.*/
|
||||||
|
|
||||||
const QList<QKeySequence> zoomInShortcuts = {QKeySequence::ZoomIn,
|
const QList<QKeySequence> zoomInShortcuts = QList<QKeySequence>() << QKeySequence::ZoomIn
|
||||||
Qt::ControlModifier + Qt::Key_Plus + Qt::KeypadModifier};
|
<< Qt::ControlModifier + Qt::Key_Plus + Qt::KeypadModifier;
|
||||||
ui->actionZoomIn->setShortcuts(zoomInShortcuts);
|
ui->actionZoomIn->setShortcuts(zoomInShortcuts);
|
||||||
connect(ui->actionZoomIn, &QAction::triggered, ui->view, &VMainGraphicsView::ZoomIn);
|
connect(ui->actionZoomIn, &QAction::triggered, ui->view, &VMainGraphicsView::ZoomIn);
|
||||||
|
|
||||||
const QList<QKeySequence> zoomOutShortcuts = {QKeySequence::ZoomOut,
|
const QList<QKeySequence> zoomOutShortcuts = QList<QKeySequence>() << QKeySequence::ZoomOut
|
||||||
Qt::ControlModifier + Qt::Key_Minus + Qt::KeypadModifier};
|
<< Qt::ControlModifier + Qt::Key_Minus + Qt::KeypadModifier;
|
||||||
ui->actionZoomOut->setShortcuts(zoomOutShortcuts);
|
ui->actionZoomOut->setShortcuts(zoomOutShortcuts);
|
||||||
connect(ui->actionZoomOut, &QAction::triggered, ui->view, &VMainGraphicsView::ZoomOut);
|
connect(ui->actionZoomOut, &QAction::triggered, ui->view, &VMainGraphicsView::ZoomOut);
|
||||||
|
|
||||||
|
|
|
@ -213,8 +213,11 @@ const QString max_F = QStringLiteral("max");
|
||||||
const QString sum_F = QStringLiteral("sum");
|
const QString sum_F = QStringLiteral("sum");
|
||||||
const QString avg_F = QStringLiteral("avg");
|
const QString avg_F = QStringLiteral("avg");
|
||||||
|
|
||||||
const QStringList builInFunctions{sin_F, cos_F, tan_F, asin_F, acos_F, atan_F, sinh_F, cosh_F, tanh_F, asinh_F, acosh_F,
|
const QStringList builInFunctions = QStringList() << sin_F << cos_F << tan_F << asin_F << acos_F << atan_F
|
||||||
atanh_F, log2_F, log10_F, log_F, ln_F, exp_F, sqrt_F, sign_F, rint_F, abs_F, min_F, max_F, sum_F, avg_F};
|
<< sinh_F << cosh_F << tanh_F << asinh_F << acosh_F << atanh_F
|
||||||
|
<< log2_F << log10_F << log_F << ln_F << exp_F << sqrt_F
|
||||||
|
<< sign_F << rint_F << abs_F << min_F << max_F << sum_F
|
||||||
|
<< avg_F;
|
||||||
|
|
||||||
// Postfix operators
|
// Postfix operators
|
||||||
const QString cm_Oprt = QStringLiteral("cm");
|
const QString cm_Oprt = QStringLiteral("cm");
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
|
#define NOMINMAX
|
||||||
# include <Windows.h>
|
# include <Windows.h>
|
||||||
|
|
||||||
extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
|
extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
|
||||||
|
@ -370,4 +371,19 @@ extern const QString in_Oprt;
|
||||||
#define SCASSERT(cond) qt_noop();
|
#define SCASSERT(cond) qt_noop();
|
||||||
#endif /* QT_NO_DEBUG */
|
#endif /* QT_NO_DEBUG */
|
||||||
|
|
||||||
|
// Detect whether the compiler supports C++11 noexcept exception specifications.
|
||||||
|
# if defined(__clang__)
|
||||||
|
# if __has_feature(cxx_noexcept)
|
||||||
|
# define V_NOEXCEPT_EXPR(x) noexcept(x) // Clang 3.0 and above have noexcept
|
||||||
|
# endif
|
||||||
|
# elif defined(__GNUC__)
|
||||||
|
# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||||
|
# define V_NOEXCEPT_EXPR(x) noexcept(x) // GCC 4.7 and following have noexcept
|
||||||
|
# endif
|
||||||
|
# elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 180021114
|
||||||
|
# define QMUP_NOEXCEPT_EXPR(x) noexcept(x)
|
||||||
|
# else
|
||||||
|
# define V_NOEXCEPT_EXPR(x)
|
||||||
|
# endif
|
||||||
|
|
||||||
#endif // OPTIONS_H
|
#endif // OPTIONS_H
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
|
||||||
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
|
|
||||||
<assemblyIdentity
|
|
||||||
version="0.2.8.0"
|
|
||||||
processorArchitecture="*"
|
|
||||||
name="ValentinaTeam.Valentina.Valentina"
|
|
||||||
type="win32"
|
|
||||||
/>
|
|
||||||
<dependency>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity
|
|
||||||
type='win32'
|
|
||||||
name='Microsoft.Windows.Common-Controls'
|
|
||||||
version='6.0.0.0'
|
|
||||||
publicKeyToken='6595b64144ccf1df'
|
|
||||||
language='*'
|
|
||||||
processorArchitecture='*' />
|
|
||||||
</dependentAssembly>
|
|
||||||
</dependency>
|
|
||||||
</assembly>
|
|
|
@ -1,14 +1,5 @@
|
||||||
IDI_ICON1 ICON DISCARDABLE "icon/64x64/icon64x64.ico"
|
IDI_ICON1 ICON DISCARDABLE "icon/64x64/icon64x64.ico"
|
||||||
|
|
||||||
// XP-style Common Dialogs
|
|
||||||
// If you want XP mode versions then you'll have to add a resource file that
|
|
||||||
// contains a reference to a magic manifest file which specifies that your
|
|
||||||
// app using v6 of the MS common controls library.
|
|
||||||
// http://qtcreator.blogspot.it/2009/10/xp-style-common-dialogs.html
|
|
||||||
1 24 DISCARDABLE "valentina.exe.manifest"
|
|
||||||
|
|
||||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "valentina.exe.manifest"
|
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "../../version.h"
|
#include "../../version.h"
|
||||||
|
|
||||||
|
@ -38,6 +29,18 @@ BEGIN
|
||||||
|
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Translation", 0x409, 1200, 0x0405, 1200, 0x0407, 1200, 0x040C, 1200, 0x040D, 1200, 0x0413, 1200, 0x0419, 1200
|
/* The following line should only be modified for localized versions. */
|
||||||
|
/* It consists of any number of WORD,WORD pairs, with each pair */
|
||||||
|
/* describing a language,codepage combination supported by the file. */
|
||||||
|
/* */
|
||||||
|
/* For example, a file might have values "0x409,1252" indicating that it */
|
||||||
|
/* supports English language (0x409) in the Windows ANSI codepage (1252). */
|
||||||
|
VALUE "Translation", 0x0409, 1252, //U.S. English
|
||||||
|
VALUE "Translation", 0x0405, 1200, //Czech
|
||||||
|
VALUE "Translation", 0x0407, 1200, //German
|
||||||
|
VALUE "Translation", 0x040C, 1200, //French
|
||||||
|
VALUE "Translation", 0x040D, 1200, //Hebrew
|
||||||
|
VALUE "Translation", 0x0413, 1200, //Dutch
|
||||||
|
VALUE "Translation", 0x0419, 1200 //Russian
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
|
@ -280,7 +280,7 @@ void TableWindow::saveScene()
|
||||||
shadowPaper->setVisible(false);
|
shadowPaper->setVisible(false);
|
||||||
paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen));
|
paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen));
|
||||||
QFileInfo fi( name );
|
QFileInfo fi( name );
|
||||||
QStringList suffix{"svg", "png", "pdf", "eps", "ps"};
|
QStringList suffix = QStringList() << "svg" << "png" << "pdf" << "eps" << "ps";
|
||||||
switch (suffix.indexOf(fi.suffix()))
|
switch (suffix.indexOf(fi.suffix()))
|
||||||
{
|
{
|
||||||
case 0: //svg
|
case 0: //svg
|
||||||
|
@ -607,7 +607,7 @@ void TableWindow::EpsFile(const QString &name) const
|
||||||
if (tmp.open())
|
if (tmp.open())
|
||||||
{
|
{
|
||||||
PdfFile(tmp.fileName());
|
PdfFile(tmp.fileName());
|
||||||
QStringList params{"-eps", tmp.fileName(), name};
|
QStringList params = QStringList() << "-eps" << tmp.fileName() << name;
|
||||||
PdfToPs(params);
|
PdfToPs(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -623,7 +623,7 @@ void TableWindow::PsFile(const QString &name) const
|
||||||
if (tmp.open())
|
if (tmp.open())
|
||||||
{
|
{
|
||||||
PdfFile(tmp.fileName());
|
PdfFile(tmp.fileName());
|
||||||
QStringList params{tmp.fileName(), name};
|
QStringList params = QStringList() << tmp.fileName() << name;
|
||||||
PdfToPs(params);
|
PdfToPs(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
#include "vdrawtool.h"
|
#include "vdrawtool.h"
|
||||||
|
|
||||||
#include <qmuparsererror.h>
|
#include <qmuparsererror.h>
|
||||||
#include "dialogs/tools/dialogeditwrongformula.h"
|
#include "../dialogs/tools/dialogeditwrongformula.h"
|
||||||
#include "dialogs/app/dialogundo.h"
|
#include "../dialogs/app/dialogundo.h"
|
||||||
#include "container/calculator.h"
|
#include "../container/calculator.h"
|
||||||
#include "../../undocommands/addtocalc.h"
|
#include "../../undocommands/addtocalc.h"
|
||||||
#include "../../undocommands/savetooloptions.h"
|
#include "../../undocommands/savetooloptions.h"
|
||||||
#include "../../exception/vexceptionundo.h"
|
#include "../../exception/vexceptionundo.h"
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "../../container/calculator.h"
|
#include "../../container/calculator.h"
|
||||||
#include "../../dialogs/tools/dialogalongline.h"
|
#include "../../dialogs/tools/dialogalongline.h"
|
||||||
#include "../../geometry/vpointf.h"
|
#include "../../geometry/vpointf.h"
|
||||||
#include "exception/vexceptionobjecterror.h"
|
#include "../../exception/vexceptionobjecterror.h"
|
||||||
#include "../../visualization/vistoolalongline.h"
|
#include "../../visualization/vistoolalongline.h"
|
||||||
|
|
||||||
const QString VToolAlongLine::ToolType = QStringLiteral("alongLine");
|
const QString VToolAlongLine::ToolType = QStringLiteral("alongLine");
|
||||||
|
|
|
@ -32,8 +32,7 @@
|
||||||
#include "../../geometry/vpointf.h"
|
#include "../../geometry/vpointf.h"
|
||||||
#include "../../visualization/vistoolcutspline.h"
|
#include "../../visualization/vistoolcutspline.h"
|
||||||
#include "vabstractspline.h"
|
#include "vabstractspline.h"
|
||||||
|
#include "../../geometry/vspline.h"
|
||||||
#include <geometry/vspline.h>
|
|
||||||
|
|
||||||
const QString VToolCutSpline::ToolType = QStringLiteral("cutSpline");
|
const QString VToolCutSpline::ToolType = QStringLiteral("cutSpline");
|
||||||
const QString VToolCutSpline::AttrSpline = QStringLiteral("spline");
|
const QString VToolCutSpline::AttrSpline = QStringLiteral("spline");
|
||||||
|
|
|
@ -393,8 +393,8 @@ void VAbstractTool::LineCoefficients(const QLineF &line, qreal *a, qreal *b, qre
|
||||||
*/
|
*/
|
||||||
const QStringList VAbstractTool::Styles()
|
const QStringList VAbstractTool::Styles()
|
||||||
{
|
{
|
||||||
QStringList styles{TypeLineNone, TypeLineLine, TypeLineDashLine, TypeLineDotLine, TypeLineDashDotLine,
|
QStringList styles = QStringList() << TypeLineNone << TypeLineLine << TypeLineDashLine << TypeLineDotLine <<
|
||||||
TypeLineDashDotDotLine};
|
TypeLineDashDotLine << TypeLineDashDotDotLine;
|
||||||
return styles;
|
return styles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
#include "vformulaproperty.h"
|
#include "vformulaproperty.h"
|
||||||
#include "vformulapropertyeditor.h"
|
#include "vformulapropertyeditor.h"
|
||||||
|
|
||||||
#include "../libs/vpropertyexplorer/vproperty_p.h"
|
#include "../../libs/vpropertyexplorer/vproperty_p.h"
|
||||||
#include "vformulapropertyeditor.h"
|
#include "vformulapropertyeditor.h"
|
||||||
#include "../libs/vpropertyexplorer/vproperties.h"
|
#include "../../libs/vpropertyexplorer/vproperties.h"
|
||||||
#include "../container/vformula.h"
|
#include "../container/vformula.h"
|
||||||
|
|
||||||
enum class ChildType : char {Invalid = 0, Value = 1, Formula = 2};
|
enum class ChildType : char {Invalid = 0, Value = 1, Formula = 2};
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#ifndef VFORMULAPROPERTY_H
|
#ifndef VFORMULAPROPERTY_H
|
||||||
#define VFORMULAPROPERTY_H
|
#define VFORMULAPROPERTY_H
|
||||||
|
|
||||||
#include "../libs/vpropertyexplorer/vproperty.h"
|
#include "../../libs/vpropertyexplorer/vproperty.h"
|
||||||
|
|
||||||
class VFormula;
|
class VFormula;
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QColorDialog>
|
#include <QColorDialog>
|
||||||
|
|
||||||
#include "../libs/vpropertyexplorer/vproperty.h"
|
#include "../../libs/vpropertyexplorer/vproperty.h"
|
||||||
#include "../dialogs/tools/dialogeditwrongformula.h"
|
#include "../dialogs/tools/dialogeditwrongformula.h"
|
||||||
|
|
||||||
using namespace VPE;
|
using namespace VPE;
|
||||||
|
|
|
@ -27,12 +27,12 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "vtooloptionspropertybrowser.h"
|
#include "vtooloptionspropertybrowser.h"
|
||||||
#include "tools/drawTools/drawtools.h"
|
#include "../tools/drawTools/drawtools.h"
|
||||||
#include "core/vapplication.h"
|
#include "../core/vapplication.h"
|
||||||
#include "widgets/vmaingraphicsview.h"
|
#include "vmaingraphicsview.h"
|
||||||
#include "visualization/vgraphicssimpletextitem.h"
|
#include "../visualization/vgraphicssimpletextitem.h"
|
||||||
#include "visualization/vcontrolpointspline.h"
|
#include "../visualization/vcontrolpointspline.h"
|
||||||
#include "../libs/vpropertyexplorer/vproperties.h"
|
#include "../../libs/vpropertyexplorer/vproperties.h"
|
||||||
#include "vformulaproperty.h"
|
#include "vformulaproperty.h"
|
||||||
#include "../container/vformula.h"
|
#include "../container/vformula.h"
|
||||||
|
|
||||||
|
@ -1291,32 +1291,32 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolTriangle()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QStringList VToolOptionsPropertyBrowser::PropertiesList() const
|
QStringList VToolOptionsPropertyBrowser::PropertiesList() const
|
||||||
{
|
{
|
||||||
QStringList attr{VAbstractTool::AttrName, /* 0 */
|
QStringList attr = QStringList() << VAbstractTool::AttrName /* 0 */
|
||||||
QLatin1String("position"), /* 1 */
|
<< QLatin1String("position") /* 1 */
|
||||||
VAbstractTool::AttrBasePoint, /* 2 */
|
<< VAbstractTool::AttrBasePoint /* 2 */
|
||||||
VAbstractTool::AttrTypeLine, /* 3 */
|
<< VAbstractTool::AttrTypeLine /* 3 */
|
||||||
VAbstractTool::AttrLength, /* 4 */
|
<< VAbstractTool::AttrLength /* 4 */
|
||||||
VAbstractTool::AttrAngle, /* 5 */
|
<< VAbstractTool::AttrAngle /* 5 */
|
||||||
VAbstractTool::AttrFirstPoint, /* 6 */
|
<< VAbstractTool::AttrFirstPoint /* 6 */
|
||||||
VAbstractTool::AttrSecondPoint, /* 7 */
|
<< VAbstractTool::AttrSecondPoint /* 7 */
|
||||||
VAbstractTool::AttrRadius, /* 8 */
|
<< VAbstractTool::AttrRadius /* 8 */
|
||||||
VAbstractTool::AttrAngle1, /* 9 */
|
<< VAbstractTool::AttrAngle1 /* 9 */
|
||||||
VAbstractTool::AttrAngle2, /* 10 */
|
<< VAbstractTool::AttrAngle2 /* 10 */
|
||||||
VAbstractTool::AttrCenter, /* 11 */
|
<< VAbstractTool::AttrCenter /* 11 */
|
||||||
VAbstractTool::AttrThirdPoint, /* 12 */
|
<< VAbstractTool::AttrThirdPoint /* 12 */
|
||||||
VToolCutArc::AttrArc, /* 13 */
|
<< VToolCutArc::AttrArc /* 13 */
|
||||||
VToolCutSpline::AttrSpline, /* 14 */
|
<< VToolCutSpline::AttrSpline /* 14 */
|
||||||
VToolCutSplinePath::AttrSplinePath, /* 15 */
|
<< VToolCutSplinePath::AttrSplinePath /* 15 */
|
||||||
VAbstractTool::AttrP1Line, /* 16 */
|
<< VAbstractTool::AttrP1Line /* 16 */
|
||||||
VAbstractTool::AttrP2Line, /* 17 */
|
<< VAbstractTool::AttrP2Line /* 17 */
|
||||||
VAbstractTool::AttrP1Line1, /* 18 */
|
<< VAbstractTool::AttrP1Line1 /* 18 */
|
||||||
VAbstractTool::AttrP2Line1, /* 19 */
|
<< VAbstractTool::AttrP2Line1 /* 19 */
|
||||||
VAbstractTool::AttrP1Line2, /* 20 */
|
<< VAbstractTool::AttrP1Line2 /* 20 */
|
||||||
VAbstractTool::AttrP2Line2, /* 21 */
|
<< VAbstractTool::AttrP2Line2 /* 21 */
|
||||||
VAbstractTool::AttrAngle, /* 22 */
|
<< VAbstractTool::AttrAngle /* 22 */
|
||||||
VAbstractTool::AttrPShoulder, /* 23 */
|
<< VAbstractTool::AttrPShoulder /* 23 */
|
||||||
VAbstractTool::AttrAxisP1, /* 24 */
|
<< VAbstractTool::AttrAxisP1 /* 24 */
|
||||||
VAbstractTool::AttrAxisP2, /* 25 */
|
<< VAbstractTool::AttrAxisP2 /* 25 */
|
||||||
VAbstractTool::AttrKCurve}; /* 26 */
|
<< VAbstractTool::AttrKCurve; /* 26 */
|
||||||
return attr;
|
return attr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,9 +32,9 @@
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
|
||||||
#include "../libs/vpropertyexplorer/vproperty.h"
|
#include "../../libs/vpropertyexplorer/vproperty.h"
|
||||||
#include "../libs/vpropertyexplorer/vpropertymodel.h"
|
#include "../../libs/vpropertyexplorer/vpropertymodel.h"
|
||||||
#include "../libs/vpropertyexplorer/vpropertyformview.h"
|
#include "../../libs/vpropertyexplorer/vpropertyformview.h"
|
||||||
|
|
||||||
class QDockWidget;
|
class QDockWidget;
|
||||||
class QGraphicsItem;
|
class QGraphicsItem;
|
||||||
|
|
|
@ -236,7 +236,7 @@ bool VDomDocument::GetParametrBool(const QDomElement &domElement, const QString
|
||||||
{
|
{
|
||||||
parametr = GetParametrString(domElement, name, defValue);
|
parametr = GetParametrString(domElement, name, defValue);
|
||||||
|
|
||||||
QStringList bools {QLatin1String("true"), QLatin1String("false")};
|
QStringList bools = QStringList() << QLatin1String("true") << QLatin1String("false");
|
||||||
switch (bools.indexOf(parametr))
|
switch (bools.indexOf(parametr))
|
||||||
{
|
{
|
||||||
case 0: // true
|
case 0: // true
|
||||||
|
@ -426,7 +426,7 @@ void VDomDocument::setContent(const QString &fileName)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
Unit VDomDocument::StrToUnits(const QString &unit)
|
Unit VDomDocument::StrToUnits(const QString &unit)
|
||||||
{
|
{
|
||||||
QStringList units{UnitMM, UnitCM, UnitINCH};
|
QStringList units = QStringList() << UnitMM << UnitCM << UnitINCH;
|
||||||
Unit result = Unit::Cm;
|
Unit result = Unit::Cm;
|
||||||
switch (units.indexOf(unit))
|
switch (units.indexOf(unit))
|
||||||
{
|
{
|
||||||
|
|
|
@ -151,7 +151,7 @@ QString VIndividualMeasurements::GenderToStr(const SexType &sex)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
SexType VIndividualMeasurements::StrToGender(const QString &sex)
|
SexType VIndividualMeasurements::StrToGender(const QString &sex)
|
||||||
{
|
{
|
||||||
QStringList genders{SexMale, SexFemale};
|
QStringList genders = QStringList() << SexMale << SexFemale;
|
||||||
switch (genders.indexOf(sex))
|
switch (genders.indexOf(sex))
|
||||||
{
|
{
|
||||||
case 0: // SexMale
|
case 0: // SexMale
|
||||||
|
|
|
@ -299,8 +299,8 @@ void VPattern::Parse(const Document &parse)
|
||||||
{
|
{
|
||||||
SCASSERT(sceneDraw != nullptr);
|
SCASSERT(sceneDraw != nullptr);
|
||||||
SCASSERT(sceneDetail != nullptr);
|
SCASSERT(sceneDetail != nullptr);
|
||||||
QStringList tags{TagDraw, TagIncrements, TagAuthor, TagDescription, TagNotes, TagMeasurements, TagVersion,
|
QStringList tags = QStringList() << TagDraw << TagIncrements << TagAuthor << TagDescription << TagNotes
|
||||||
TagGradation};
|
<< TagMeasurements << TagVersion << TagGradation;
|
||||||
PrepareForParse(parse);
|
PrepareForParse(parse);
|
||||||
QDomNode domNode = documentElement().firstChild();
|
QDomNode domNode = documentElement().firstChild();
|
||||||
while (domNode.isNull() == false)
|
while (domNode.isNull() == false)
|
||||||
|
@ -640,7 +640,7 @@ Unit VPattern::MUnit() const
|
||||||
QDomElement element = list.at(0).toElement();
|
QDomElement element = list.at(0).toElement();
|
||||||
if (element.isElement())
|
if (element.isElement())
|
||||||
{
|
{
|
||||||
QStringList units{"mm", "cm", "inch"};
|
QStringList units = QStringList() <<"mm" << "cm" << "inch";
|
||||||
QString unit = GetParametrString(element, AttrUnit);
|
QString unit = GetParametrString(element, AttrUnit);
|
||||||
switch (units.indexOf(unit))
|
switch (units.indexOf(unit))
|
||||||
{
|
{
|
||||||
|
@ -672,7 +672,7 @@ MeasurementsType VPattern::MType() const
|
||||||
if (element.isElement())
|
if (element.isElement())
|
||||||
{
|
{
|
||||||
QString type = GetParametrString(element, AttrType);
|
QString type = GetParametrString(element, AttrType);
|
||||||
QStringList types{"standard", "individual"};
|
QStringList types = QStringList() << "standard" << "individual";
|
||||||
switch (types.indexOf(type))
|
switch (types.indexOf(type))
|
||||||
{
|
{
|
||||||
case 0:// standard
|
case 0:// standard
|
||||||
|
@ -844,7 +844,7 @@ void VPattern::customEvent(QEvent *event)
|
||||||
*/
|
*/
|
||||||
void VPattern::ParseDrawElement(const QDomNode &node, const Document &parse)
|
void VPattern::ParseDrawElement(const QDomNode &node, const Document &parse)
|
||||||
{
|
{
|
||||||
QStringList tags{TagCalculation, TagModeling, TagDetails};
|
QStringList tags = QStringList() << TagCalculation << TagModeling << TagDetails;
|
||||||
QDomNode domNode = node.firstChild();
|
QDomNode domNode = node.firstChild();
|
||||||
while (domNode.isNull() == false)
|
while (domNode.isNull() == false)
|
||||||
{
|
{
|
||||||
|
@ -895,7 +895,7 @@ void VPattern::ParseDrawMode(const QDomNode &node, const Document &parse, const
|
||||||
{
|
{
|
||||||
scene = sceneDetail;
|
scene = sceneDetail;
|
||||||
}
|
}
|
||||||
QStringList tags{TagPoint, TagLine, TagSpline, TagArc, TagTools};
|
QStringList tags = QStringList() << TagPoint << TagLine << TagSpline << TagArc << TagTools;
|
||||||
const QDomNodeList nodeList = node.childNodes();
|
const QDomNodeList nodeList = node.childNodes();
|
||||||
const qint32 num = nodeList.size();
|
const qint32 num = nodeList.size();
|
||||||
for (qint32 i = 0; i < num; ++i)
|
for (qint32 i = 0; i < num; ++i)
|
||||||
|
@ -948,8 +948,8 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document
|
||||||
detail.setWidth(GetParametrDouble(domElement, VToolDetail::AttrWidth, "10.0"));
|
detail.setWidth(GetParametrDouble(domElement, VToolDetail::AttrWidth, "10.0"));
|
||||||
detail.setClosed(GetParametrUInt(domElement, VToolDetail::AttrClosed, "1"));
|
detail.setClosed(GetParametrUInt(domElement, VToolDetail::AttrClosed, "1"));
|
||||||
|
|
||||||
QStringList types{VToolDetail::NodePoint, VToolDetail::NodeArc, VToolDetail::NodeSpline,
|
QStringList types = QStringList() << VToolDetail::NodePoint << VToolDetail::NodeArc << VToolDetail::NodeSpline
|
||||||
VToolDetail::NodeSplinePath};
|
<< VToolDetail::NodeSplinePath;
|
||||||
const QDomNodeList nodeList = domElement.childNodes();
|
const QDomNodeList nodeList = domElement.childNodes();
|
||||||
const qint32 num = nodeList.size();
|
const qint32 num = nodeList.size();
|
||||||
for (qint32 i = 0; i < num; ++i)
|
for (qint32 i = 0; i < num; ++i)
|
||||||
|
@ -1071,11 +1071,13 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, QDomElement &domElem
|
||||||
qreal my = 0;
|
qreal my = 0;
|
||||||
QString typeLine;
|
QString typeLine;
|
||||||
|
|
||||||
QStringList points{VToolSinglePoint::ToolType, VToolEndLine::ToolType, VToolAlongLine::ToolType,
|
QStringList points = QStringList() << VToolSinglePoint::ToolType << VToolEndLine::ToolType
|
||||||
VToolShoulderPoint::ToolType, VToolNormal::ToolType, VToolBisector::ToolType,
|
<< VToolAlongLine::ToolType << VToolShoulderPoint::ToolType
|
||||||
VToolLineIntersect::ToolType, VToolPointOfContact::ToolType, VNodePoint::ToolType,
|
<< VToolNormal::ToolType << VToolBisector::ToolType
|
||||||
VToolHeight::ToolType, VToolTriangle::ToolType, VToolPointOfIntersection::ToolType,
|
<< VToolLineIntersect::ToolType << VToolPointOfContact::ToolType
|
||||||
VToolCutSpline::ToolType, VToolCutSplinePath::ToolType, VToolCutArc::ToolType};
|
<< VNodePoint::ToolType << VToolHeight::ToolType << VToolTriangle::ToolType
|
||||||
|
<< VToolPointOfIntersection::ToolType << VToolCutSpline::ToolType
|
||||||
|
<< VToolCutSplinePath::ToolType << VToolCutArc::ToolType;
|
||||||
switch (points.indexOf(type))
|
switch (points.indexOf(type))
|
||||||
{
|
{
|
||||||
case 0: //VToolSinglePoint::ToolType
|
case 0: //VToolSinglePoint::ToolType
|
||||||
|
@ -1549,7 +1551,7 @@ void VPattern::CheckTagExists(const QString &tag)
|
||||||
QDomNodeList list = elementsByTagName(tag);
|
QDomNodeList list = elementsByTagName(tag);
|
||||||
if (list.size() == 0)
|
if (list.size() == 0)
|
||||||
{
|
{
|
||||||
QStringList tags{TagVersion, TagAuthor, TagDescription, TagNotes, TagGradation};
|
QStringList tags = QStringList() << TagVersion << TagAuthor << TagDescription << TagNotes << TagGradation;
|
||||||
QDomElement pattern = documentElement();
|
QDomElement pattern = documentElement();
|
||||||
switch (tags.indexOf(tag))
|
switch (tags.indexOf(tag))
|
||||||
{
|
{
|
||||||
|
@ -1710,8 +1712,8 @@ void VPattern::ParseSplineElement(VMainGraphicsScene *scene, const QDomElement &
|
||||||
quint32 idObject = 0;
|
quint32 idObject = 0;
|
||||||
quint32 idTool = 0;
|
quint32 idTool = 0;
|
||||||
|
|
||||||
QStringList splines{VToolSpline::ToolType, VToolSplinePath::ToolType, VNodeSpline::ToolType,
|
QStringList splines = QStringList() << VToolSpline::ToolType << VToolSplinePath::ToolType << VNodeSpline::ToolType
|
||||||
VNodeSplinePath::ToolType};
|
<< VNodeSplinePath::ToolType;
|
||||||
switch (splines.indexOf(type))
|
switch (splines.indexOf(type))
|
||||||
{
|
{
|
||||||
case 0: //VToolSpline::ToolType
|
case 0: //VToolSpline::ToolType
|
||||||
|
@ -1836,7 +1838,7 @@ void VPattern::ParseArcElement(VMainGraphicsScene *scene, QDomElement &domElemen
|
||||||
Q_ASSERT_X(type.isEmpty() == false, Q_FUNC_INFO, "type of spline is empty");
|
Q_ASSERT_X(type.isEmpty() == false, Q_FUNC_INFO, "type of spline is empty");
|
||||||
|
|
||||||
quint32 id = 0;
|
quint32 id = 0;
|
||||||
QStringList arcs{VToolArc::ToolType, VNodeArc::ToolType};
|
QStringList arcs = QStringList() << VToolArc::ToolType << VNodeArc::ToolType;
|
||||||
|
|
||||||
switch (arcs.indexOf(type))
|
switch (arcs.indexOf(type))
|
||||||
{
|
{
|
||||||
|
@ -2037,7 +2039,7 @@ QMap<GHeights, bool> VPattern::GetGradationHeights() const
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList gTags{TagHeights, TagSizes};
|
QStringList gTags = QStringList() << TagHeights << TagSizes;
|
||||||
QDomNode domNode = tags.at(0).firstChild();
|
QDomNode domNode = tags.at(0).firstChild();
|
||||||
while (domNode.isNull() == false)
|
while (domNode.isNull() == false)
|
||||||
{
|
{
|
||||||
|
@ -2102,7 +2104,7 @@ void VPattern::SetGradationHeights(const QMap<GHeights, bool> &options)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList gTags{TagHeights, TagSizes};
|
QStringList gTags = QStringList() << TagHeights << TagSizes;
|
||||||
QDomNode domNode = tags.at(0).firstChild();
|
QDomNode domNode = tags.at(0).firstChild();
|
||||||
while (domNode.isNull() == false)
|
while (domNode.isNull() == false)
|
||||||
{
|
{
|
||||||
|
@ -2178,7 +2180,7 @@ QMap<GSizes, bool> VPattern::GetGradationSizes() const
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList gTags{TagHeights, TagSizes};
|
QStringList gTags = QStringList() << TagHeights << TagSizes;
|
||||||
QDomNode domNode = tags.at(0).firstChild();
|
QDomNode domNode = tags.at(0).firstChild();
|
||||||
while (domNode.isNull() == false)
|
while (domNode.isNull() == false)
|
||||||
{
|
{
|
||||||
|
@ -2243,7 +2245,7 @@ void VPattern::SetGradationSizes(const QMap<GSizes, bool> &options)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList gTags{TagHeights, TagSizes};
|
QStringList gTags = QStringList() << TagHeights << TagSizes;
|
||||||
QDomNode domNode = tags.at(0).firstChild();
|
QDomNode domNode = tags.at(0).firstChild();
|
||||||
while (domNode.isNull() == false)
|
while (domNode.isNull() == false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@ VToolRecord::VToolRecord(const quint32 &id, const Tool &typeTool, const QString
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
bool VToolRecord::VToolRecord::operator==(const VToolRecord &record) const
|
bool VToolRecord::operator==(const VToolRecord &record) const
|
||||||
{
|
{
|
||||||
bool isEqual = false;
|
bool isEqual = false;
|
||||||
if (id == record.getId() && typeTool == record.getTypeTool() && nameDraw == record.getNameDraw())
|
if (id == record.getId() && typeTool == record.getTypeTool() && nameDraw == record.getNameDraw())
|
||||||
|
|
|
@ -48,8 +48,9 @@ bool QmuParserBase::g_DbgDumpStack = false;
|
||||||
* When defining custom binary operators with #AddOprt(...) make sure not to choose
|
* When defining custom binary operators with #AddOprt(...) make sure not to choose
|
||||||
* names conflicting with these definitions.
|
* names conflicting with these definitions.
|
||||||
*/
|
*/
|
||||||
const QStringList QmuParserBase::c_DefaultOprt{"<=", ">=", "!=", "==", "<", ">", "+", "-", "*", "/", "^", "&&", "||",
|
const QStringList QmuParserBase::c_DefaultOprt = QStringList()<< "<=" << ">=" << "!=" << "==" << "<" << ">" << "+"
|
||||||
"=", "(", ")", "?", ":"};
|
<< "-" << "*" << "/" << "^" << "&&" << "||" << "="
|
||||||
|
<< "(" << ")" << "?" << ":";
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -37,6 +37,30 @@
|
||||||
|
|
||||||
#define QMUP_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
#define QMUP_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
|
|
||||||
|
//// Is noexcept supported?
|
||||||
|
//#if defined(__clang__) && defined(__has_feature) && __has_feature(cxx_noexcept) || \
|
||||||
|
// defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46 || \
|
||||||
|
// defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 180021114
|
||||||
|
//# define QMUP_NOEXCEPT_EXPR(x) noexcept(x)
|
||||||
|
//#else
|
||||||
|
//# define QMUP_NOEXCEPT_EXPR(x)
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
// Detect whether the compiler supports C++11 noexcept exception specifications.
|
||||||
|
# if defined(__clang__)
|
||||||
|
# if __has_feature(cxx_noexcept)
|
||||||
|
# define QMUP_NOEXCEPT_EXPR(x) noexcept(x) // Clang 3.0 and above have noexcept
|
||||||
|
# endif
|
||||||
|
# elif defined(__GNUC__)
|
||||||
|
# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||||
|
# define QMUP_NOEXCEPT_EXPR(x) noexcept(x) // GCC 4.7 and following have noexcept
|
||||||
|
# endif
|
||||||
|
# elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 180021114
|
||||||
|
# define QMUP_NOEXCEPT_EXPR(x) noexcept(x)
|
||||||
|
# else
|
||||||
|
# define QMUP_NOEXCEPT_EXPR(x)
|
||||||
|
# endif
|
||||||
|
|
||||||
/** @brief If this macro is defined mathematical exceptions (div by zero) will be thrown as exceptions. */
|
/** @brief If this macro is defined mathematical exceptions (div by zero) will be thrown as exceptions. */
|
||||||
//#define QMUP_MATH_EXCEPTIONS
|
//#define QMUP_MATH_EXCEPTIONS
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
|
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
#include <assert.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace qmu
|
namespace qmu
|
||||||
{
|
{
|
||||||
const QmuParserErrorMsg QmuParserErrorMsg::m_Instance;
|
const QmuParserErrorMsg QmuParserErrorMsg::m_Instance;
|
||||||
|
|
|
@ -140,7 +140,7 @@ public:
|
||||||
QmuParserError ( const QString &a_szMsg, int a_iPos, const QString &sTok = QString() );
|
QmuParserError ( const QString &a_szMsg, int a_iPos, const QString &sTok = QString() );
|
||||||
QmuParserError ( const QmuParserError &a_Obj );
|
QmuParserError ( const QmuParserError &a_Obj );
|
||||||
QmuParserError& operator= ( const QmuParserError &a_Obj );
|
QmuParserError& operator= ( const QmuParserError &a_Obj );
|
||||||
virtual ~QmuParserError() noexcept (true){}
|
virtual ~QmuParserError() QMUP_NOEXCEPT_EXPR (true){}
|
||||||
|
|
||||||
void SetFormula ( const QString &a_strFormula );
|
void SetFormula ( const QString &a_strFormula );
|
||||||
const QString& GetExpr() const;
|
const QString& GetExpr() const;
|
||||||
|
@ -148,7 +148,7 @@ public:
|
||||||
int GetPos() const;
|
int GetPos() const;
|
||||||
const QString& GetToken() const;
|
const QString& GetToken() const;
|
||||||
EErrorCodes GetCode() const;
|
EErrorCodes GetCode() const;
|
||||||
virtual void raise() const;
|
Q_NORETURN virtual void raise() const;
|
||||||
virtual QmuParserError *clone() const;
|
virtual QmuParserError *clone() const;
|
||||||
private:
|
private:
|
||||||
QString m_sMsg; ///< The message string
|
QString m_sMsg; ///< The message string
|
||||||
|
|
|
@ -303,7 +303,7 @@ private:
|
||||||
// cppcheck-suppress functionStatic
|
// cppcheck-suppress functionStatic
|
||||||
int TestIfThenElse();
|
int TestIfThenElse();
|
||||||
|
|
||||||
static void Abort();
|
static void Q_NORETURN Abort();
|
||||||
};
|
};
|
||||||
} // namespace Test
|
} // namespace Test
|
||||||
} // namespace qmu
|
} // namespace qmu
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
using namespace VPE;
|
using namespace VPE;
|
||||||
|
|
||||||
#include "vproperty_p.h"
|
#include "../../vproperty_p.h"
|
||||||
#include "../vnumberproperty.h"
|
#include "../vnumberproperty.h"
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,8 @@
|
||||||
#ifndef VVECTOR3DPROPERTY_H
|
#ifndef VVECTOR3DPROPERTY_H
|
||||||
#define VVECTOR3DPROPERTY_H
|
#define VVECTOR3DPROPERTY_H
|
||||||
|
|
||||||
#include "vpropertyexplorer_global.h"
|
#include "../../vpropertyexplorer_global.h"
|
||||||
|
#include "../../vproperty.h"
|
||||||
#include "vproperty.h"
|
|
||||||
|
|
||||||
namespace VPE
|
namespace VPE
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user