mirror of
https://gitlab.com/smart-pattern/valentina.git
synced 2024-09-18 23:04:03 +02:00
Compare commits
No commits in common. "8c3de72a517e42c34ed954a5dfed5a64d10eb7a5" and "5855af6bc99900a4428429aed55d3f6cef0a8125" have entirely different histories.
8c3de72a51
...
5855af6bc9
|
@ -29,9 +29,6 @@
|
||||||
#include "puzzlepreferencesconfigurationpage.h"
|
#include "puzzlepreferencesconfigurationpage.h"
|
||||||
#include "ui_puzzlepreferencesconfigurationpage.h"
|
#include "ui_puzzlepreferencesconfigurationpage.h"
|
||||||
#include "../../vpapplication.h"
|
#include "../../vpapplication.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
PuzzlePreferencesConfigurationPage::PuzzlePreferencesConfigurationPage(QWidget *parent) :
|
PuzzlePreferencesConfigurationPage::PuzzlePreferencesConfigurationPage(QWidget *parent) :
|
||||||
|
|
|
@ -28,9 +28,6 @@
|
||||||
#include "puzzlepreferenceslayoutpage.h"
|
#include "puzzlepreferenceslayoutpage.h"
|
||||||
#include "ui_puzzlepreferenceslayoutpage.h"
|
#include "ui_puzzlepreferenceslayoutpage.h"
|
||||||
#include "vpapplication.h"
|
#include "vpapplication.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
PuzzlePreferencesLayoutPage::PuzzlePreferencesLayoutPage(QWidget *parent) :
|
PuzzlePreferencesLayoutPage::PuzzlePreferencesLayoutPage(QWidget *parent) :
|
||||||
|
|
|
@ -30,9 +30,6 @@
|
||||||
#include "../vpapplication.h"
|
#include "../vpapplication.h"
|
||||||
#include "../ifc/exception/vexception.h"
|
#include "../ifc/exception/vexception.h"
|
||||||
#include "../vlayout/vlayoutexporter.h"
|
#include "../vlayout/vlayoutexporter.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QShowEvent>
|
#include <QShowEvent>
|
||||||
|
|
|
@ -27,10 +27,6 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
#include "vpundocommand.h"
|
#include "vpundocommand.h"
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
#include "diagnostic.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
|
|
||||||
QT_WARNING_PUSH
|
QT_WARNING_PUSH
|
||||||
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
|
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
|
||||||
QT_WARNING_DISABLE_INTEL(1418)
|
QT_WARNING_DISABLE_INTEL(1418)
|
||||||
|
|
|
@ -64,9 +64,6 @@
|
||||||
#include "../vdxf/libdxfrw/drw_base.h"
|
#include "../vdxf/libdxfrw/drw_base.h"
|
||||||
#include "../vmisc/dialogs/dialogselectlanguage.h"
|
#include "../vmisc/dialogs/dialogselectlanguage.h"
|
||||||
#include "../vmisc/lambdaconstants.h"
|
#include "../vmisc/lambdaconstants.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "vptilefactory.h"
|
#include "vptilefactory.h"
|
||||||
#include "layout/vppiece.h"
|
#include "layout/vppiece.h"
|
||||||
|
|
||||||
|
@ -88,9 +85,7 @@ Q_LOGGING_CATEGORY(pWindow, "p.window") // NOLINT
|
||||||
|
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
|
|
||||||
#if __cplusplus >= 201402L
|
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
@ -388,11 +383,7 @@ VPMainWindow::VPMainWindow(const VPCommandLinePtr &cmd, QWidget *parent) :
|
||||||
|
|
||||||
if (m_cmd->IsGuiEnabled())
|
if (m_cmd->IsGuiEnabled())
|
||||||
{
|
{
|
||||||
#if __cplusplus >= 201402L
|
|
||||||
QTimer::singleShot(1s, this, &VPMainWindow::SetDefaultGUILanguage);
|
QTimer::singleShot(1s, this, &VPMainWindow::SetDefaultGUILanguage);
|
||||||
#else
|
|
||||||
QTimer::singleShot(1000, this, &VPMainWindow::SetDefaultGUILanguage);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2632,11 +2623,7 @@ void VPMainWindow::GeneratePdfTiledFile(const VPSheetPtr &sheet, bool showTilesS
|
||||||
|
|
||||||
if (showTilesScheme)
|
if (showTilesScheme)
|
||||||
{
|
{
|
||||||
if (not DrawTilesScheme(printer.data(), painter, sheet, firstPage))
|
DrawTilesScheme(printer.data(), painter, sheet, firstPage);
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
firstPage = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int row=0; row < m_layout->TileFactory()->RowNb(sheet); row++) // for each row of the tiling grid
|
for(int row=0; row < m_layout->TileFactory()->RowNb(sheet); row++) // for each row of the tiling grid
|
||||||
|
@ -3103,12 +3090,7 @@ auto VPMainWindow::PrintLayoutTiledSheetPage(QPrinter *printer, QPainter &painte
|
||||||
|
|
||||||
if (page.tilesScheme)
|
if (page.tilesScheme)
|
||||||
{
|
{
|
||||||
if (not DrawTilesScheme(printer, &painter, page.sheet, firstPage))
|
return DrawTilesScheme(printer, &painter, page.sheet, firstPage);
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
firstPage = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(not firstPage)
|
if(not firstPage)
|
||||||
|
|
|
@ -31,9 +31,6 @@
|
||||||
#include "../../mapplication.h"
|
#include "../../mapplication.h"
|
||||||
#include "../../vtapesettings.h"
|
#include "../../vtapesettings.h"
|
||||||
#include "../vpatterndb/pmsystems.h"
|
#include "../vpatterndb/pmsystems.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
TapePreferencesConfigurationPage::TapePreferencesConfigurationPage(QWidget *parent)
|
TapePreferencesConfigurationPage::TapePreferencesConfigurationPage(QWidget *parent)
|
||||||
|
|
|
@ -27,9 +27,6 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
#include "dialogdimensionlabels.h"
|
#include "dialogdimensionlabels.h"
|
||||||
#include "ui_dialogdimensionlabels.h"
|
#include "ui_dialogdimensionlabels.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogDimensionLabels::DialogDimensionLabels(const QMap<MeasurementDimension, MeasurementDimension_p> &dimensions,
|
DialogDimensionLabels::DialogDimensionLabels(const QMap<MeasurementDimension, MeasurementDimension_p> &dimensions,
|
||||||
|
|
|
@ -29,9 +29,6 @@
|
||||||
#include "ui_dialogmeasurementscsvcolumns.h"
|
#include "ui_dialogmeasurementscsvcolumns.h"
|
||||||
|
|
||||||
#include "../vmisc/qxtcsvmodel.h"
|
#include "../vmisc/qxtcsvmodel.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vtools/dialogs/dialogtoolbox.h"
|
#include "../vtools/dialogs/dialogtoolbox.h"
|
||||||
|
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
|
@ -33,9 +33,7 @@
|
||||||
|
|
||||||
#include "../vpatterndb/variables/vmeasurement.h"
|
#include "../vpatterndb/variables/vmeasurement.h"
|
||||||
#include "../vwidgets/vdecorationaligningdelegate.h"
|
#include "../vwidgets/vdecorationaligningdelegate.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,9 +49,6 @@
|
||||||
#include "../vmisc/qxtcsvmodel.h"
|
#include "../vmisc/qxtcsvmodel.h"
|
||||||
#include "../vmisc/dialogs/dialogexporttocsv.h"
|
#include "../vmisc/dialogs/dialogexporttocsv.h"
|
||||||
#include "../vmisc/compatibility.h"
|
#include "../vmisc/compatibility.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "vlitepattern.h"
|
#include "vlitepattern.h"
|
||||||
#include "../qmuparser/qmudef.h"
|
#include "../qmuparser/qmudef.h"
|
||||||
#include "../vtools/dialogs/support/dialogeditwrongformula.h"
|
#include "../vtools/dialogs/support/dialogeditwrongformula.h"
|
||||||
|
@ -74,9 +71,7 @@
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
#if __cplusplus >= 201402L
|
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
|
@ -165,7 +160,7 @@ void InitDimensionYWZItems(const QVector<qreal> &bases, const DimesionLabels &la
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto ConverToDouble(QString text, const QString &error) -> qreal
|
auto ConverToDouble(QString text, const QString &error)
|
||||||
{
|
{
|
||||||
text.replace(QStringLiteral(" "), QString());
|
text.replace(QStringLiteral(" "), QString());
|
||||||
text = VTranslateVars::TryFormulaFromUser(text, VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
text = VTranslateVars::TryFormulaFromUser(text, VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
||||||
|
@ -242,11 +237,7 @@ TMainWindow::TMainWindow(QWidget *parent)
|
||||||
|
|
||||||
if (MApplication::VApp()->IsAppInGUIMode())
|
if (MApplication::VApp()->IsAppInGUIMode())
|
||||||
{
|
{
|
||||||
#if __cplusplus >= 201402L
|
|
||||||
QTimer::singleShot(1s, this, &TMainWindow::SetDefaultGUILanguage);
|
QTimer::singleShot(1s, this, &TMainWindow::SetDefaultGUILanguage);
|
||||||
#else
|
|
||||||
QTimer::singleShot(1000, this, &TMainWindow::SetDefaultGUILanguage);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,6 @@
|
||||||
#include "../vpatterndb/pmsystems.h"
|
#include "../vpatterndb/pmsystems.h"
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
#include "../vmisc/literals.h"
|
#include "../vmisc/literals.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QDirIterator>
|
#include <QDirIterator>
|
||||||
|
|
|
@ -32,9 +32,6 @@
|
||||||
#include "../dialogknownmaterials.h"
|
#include "../dialogknownmaterials.h"
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
#include "../vmisc/vabstractvalapplication.h"
|
#include "../vmisc/vabstractvalapplication.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vwidgets/vmaingraphicsview.h"
|
#include "../vwidgets/vmaingraphicsview.h"
|
||||||
#include "../ifc/xml/vabstractpattern.h"
|
#include "../ifc/xml/vabstractpattern.h"
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,6 @@
|
||||||
#include "dialogincrements.h"
|
#include "dialogincrements.h"
|
||||||
#include "ui_dialogincrements.h"
|
#include "ui_dialogincrements.h"
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../qmuparser/qmudef.h"
|
#include "../qmuparser/qmudef.h"
|
||||||
#include "../qmuparser/qmutokenparser.h"
|
#include "../qmuparser/qmutokenparser.h"
|
||||||
#include "../vpatterndb/vtranslatevars.h"
|
#include "../vpatterndb/vtranslatevars.h"
|
||||||
|
|
|
@ -39,9 +39,7 @@
|
||||||
#include <QShowEvent>
|
#include <QShowEvent>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
#if __cplusplus >= 201402L
|
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
#endif
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogLayoutProgress::DialogLayoutProgress(QElapsedTimer timer, qint64 timeout, QWidget *parent)
|
DialogLayoutProgress::DialogLayoutProgress(QElapsedTimer timer, qint64 timeout, QWidget *parent)
|
||||||
|
@ -85,11 +83,7 @@ DialogLayoutProgress::DialogLayoutProgress(QElapsedTimer timer, qint64 timeout,
|
||||||
m_progressTimer->stop();
|
m_progressTimer->stop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
#if __cplusplus >= 201402L
|
|
||||||
m_progressTimer->start(1s);
|
m_progressTimer->start(1s);
|
||||||
#else
|
|
||||||
m_progressTimer->start(1000);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -30,9 +30,6 @@
|
||||||
#include "ui_dialoglayoutsettings.h"
|
#include "ui_dialoglayoutsettings.h"
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
#include "../vmisc/vabstractvalapplication.h"
|
#include "../vmisc/vabstractvalapplication.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vlayout/vlayoutgenerator.h"
|
#include "../vlayout/vlayoutgenerator.h"
|
||||||
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
|
@ -46,9 +46,6 @@
|
||||||
#include "../vpatterndb/vcontainer.h"
|
#include "../vpatterndb/vcontainer.h"
|
||||||
#include "../core/vapplication.h"
|
#include "../core/vapplication.h"
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../qmuparser/qmudef.h"
|
#include "../qmuparser/qmudef.h"
|
||||||
#include "../ifc/xml/vpatternimage.h"
|
#include "../ifc/xml/vpatternimage.h"
|
||||||
#include "../ifc/xml/utils.h"
|
#include "../ifc/xml/utils.h"
|
||||||
|
|
|
@ -30,9 +30,6 @@
|
||||||
#include "ui_dialogsavelayout.h"
|
#include "ui_dialogsavelayout.h"
|
||||||
#include "../core/vapplication.h"
|
#include "../core/vapplication.h"
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../ifc/exception/vexception.h"
|
#include "../ifc/exception/vexception.h"
|
||||||
#include "../vlayout/vlayoutexporter.h"
|
#include "../vlayout/vlayoutexporter.h"
|
||||||
|
|
||||||
|
|
|
@ -43,9 +43,6 @@
|
||||||
#include "../vtools/undocommands/image/resetbackgroundimage.h"
|
#include "../vtools/undocommands/image/resetbackgroundimage.h"
|
||||||
#include "../vmisc/vabstractapplication.h"
|
#include "../vmisc/vabstractapplication.h"
|
||||||
#include "../vmisc/lambdaconstants.h"
|
#include "../vmisc/lambdaconstants.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
|
@ -39,9 +39,7 @@
|
||||||
#include <QUndoStack>
|
#include <QUndoStack>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
#if __cplusplus >= 201402L
|
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
@ -93,11 +91,7 @@ void VWidgetDetails::UpdateList()
|
||||||
// The filling table is a very expensive operation. This optimization will postpone it.
|
// The filling table is a very expensive operation. This optimization will postpone it.
|
||||||
// Each time a new request happen we will wait 800 ms before calling it. If at this time a new request will arrive
|
// Each time a new request happen we will wait 800 ms before calling it. If at this time a new request will arrive
|
||||||
// we will wait 800 ms more. And so on, until nothing happens within 800ms.
|
// we will wait 800 ms more. And so on, until nothing happens within 800ms.
|
||||||
#if __cplusplus >= 201402L
|
|
||||||
m_updateListTimer->start(800ms);
|
m_updateListTimer->start(800ms);
|
||||||
#else
|
|
||||||
m_updateListTimer->start(800);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -214,9 +214,7 @@
|
||||||
#include <QDrag>
|
#include <QDrag>
|
||||||
#endif //defined(Q_OS_MAC)
|
#endif //defined(Q_OS_MAC)
|
||||||
|
|
||||||
#if __cplusplus >= 201402L
|
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
#endif
|
|
||||||
|
|
||||||
QT_WARNING_PUSH
|
QT_WARNING_PUSH
|
||||||
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
|
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
|
||||||
|
@ -471,11 +469,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
|
|
||||||
if (VApplication::IsGUIMode())
|
if (VApplication::IsGUIMode())
|
||||||
{
|
{
|
||||||
#if __cplusplus >= 201402L
|
|
||||||
QTimer::singleShot(1s, this, &MainWindow::SetDefaultGUILanguage);
|
QTimer::singleShot(1s, this, &MainWindow::SetDefaultGUILanguage);
|
||||||
#else
|
|
||||||
QTimer::singleShot(1000, this, &MainWindow::SetDefaultGUILanguage);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2140,11 +2134,7 @@ void MainWindow::MeasurementsChanged(const QString &path)
|
||||||
{
|
{
|
||||||
m_mChanges = true;
|
m_mChanges = true;
|
||||||
m_mChangesAsked = false;
|
m_mChangesAsked = false;
|
||||||
#if __cplusplus >= 201402L
|
|
||||||
m_measurementsSyncTimer->start(1500ms);
|
m_measurementsSyncTimer->start(1500ms);
|
||||||
#else
|
|
||||||
m_measurementsSyncTimer->start(1500);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2154,11 +2144,7 @@ void MainWindow::MeasurementsChanged(const QString &path)
|
||||||
{
|
{
|
||||||
m_mChanges = true;
|
m_mChanges = true;
|
||||||
m_mChangesAsked = false;
|
m_mChangesAsked = false;
|
||||||
#if __cplusplus >= 201402L
|
|
||||||
m_measurementsSyncTimer->start(1500ms);
|
m_measurementsSyncTimer->start(1500ms);
|
||||||
#else
|
|
||||||
m_measurementsSyncTimer->start(1500);
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -247,7 +247,7 @@ QString PrepareGroupTags(QStringList tags)
|
||||||
tag = tag.simplified();
|
tag = tag.simplified();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ConvertToStringList(ConvertToSet<QString>(tags)).join(',');
|
return ConvertToList(ConvertToSet<QString>(tags)).join(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,141 +0,0 @@
|
||||||
// Implementation of C++14's make_unique for C++11 compilers.
|
|
||||||
//
|
|
||||||
// This has been tested with:
|
|
||||||
// - MSVC 11.0 (Visual Studio 2012)
|
|
||||||
// - gcc 4.6.3
|
|
||||||
// - Xcode 4.4 (with clang "4.0")
|
|
||||||
//
|
|
||||||
// It is based off an implementation proposed by Stephan T. Lavavej for
|
|
||||||
// inclusion in the C++14 standard:
|
|
||||||
// http://isocpp.org/files/papers/N3656.txt
|
|
||||||
// Where appropriate, it borrows the use of MSVC's _VARIADIC_EXPAND_0X macro
|
|
||||||
// machinery to compensate for lack of variadic templates.
|
|
||||||
//
|
|
||||||
// This file injects make_unique into the std namespace, which I acknowledge is
|
|
||||||
// technically forbidden ([C++11: 17.6.4.2.2.1/1]), but is necessary in order
|
|
||||||
// to have syntax compatibility with C++14.
|
|
||||||
//
|
|
||||||
// I perform compiler version checking for MSVC, gcc, and clang to ensure that
|
|
||||||
// we don't add make_unique if it is already there (instead, we include
|
|
||||||
// <memory> to get the compiler-provided one). You can override the compiler
|
|
||||||
// version checking by defining the symbol COMPILER_SUPPORTS_MAKE_UNIQUE.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// ===============================================================================
|
|
||||||
// This file is released into the public domain. See LICENCE for more information.
|
|
||||||
// ===============================================================================
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
// If user hasn't specified COMPILER_SUPPORTS_MAKE_UNIQUE then try to figure out
|
|
||||||
// based on compiler version if std::make_unique is provided.
|
|
||||||
#if !defined(COMPILER_SUPPORTS_MAKE_UNIQUE)
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
// std::make_unique was added in MSVC 12.0
|
|
||||||
#if _MSC_VER >= 1800 // MSVC 12.0 (Visual Studio 2013)
|
|
||||||
#define COMPILER_SUPPORTS_MAKE_UNIQUE
|
|
||||||
#endif
|
|
||||||
#elif defined(__clang__)
|
|
||||||
// std::make_unique was added in clang 3.4, but not until Xcode 6.
|
|
||||||
// Annoyingly, Apple makes the clang version defines match the version
|
|
||||||
// of Xcode, not the version of clang.
|
|
||||||
#define CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
|
|
||||||
#if defined(__APPLE__) && CLANG_VERSION >= 60000
|
|
||||||
#define COMPILER_SUPPORTS_MAKE_UNIQUE
|
|
||||||
#elif !defined(__APPLE__) && CLANG_VERSION >= 30400
|
|
||||||
#define COMPILER_SUPPORTS_MAKE_UNIQUE
|
|
||||||
#endif
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
// std::make_unique was added in gcc 4.9, for standards versions greater
|
|
||||||
// than -std=c++11.
|
|
||||||
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
|
||||||
#if GCC_VERSION >= 40900 && __cplusplus > 201103L
|
|
||||||
#define COMPILER_SUPPORTS_MAKE_UNIQUE
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(COMPILER_SUPPORTS_MAKE_UNIQUE)
|
|
||||||
|
|
||||||
// If the compiler supports std::make_unique, then pull in <memory> to get it.
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
// Otherwise, the compiler doesn't provide it, so implement it ourselves.
|
|
||||||
|
|
||||||
#include <cstddef>
|
|
||||||
#include <memory>
|
|
||||||
#include <type_traits>
|
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
namespace std {
|
|
||||||
|
|
||||||
template<class _Ty> struct _Unique_if {
|
|
||||||
typedef unique_ptr<_Ty> _Single_object;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class _Ty> struct _Unique_if<_Ty[]> {
|
|
||||||
typedef unique_ptr<_Ty[]> _Unknown_bound;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class _Ty, size_t N> struct _Unique_if<_Ty[N]> {
|
|
||||||
typedef void _Known_bound;
|
|
||||||
};
|
|
||||||
|
|
||||||
//
|
|
||||||
// template< class T, class... Args >
|
|
||||||
// unique_ptr<T> make_unique( Args&&... args);
|
|
||||||
//
|
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER < 1800)
|
|
||||||
|
|
||||||
// Macro machinery because MSVC 11.0 doesn't support variadic templates.
|
|
||||||
// The _VARIADIC_EXPAND_0X stuff is defined in <xstddef>
|
|
||||||
#define _MAKE_UNIQUE( \
|
|
||||||
TEMPLATE_LIST, PADDING_LIST, LIST, COMMA, X1, X2, X3, X4) \
|
|
||||||
template<class _Ty COMMA LIST(_CLASS_TYPE)> inline \
|
|
||||||
typename _Unique_if<_Ty>::_Single_object make_unique(LIST(_TYPE_REFREF_ARG)) \
|
|
||||||
{ \
|
|
||||||
return unique_ptr<_Ty>(new _Ty(LIST(_FORWARD_ARG))); \
|
|
||||||
} \
|
|
||||||
|
|
||||||
_VARIADIC_EXPAND_0X(_MAKE_UNIQUE, , , , )
|
|
||||||
#undef _MAKE_UNIQUE
|
|
||||||
|
|
||||||
#else // not MSVC 11.0 or earlier
|
|
||||||
|
|
||||||
template<class _Ty, class... Args>
|
|
||||||
typename _Unique_if<_Ty>::_Single_object
|
|
||||||
make_unique(Args&&... args) {
|
|
||||||
return unique_ptr<_Ty>(new _Ty(std::forward<Args>(args)...));
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// template< class T >
|
|
||||||
// unique_ptr<T> make_unique( std::size_t size );
|
|
||||||
|
|
||||||
template<class _Ty>
|
|
||||||
typename _Unique_if<_Ty>::_Unknown_bound
|
|
||||||
make_unique(size_t n) {
|
|
||||||
typedef typename remove_extent<_Ty>::type U;
|
|
||||||
return unique_ptr<_Ty>(new U[n]());
|
|
||||||
}
|
|
||||||
|
|
||||||
// template< class T, class... Args >
|
|
||||||
// /* unspecified */ make_unique( Args&&... args ) = delete;
|
|
||||||
|
|
||||||
// MSVC 11.0 doesn't support deleted functions, so the best we can do
|
|
||||||
// is simply not define the function.
|
|
||||||
#if !(defined(_MSC_VER) && (_MSC_VER < 1800))
|
|
||||||
|
|
||||||
template<class T, class... Args>
|
|
||||||
typename _Unique_if<T>::_Known_bound
|
|
||||||
make_unique(Args&&...) = delete;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace std
|
|
||||||
|
|
||||||
#endif // !COMPILER_SUPPORTS_MAKE_UNIQUE
|
|
|
@ -33,5 +33,4 @@ HEADERS += \
|
||||||
$$PWD/qmudef.h \
|
$$PWD/qmudef.h \
|
||||||
$$PWD/qmuformulabase.h \
|
$$PWD/qmuformulabase.h \
|
||||||
$$PWD/qmutokenparser.h \
|
$$PWD/qmutokenparser.h \
|
||||||
$$PWD/qmuparsercallback_p.h \
|
$$PWD/qmuparsercallback_p.h
|
||||||
$$PWD/make_unique.h
|
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
|
|
||||||
#include "qmuparsererror.h"
|
#include "qmuparsererror.h"
|
||||||
#include "qmuparsercallback.h"
|
#include "qmuparsercallback.h"
|
||||||
#include "make_unique.h"
|
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
@brief This file contains the parser token definition.
|
@brief This file contains the parser token definition.
|
||||||
|
|
|
@ -19,10 +19,6 @@
|
||||||
#include "drw_objects.h"
|
#include "drw_objects.h"
|
||||||
#include "drw_header.h"
|
#include "drw_header.h"
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
#include "../vmisc/diagnostic.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
|
|
||||||
QT_WARNING_PUSH
|
QT_WARNING_PUSH
|
||||||
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
|
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
|
||||||
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
|
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
|
||||||
|
|
|
@ -157,11 +157,7 @@ QVector<QGraphicsItem *> VPoster::Tile(QGraphicsItem *parent, const PosterData &
|
||||||
const VWatermarkData &watermarkData, const QString &watermarkPath) const
|
const VWatermarkData &watermarkData, const QString &watermarkPath) const
|
||||||
{
|
{
|
||||||
QVector<QGraphicsItem *> data;
|
QVector<QGraphicsItem *> data;
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
data.append(Borders(parent, img, sheets));
|
data.append(Borders(parent, img, sheets));
|
||||||
#else
|
|
||||||
data += Borders(parent, img, sheets);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (watermarkData.opacity > 0)
|
if (watermarkData.opacity > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,10 +34,6 @@
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QFontMetrics>
|
#include <QFontMetrics>
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
#include "diagnostic.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
|
|
||||||
class QPointF;
|
class QPointF;
|
||||||
|
|
||||||
// Contains helpful methods to hide version dependent code. It can be deprecation of method or change in API
|
// Contains helpful methods to hide version dependent code. It can be deprecation of method or change in API
|
||||||
|
@ -108,13 +104,6 @@ inline auto ConvertToList(const C<T> &container) -> QList<T>
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
template <typename T, template <typename> class C>
|
|
||||||
inline auto ConvertToStringList(const C<T> &container) -> QStringList
|
|
||||||
{
|
|
||||||
return {ConvertToList(container)};
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
template <typename T, template <typename> class C>
|
template <typename T, template <typename> class C>
|
||||||
inline auto ConvertToSet(const C<T> &container) -> QSet<T>
|
inline auto ConvertToSet(const C<T> &container) -> QSet<T>
|
||||||
|
|
|
@ -45,9 +45,6 @@
|
||||||
|
|
||||||
#include "debugbreak.h"
|
#include "debugbreak.h"
|
||||||
#include "defglobal.h"
|
#include "defglobal.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
#include "diagnostic.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
|
|
||||||
template <class T> class QSharedPointer;
|
template <class T> class QSharedPointer;
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,6 @@
|
||||||
#include <QSharedData>
|
#include <QSharedData>
|
||||||
|
|
||||||
#include "../vmisc/defglobal.h"
|
#include "../vmisc/defglobal.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
#include "../vmisc/diagnostic.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
|
|
||||||
QT_WARNING_PUSH
|
QT_WARNING_PUSH
|
||||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||||
|
|
|
@ -34,9 +34,6 @@
|
||||||
|
|
||||||
#include "../vmisc/defglobal.h"
|
#include "../vmisc/defglobal.h"
|
||||||
#include "../vmisc/typedef.h"
|
#include "../vmisc/typedef.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
#include "../vmisc/diagnostic.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
#include "floatitemdef.h"
|
#include "floatitemdef.h"
|
||||||
|
|
||||||
QT_WARNING_PUSH
|
QT_WARNING_PUSH
|
||||||
|
|
|
@ -31,13 +31,9 @@
|
||||||
|
|
||||||
#include <QPointF>
|
#include <QPointF>
|
||||||
#include <QSharedData>
|
#include <QSharedData>
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
#include "../vmisc/typedef.h"
|
#include "../vmisc/typedef.h"
|
||||||
#include "../vmisc/defglobal.h"
|
#include "../vmisc/defglobal.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
#include "../vmisc/diagnostic.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
|
|
||||||
QT_WARNING_PUSH
|
QT_WARNING_PUSH
|
||||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||||
|
|
|
@ -1102,11 +1102,7 @@ VPassmark VPiece::CreatePassmark(const QVector<VPieceNode> &path, int previousIn
|
||||||
const QString infoMsg = tr("Notch for point '%1' in piece '%2' will be disabled. Manual length is less than "
|
const QString infoMsg = tr("Notch for point '%1' in piece '%2' will be disabled. Manual length is less than "
|
||||||
"allowed value.")
|
"allowed value.")
|
||||||
.arg(VPiecePath::NodeName(path, passmarkIndex, data), GetName());
|
.arg(VPiecePath::NodeName(path, passmarkIndex, data), GetName());
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
qInfo() << VAbstractValApplication::warningMessageSignature + infoMsg;
|
qInfo() << VAbstractValApplication::warningMessageSignature + infoMsg;
|
||||||
#else
|
|
||||||
qWarning() << VAbstractValApplication::warningMessageSignature + infoMsg;
|
|
||||||
#endif
|
|
||||||
return VPassmark();
|
return VPassmark();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,10 +34,6 @@
|
||||||
|
|
||||||
#include "../vpropertyexplorer_global.h"
|
#include "../vpropertyexplorer_global.h"
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
#include "../vmisc/diagnostic.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
|
|
||||||
namespace VPE
|
namespace VPE
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,6 @@
|
||||||
#include "dialogeditlabel.h"
|
#include "dialogeditlabel.h"
|
||||||
#include "ui_dialogeditlabel.h"
|
#include "ui_dialogeditlabel.h"
|
||||||
#include "../vmisc/vabstractapplication.h"
|
#include "../vmisc/vabstractapplication.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vformat/vlabeltemplate.h"
|
#include "../vformat/vlabeltemplate.h"
|
||||||
#include "../ifc/xml/vlabeltemplateconverter.h"
|
#include "../ifc/xml/vlabeltemplateconverter.h"
|
||||||
#include "../ifc/xml/vabstractpattern.h"
|
#include "../ifc/xml/vabstractpattern.h"
|
||||||
|
|
|
@ -50,9 +50,6 @@
|
||||||
#include "../ifc/ifcdef.h"
|
#include "../ifc/ifcdef.h"
|
||||||
#include "../vmisc/vabstractapplication.h"
|
#include "../vmisc/vabstractapplication.h"
|
||||||
#include "../vmisc/vmath.h"
|
#include "../vmisc/vmath.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vpatterndb/vcontainer.h"
|
#include "../vpatterndb/vcontainer.h"
|
||||||
#include "../vwidgets/vabstractmainwindow.h"
|
#include "../vwidgets/vabstractmainwindow.h"
|
||||||
#include "dialogtool.h"
|
#include "dialogtool.h"
|
||||||
|
|
|
@ -54,9 +54,6 @@
|
||||||
#include "../vmisc/vabstractapplication.h"
|
#include "../vmisc/vabstractapplication.h"
|
||||||
#include "../vmisc/vcommonsettings.h"
|
#include "../vmisc/vcommonsettings.h"
|
||||||
#include "../vmisc/compatibility.h"
|
#include "../vmisc/compatibility.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vpatterndb/vcontainer.h"
|
#include "../vpatterndb/vcontainer.h"
|
||||||
#include "../vwidgets/vabstractmainwindow.h"
|
#include "../vwidgets/vabstractmainwindow.h"
|
||||||
#include "../vwidgets/vmaingraphicsscene.h"
|
#include "../vwidgets/vmaingraphicsscene.h"
|
||||||
|
|
|
@ -54,9 +54,6 @@
|
||||||
#include "../vmisc/vabstractapplication.h"
|
#include "../vmisc/vabstractapplication.h"
|
||||||
#include "../vmisc/vcommonsettings.h"
|
#include "../vmisc/vcommonsettings.h"
|
||||||
#include "../vmisc/compatibility.h"
|
#include "../vmisc/compatibility.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vpatterndb/vcontainer.h"
|
#include "../vpatterndb/vcontainer.h"
|
||||||
#include "../vwidgets/vabstractmainwindow.h"
|
#include "../vwidgets/vabstractmainwindow.h"
|
||||||
#include "../vwidgets/vmaingraphicsscene.h"
|
#include "../vwidgets/vmaingraphicsscene.h"
|
||||||
|
|
|
@ -45,10 +45,8 @@
|
||||||
#include "../../visualization/line/vistoollineintersect.h"
|
#include "../../visualization/line/vistoollineintersect.h"
|
||||||
#include "../ifc/xml/vabstractpattern.h"
|
#include "../ifc/xml/vabstractpattern.h"
|
||||||
#include "../vgeometry/vpointf.h"
|
#include "../vgeometry/vpointf.h"
|
||||||
|
#include "../vmisc/vabstractapplication.h"
|
||||||
#include "../vmisc/compatibility.h"
|
#include "../vmisc/compatibility.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vpatterndb/vcontainer.h"
|
#include "../vpatterndb/vcontainer.h"
|
||||||
#include "dialogtool.h"
|
#include "dialogtool.h"
|
||||||
#include "ui_dialoglineintersect.h"
|
#include "ui_dialoglineintersect.h"
|
||||||
|
|
|
@ -58,9 +58,6 @@
|
||||||
#include "../vmisc/vabstractapplication.h"
|
#include "../vmisc/vabstractapplication.h"
|
||||||
#include "../vmisc/vcommonsettings.h"
|
#include "../vmisc/vcommonsettings.h"
|
||||||
#include "../vmisc/compatibility.h"
|
#include "../vmisc/compatibility.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vpatterndb/vcontainer.h"
|
#include "../vpatterndb/vcontainer.h"
|
||||||
#include "../vpatterndb/vtranslatevars.h"
|
#include "../vpatterndb/vtranslatevars.h"
|
||||||
#include "../vwidgets/vabstractmainwindow.h"
|
#include "../vwidgets/vabstractmainwindow.h"
|
||||||
|
|
|
@ -58,9 +58,6 @@
|
||||||
#include "../vmisc/vabstractapplication.h"
|
#include "../vmisc/vabstractapplication.h"
|
||||||
#include "../vmisc/vcommonsettings.h"
|
#include "../vmisc/vcommonsettings.h"
|
||||||
#include "../vmisc/compatibility.h"
|
#include "../vmisc/compatibility.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vpatterndb/vcontainer.h"
|
#include "../vpatterndb/vcontainer.h"
|
||||||
#include "../vpatterndb/vtranslatevars.h"
|
#include "../vpatterndb/vtranslatevars.h"
|
||||||
#include "../vwidgets/vabstractmainwindow.h"
|
#include "../vwidgets/vabstractmainwindow.h"
|
||||||
|
|
|
@ -58,9 +58,6 @@
|
||||||
#include "../vgeometry/vsplinepoint.h"
|
#include "../vgeometry/vsplinepoint.h"
|
||||||
#include "../vmisc/vabstractapplication.h"
|
#include "../vmisc/vabstractapplication.h"
|
||||||
#include "../vmisc/vcommonsettings.h"
|
#include "../vmisc/vcommonsettings.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vpatterndb/vcontainer.h"
|
#include "../vpatterndb/vcontainer.h"
|
||||||
#include "../vwidgets/vabstractmainwindow.h"
|
#include "../vwidgets/vabstractmainwindow.h"
|
||||||
#include "../vwidgets/vmaingraphicsscene.h"
|
#include "../vwidgets/vmaingraphicsscene.h"
|
||||||
|
|
|
@ -29,9 +29,6 @@
|
||||||
#include "dialoginsertnode.h"
|
#include "dialoginsertnode.h"
|
||||||
#include "ui_dialoginsertnode.h"
|
#include "ui_dialoginsertnode.h"
|
||||||
#include "../vpatterndb/vcontainer.h"
|
#include "../vpatterndb/vcontainer.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,6 @@
|
||||||
#include "../../../tools/vtoolseamallowance.h"
|
#include "../../../tools/vtoolseamallowance.h"
|
||||||
#include "../../support/dialogeditwrongformula.h"
|
#include "../../support/dialogeditwrongformula.h"
|
||||||
#include "../vmisc/vmodifierkey.h"
|
#include "../vmisc/vmodifierkey.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
|
@ -30,9 +30,6 @@
|
||||||
#include "ui_dialogpin.h"
|
#include "ui_dialogpin.h"
|
||||||
#include "visualization/line/vistoolspecialpoint.h"
|
#include "visualization/line/vistoolspecialpoint.h"
|
||||||
#include "../../../tools/vabstracttool.h"
|
#include "../../../tools/vabstracttool.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogPin::DialogPin(const VContainer *data, quint32 toolId, QWidget *parent)
|
DialogPin::DialogPin(const VContainer *data, quint32 toolId, QWidget *parent)
|
||||||
|
|
|
@ -33,9 +33,6 @@
|
||||||
#include "../../../tools/vtoolseamallowance.h"
|
#include "../../../tools/vtoolseamallowance.h"
|
||||||
#include "../../support/dialogeditwrongformula.h"
|
#include "../../support/dialogeditwrongformula.h"
|
||||||
#include "../vgeometry/vplacelabelitem.h"
|
#include "../vgeometry/vplacelabelitem.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,6 @@
|
||||||
#include "dialogpatternmaterials.h"
|
#include "dialogpatternmaterials.h"
|
||||||
#include "../vmisc/vabstractvalapplication.h"
|
#include "../vmisc/vabstractvalapplication.h"
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
|
@ -56,9 +56,6 @@
|
||||||
#include "../qmuparser/qmutokenparser.h"
|
#include "../qmuparser/qmutokenparser.h"
|
||||||
#include "../vlayout/vlayoutdef.h"
|
#include "../vlayout/vlayoutdef.h"
|
||||||
#include "toolsdef.h"
|
#include "toolsdef.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
#include "../vmisc/backport/qoverload.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
|
|
||||||
#include <QFuture>
|
#include <QFuture>
|
||||||
#include <QtConcurrent/QtConcurrentRun>
|
#include <QtConcurrent/QtConcurrentRun>
|
||||||
|
|
|
@ -36,9 +36,6 @@
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include "../vmisc/defglobal.h"
|
#include "../vmisc/defglobal.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
#include "../vmisc/diagnostic.h"
|
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
|
|
||||||
struct VFinalMeasurement;
|
struct VFinalMeasurement;
|
||||||
|
|
||||||
|
|
|
@ -102,13 +102,13 @@ void TST_BuitInRegExp::TestCheckIsNamesUnique_data()
|
||||||
}
|
}
|
||||||
|
|
||||||
QTest::addColumn<QString>("translatedName");
|
QTest::addColumn<QString>("translatedName");
|
||||||
QTest::addColumn<QStringList>("originalNames");
|
QTest::addColumn<QList<QString>>("originalNames");
|
||||||
|
|
||||||
QList<QString> keys = names.uniqueKeys();
|
QList<QString> keys = names.uniqueKeys();
|
||||||
for (const auto &key : keys)
|
for (const auto &key : keys)
|
||||||
{
|
{
|
||||||
const QString tag = QString("Locale: '%1'. Name '%2'").arg(m_locale, key);
|
const QString tag = QString("Locale: '%1'. Name '%2'").arg(m_locale, key);
|
||||||
QTest::newRow(qUtf8Printable(tag)) << key << QStringList(names.values(key));
|
QTest::newRow(qUtf8Printable(tag)) << key << names.values(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ void TST_BuitInRegExp::TestCheckIsNamesUnique_data()
|
||||||
void TST_BuitInRegExp::TestCheckIsNamesUnique()
|
void TST_BuitInRegExp::TestCheckIsNamesUnique()
|
||||||
{
|
{
|
||||||
QFETCH(QString, translatedName);
|
QFETCH(QString, translatedName);
|
||||||
QFETCH(QStringList, originalNames);
|
QFETCH(QList<QString>, originalNames);
|
||||||
|
|
||||||
if (originalNames.size() > 1)
|
if (originalNames.size() > 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -131,13 +131,13 @@ void TST_MeasurementRegExp::TestCheckIsNamesUnique_data()
|
||||||
}
|
}
|
||||||
|
|
||||||
QTest::addColumn<QString>("translatedName");
|
QTest::addColumn<QString>("translatedName");
|
||||||
QTest::addColumn<QStringList>("originalNames");
|
QTest::addColumn<QList<QString>>("originalNames");
|
||||||
|
|
||||||
QList<QString> keys = names.uniqueKeys();
|
QList<QString> keys = names.uniqueKeys();
|
||||||
for (const auto &key : keys)
|
for (const auto &key : keys)
|
||||||
{
|
{
|
||||||
const QString tag = QString("System: '%1', locale: '%2'. Name '%3'").arg(m_system, m_locale, key);
|
const QString tag = QString("System: '%1', locale: '%2'. Name '%3'").arg(m_system, m_locale, key);
|
||||||
QTest::newRow(qUtf8Printable(tag)) << key << QStringList(names.values(key));
|
QTest::newRow(qUtf8Printable(tag)) << key << names.values(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ void TST_MeasurementRegExp::TestCheckIsNamesUnique_data()
|
||||||
void TST_MeasurementRegExp::TestCheckIsNamesUnique()
|
void TST_MeasurementRegExp::TestCheckIsNamesUnique()
|
||||||
{
|
{
|
||||||
QFETCH(QString, translatedName);
|
QFETCH(QString, translatedName);
|
||||||
QFETCH(QStringList, originalNames);
|
QFETCH(QList<QString>, originalNames);
|
||||||
|
|
||||||
if (QLocale() == QLocale(QStringLiteral("zh_CN")) || QLocale() == QLocale(QStringLiteral("he_IL")))
|
if (QLocale() == QLocale(QStringLiteral("zh_CN")) || QLocale() == QLocale(QStringLiteral("he_IL")))
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,10 +30,6 @@
|
||||||
|
|
||||||
#include <QtTest>
|
#include <QtTest>
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
|
||||||
Q_DECLARE_METATYPE(Qt::LayoutDirection)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
TST_TSLocaleTranslation::TST_TSLocaleTranslation(const QString &locale, QObject *parent)
|
TST_TSLocaleTranslation::TST_TSLocaleTranslation(const QString &locale, QObject *parent)
|
||||||
: TST_AbstractTranslation(parent),
|
: TST_AbstractTranslation(parent),
|
||||||
|
|
Loading…
Reference in a new issue