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