Fix build issues.
This commit is contained in:
parent
dd1dccea7d
commit
fbbcf5320f
|
@ -654,32 +654,32 @@ auto DialogIncrements::IncrementUsed(const QString &name) const -> bool
|
|||
{
|
||||
const QVector<VFormulaField> expressions = m_doc->ListExpressions();
|
||||
|
||||
return std::ranges::any_of(expressions,
|
||||
[name](const auto &field)
|
||||
return std::any_of(expressions.constBegin(), expressions.constEnd(),
|
||||
[name](const auto &field)
|
||||
{
|
||||
if (field.expression.indexOf(name) == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Eval formula
|
||||
try
|
||||
{
|
||||
QScopedPointer<qmu::QmuTokenParser> cal(
|
||||
new qmu::QmuTokenParser(field.expression, false, false));
|
||||
|
||||
// Tokens (variables, measurements)
|
||||
if (cal->GetTokens().values().contains(name))
|
||||
{
|
||||
if (field.expression.indexOf(name) == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Eval formula
|
||||
try
|
||||
{
|
||||
QScopedPointer<qmu::QmuTokenParser> cal(
|
||||
new qmu::QmuTokenParser(field.expression, false, false));
|
||||
|
||||
// Tokens (variables, measurements)
|
||||
if (cal->GetTokens().values().contains(name))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (const qmu::QmuParserError &)
|
||||
{
|
||||
// Do nothing. Because we not sure if used. A formula is broken.
|
||||
}
|
||||
return false;
|
||||
});
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (const qmu::QmuParserError &)
|
||||
{
|
||||
// Do nothing. Because we not sure if used. A formula is broken.
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -27,18 +27,19 @@
|
|||
*************************************************************************/
|
||||
#include "vlayoutexporter.h"
|
||||
|
||||
#include <QCursor>
|
||||
#include <QFileInfo>
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGuiApplication>
|
||||
#include <QImageWriter>
|
||||
#include <QPainter>
|
||||
#include <QPrinter>
|
||||
#include <QProcess>
|
||||
#include <QSvgGenerator>
|
||||
#include <QTemporaryFile>
|
||||
#include <QtDebug>
|
||||
#include <QCursor>
|
||||
#include <QGraphicsItem>
|
||||
#include <QImageWriter>
|
||||
#include <QtMath>
|
||||
|
||||
#include "../ifc/exception/vexception.h"
|
||||
#include "../vdxf/vdxfpaintdevice.h"
|
||||
|
|
|
@ -28,12 +28,13 @@
|
|||
|
||||
#include <cmath>
|
||||
|
||||
#include <QPainter>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QStyleOptionGraphicsItem>
|
||||
#include <QDebug>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QGraphicsView>
|
||||
#include <QPainter>
|
||||
#include <QStyleOptionGraphicsItem>
|
||||
#include <QtMath>
|
||||
|
||||
#include "../vmisc/def.h"
|
||||
#include "../vmisc/vabstractapplication.h"
|
||||
|
|
Loading…
Reference in New Issue
Block a user