New marcos Q_DISABLE_ASSIGN.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-07-01 11:33:29 +03:00
parent 0330869796
commit 0658d92688
38 changed files with 52 additions and 39 deletions

View File

@ -28,6 +28,7 @@
#include <QSharedData>
#include "qmuparserdef.h"
#include "../vmisc/diagnostic.h"
#include "../vmisc/defglobal.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
@ -88,7 +89,7 @@ public:
bool m_bAllowOpti; ///< Flag indication optimizeability
private:
QmuParserCallbackData &operator=(const QmuParserCallbackData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(QmuParserCallbackData)
};
}

View File

@ -70,7 +70,7 @@ public:
QString formulaLength;
private:
VAbstractArcData &operator=(const VAbstractArcData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VAbstractArcData)
};
//---------------------------------------------------------------------------------------------------------------------

View File

@ -68,7 +68,7 @@ public:
qreal approximationScale;
private:
VAbstractCurveData &operator=(const VAbstractCurveData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VAbstractCurveData)
};
VAbstractCurveData::~VAbstractCurveData()

View File

@ -54,7 +54,7 @@ public:
QString formulaRadius;
private:
VArcData &operator=(const VArcData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VArcData)
};
//---------------------------------------------------------------------------------------------------------------------

View File

@ -62,7 +62,7 @@ public:
VPointF p4;
private:
VCubicBezierData &operator=(const VCubicBezierData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VCubicBezierData)
};
//---------------------------------------------------------------------------------------------------------------------

View File

@ -57,7 +57,7 @@ public:
QVector<VPointF> path;
private:
VCubicBezierPathData &operator=(const VCubicBezierPathData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VCubicBezierPathData)
};
VCubicBezierPathData::~VCubicBezierPathData()

View File

@ -36,7 +36,7 @@ public:
QTransform m_transform;
private:
VEllipticalArcData &operator=(const VEllipticalArcData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VEllipticalArcData)
};
//---------------------------------------------------------------------------------------------------------------------

View File

@ -71,7 +71,7 @@ public:
Draw mode;
private:
VGObjectData &operator=(const VGObjectData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VGObjectData)
};
VGObjectData::~VGObjectData()

View File

@ -74,7 +74,7 @@ public:
qreal isVisible{1};
private:
VPlaceLabelItemData &operator=(const VPlaceLabelItemData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VPlaceLabelItemData)
};
VPlaceLabelItemData::~VPlaceLabelItemData()

View File

@ -80,7 +80,7 @@ public:
bool m_showLabel;
private:
VPointFData &operator=(const VPointFData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VPointFData)
};
VPointFData::~VPointFData()

View File

@ -87,7 +87,7 @@ public:
qreal kCurve;
private:
VSplineData &operator=(const VSplineData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VSplineData)
};
//---------------------------------------------------------------------------------------------------------------------

View File

@ -57,7 +57,7 @@ public:
QVector<VSplinePoint> path;
private:
VSplinePathData &operator=(const VSplinePathData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VSplinePathData)
};
VSplinePathData::~VSplinePathData()

View File

@ -93,7 +93,7 @@ public:
qreal kAsm2;
private:
VFSplinePointData &operator=(const VFSplinePointData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VFSplinePointData)
};
VFSplinePointData::~VFSplinePointData()
@ -164,7 +164,7 @@ public:
QString length2F;
private:
VSplinePointData &operator=(const VSplinePointData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VSplinePointData)
};
//---------------------------------------------------------------------------------------------------------------------

View File

@ -34,6 +34,7 @@
#include <QCoreApplication>
#include "../vmisc/diagnostic.h"
#include "../vmisc/defglobal.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
@ -82,7 +83,7 @@ public:
qreal m_my;
private:
VAbstractPieceData &operator=(const VAbstractPieceData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VAbstractPieceData)
};
QT_WARNING_POP

View File

@ -33,6 +33,7 @@
#include "vlayoutdef.h"
#include "../vmisc/diagnostic.h"
#include "../vmisc/defglobal.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
@ -71,7 +72,7 @@ public:
QString exceptionReason{};
private:
VBestSquareData &operator=(const VBestSquareData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VBestSquareData)
};
#endif // VBESTSQUARE_P_H

View File

@ -36,6 +36,7 @@
#include <QPainterPath>
#include "../vmisc/diagnostic.h"
#include "../vmisc/defglobal.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
@ -81,7 +82,7 @@ public:
int m_emptySheetEdgesCount{0};
private:
VContourData &operator=(const VContourData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VContourData)
};
QT_WARNING_POP

View File

@ -88,7 +88,7 @@ public:
bool originPaperOrientation{true};
private:
VLayoutPaperData& operator=(const VLayoutPaperData&) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VLayoutPaperData)
};
QT_WARNING_POP

View File

@ -146,7 +146,7 @@ public:
qint64 m_square{0};
private:
VLayoutPieceData &operator=(const VLayoutPieceData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VLayoutPieceData)
static const quint32 streamHeader;
static const quint16 classVersion;

View File

@ -72,7 +72,7 @@ public:
bool m_cut{false};
private:
VLayoutPiecePathData &operator=(const VLayoutPiecePathData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VLayoutPiecePathData)
static const quint32 streamHeader;
static const quint16 classVersion;

View File

@ -43,4 +43,9 @@ template <typename T>
void qAsConst(const T &&) Q_DECL_EQ_DELETE;
#endif
#ifndef Q_DISABLE_ASSIGN
#define Q_DISABLE_ASSIGN(Class) \
Class &operator=(const Class &) Q_DECL_EQ_DELETE;
#endif
#endif // DEFGLOBAL_H

View File

@ -33,6 +33,7 @@
#include <QSharedData>
#include "../vmisc/diagnostic.h"
#include "../vmisc/defglobal.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
@ -60,7 +61,7 @@ public:
bool m_bVisible;
private:
VAbstractFloatItemDataPrivate &operator=(const VAbstractFloatItemDataPrivate &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VAbstractFloatItemDataPrivate)
};
QT_WARNING_POP

View File

@ -78,7 +78,7 @@ public:
quint32 m_bottomPin;
private:
VGrainlineDataPrivate &operator=(const VGrainlineDataPrivate &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VGrainlineDataPrivate)
};
QT_WARNING_POP

View File

@ -81,7 +81,7 @@ public:
quint32 m_bottomRightPin;
private:
VPatternLabelDataPrivate &operator=(const VPatternLabelDataPrivate &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VPatternLabelDataPrivate)
};
QT_WARNING_POP

View File

@ -85,7 +85,7 @@ public:
QVector<VLabelTemplateLine> m_lines;
private:
VPieceLabelDataPrivate &operator=(const VPieceLabelDataPrivate &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VPieceLabelDataPrivate)
};
QT_WARNING_POP

View File

@ -32,6 +32,7 @@
#include <QSharedData>
#include "../vmisc/diagnostic.h"
#include "../vmisc/defglobal.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
@ -53,12 +54,12 @@ public:
:QSharedData(var), arcId(var.arcId)
{}
virtual ~VArcRadiusData() override;
virtual ~VArcRadiusData();
quint32 arcId;
private:
VArcRadiusData &operator=(const VArcRadiusData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VArcRadiusData)
};
VArcRadiusData::~VArcRadiusData()

View File

@ -60,7 +60,7 @@ public:
quint32 parentId;
private:
VCurveVariableData &operator=(const VCurveVariableData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VCurveVariableData)
};
VCurveVariableData::~VCurveVariableData()

View File

@ -84,7 +84,7 @@ public:
IncrementType incrType{IncrementType::Increment};
private:
VIncrementData &operator=(const VIncrementData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VIncrementData)
};
VIncrementData::~VIncrementData()

View File

@ -59,7 +59,7 @@ public:
QString name;
private:
VInternalVariableData &operator=(const VInternalVariableData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VInternalVariableData)
};
VInternalVariableData::~VInternalVariableData()

View File

@ -60,7 +60,7 @@ public:
quint32 p2Id;
private:
VLineAngleData &operator=(const VLineAngleData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VLineAngleData)
};
VLineAngleData::~VLineAngleData()

View File

@ -61,7 +61,7 @@ public:
Unit patternUnit;
private:
VLengthLineData &operator=(const VLengthLineData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VLengthLineData)
};
VLengthLineData::~VLengthLineData()

View File

@ -122,7 +122,7 @@ public:
qreal baseHeight;
private:
VMeasurementData &operator=(const VMeasurementData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VMeasurementData)
};
VMeasurementData::~VMeasurementData()

View File

@ -32,6 +32,7 @@
#include <QSharedData>
#include "../vmisc/diagnostic.h"
#include "../vmisc/defglobal.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
@ -60,7 +61,7 @@ public:
QString description;
private:
VVariableData &operator=(const VVariableData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VVariableData)
};
VVariableData::~VVariableData()

View File

@ -111,7 +111,7 @@ public:
QString nspace;
private:
VContainerData &operator=(const VContainerData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VContainerData)
};
QT_WARNING_POP

View File

@ -31,6 +31,7 @@
#include "../vmisc/diagnostic.h"
#include "../vmisc/typedef.h"
#include "../vmisc/vmath.h"
#include "../vmisc/defglobal.h"
#include <QSharedData>
#include <QCoreApplication>
@ -82,7 +83,7 @@ public:
QString reason{tr("Formula is empty")};
private:
VFormulaData &operator=(const VFormulaData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VFormulaData)
};
QT_WARNING_POP

View File

@ -81,7 +81,7 @@ public:
bool reverse;
private:
VNodeDetailData &operator=(const VNodeDetailData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VNodeDetailData)
};
QT_WARNING_POP

View File

@ -101,7 +101,7 @@ public:
QString m_formulaWidth;
private:
VPieceData &operator=(const VPieceData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VPieceData)
};
VPieceData::~VPieceData()

View File

@ -118,7 +118,7 @@ public:
bool m_manualPassmarkLength{false};
private:
VPieceNodeData &operator=(const VPieceNodeData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VPieceNodeData)
};
// Friend functions

View File

@ -73,7 +73,7 @@ public:
bool m_lastToCuttingCountour{false};
private:
VPiecePathData &operator=(const VPiecePathData &) Q_DECL_EQ_DELETE;
Q_DISABLE_ASSIGN(VPiecePathData)
};
VPiecePathData::~VPiecePathData()