Make sure that moving an object of class is "noexcept".

This commit is contained in:
Roman Telezhynskyi 2024-02-19 11:17:32 +02:00
parent 827b82e3f6
commit 409161c302
6 changed files with 55 additions and 24 deletions

View File

@ -260,17 +260,24 @@ struct VLabelTemplateLine
struct VWatermarkData struct VWatermarkData
{ {
int opacity{20}; int opacity{20}; // NOLINT(misc-non-private-member-variables-in-classes)
bool showText{true}; bool showText{true}; // NOLINT(misc-non-private-member-variables-in-classes)
QString text{}; QString text{}; // NOLINT(misc-non-private-member-variables-in-classes)
int textRotation{0}; int textRotation{0}; // NOLINT(misc-non-private-member-variables-in-classes)
QFont font{}; QFont font{}; // NOLINT(misc-non-private-member-variables-in-classes)
bool showImage{true}; bool showImage{true}; // NOLINT(misc-non-private-member-variables-in-classes)
QString path{}; QString path{}; // NOLINT(misc-non-private-member-variables-in-classes)
int imageRotation{0}; int imageRotation{0}; // NOLINT(misc-non-private-member-variables-in-classes)
bool grayscale{false}; bool grayscale{false}; // NOLINT(misc-non-private-member-variables-in-classes)
bool invalidFile{false}; bool invalidFile{false}; // NOLINT(misc-non-private-member-variables-in-classes)
QColor textColor{Qt::black}; QColor textColor{Qt::black}; // NOLINT(misc-non-private-member-variables-in-classes)
VWatermarkData() = default;
VWatermarkData(VWatermarkData &&) noexcept = default;
auto operator=(VWatermarkData &&) noexcept -> VWatermarkData & = default;
VWatermarkData(const VWatermarkData &) = default;
auto operator=(const VWatermarkData &) -> VWatermarkData & = default;
~VWatermarkData() = default;
}; };
QT_WARNING_POP QT_WARNING_POP

View File

@ -93,9 +93,16 @@ QT_WARNING_DISABLE_GCC("-Weffc++")
struct VFormulaField struct VFormulaField
{ {
QString expression; QString expression; // NOLINT(misc-non-private-member-variables-in-classes)
QDomElement element; QDomElement element; // NOLINT(misc-non-private-member-variables-in-classes)
QString attribute; QString attribute; // NOLINT(misc-non-private-member-variables-in-classes)
VFormulaField() = default;
VFormulaField(VFormulaField &&) noexcept = default;
auto operator=(VFormulaField &&) noexcept -> VFormulaField & = default;
VFormulaField(const VFormulaField &) = default;
auto operator=(const VFormulaField &) -> VFormulaField & = default;
~VFormulaField() = default;
}; };
struct VFinalMeasurement struct VFinalMeasurement

View File

@ -63,10 +63,17 @@ struct ThreeDotsPosData
struct FoldLabelPosData struct FoldLabelPosData
{ {
QFont font{}; QFont font{}; // NOLINT(misc-non-private-member-variables-in-classes)
QPointF pos{}; QPointF pos{}; // NOLINT(misc-non-private-member-variables-in-classes)
QString label{}; QString label{}; // NOLINT(misc-non-private-member-variables-in-classes)
qreal angle{0}; qreal angle{0}; // NOLINT(misc-non-private-member-variables-in-classes)
FoldLabelPosData() = default;
FoldLabelPosData(FoldLabelPosData &&) noexcept = default;
auto operator=(FoldLabelPosData &&) noexcept -> FoldLabelPosData & = default;
FoldLabelPosData(const FoldLabelPosData &) = default;
auto operator=(const FoldLabelPosData &) -> FoldLabelPosData & = default;
~FoldLabelPosData() = default;
}; };
class VFoldLine class VFoldLine
@ -76,6 +83,11 @@ class VFoldLine
public: public:
VFoldLine() = default; VFoldLine() = default;
VFoldLine(const QLineF &line, FoldLineType type); VFoldLine(const QLineF &line, FoldLineType type);
VFoldLine(VFoldLine &&) noexcept = default;
auto operator=(VFoldLine &&) noexcept -> VFoldLine & = default;
VFoldLine(const VFoldLine &) = default;
auto operator=(const VFoldLine &) -> VFoldLine & = default;
~VFoldLine() = default;
void SetHeight(qreal newHeight); void SetHeight(qreal newHeight);
void SetWidth(qreal newWidth); void SetWidth(qreal newWidth);

View File

@ -102,8 +102,15 @@ struct VBestSquareResData
struct VCachedPositions struct VCachedPositions
{ {
QRectF boundingRect{}; QRectF boundingRect{}; // NOLINT(misc-non-private-member-variables-in-classes)
QPainterPath layoutAllowancePath{}; QPainterPath layoutAllowancePath{}; // NOLINT(misc-non-private-member-variables-in-classes)
VCachedPositions() = default;
VCachedPositions(VCachedPositions &&) noexcept = default;
auto operator=(VCachedPositions &&) noexcept -> VCachedPositions & = default;
VCachedPositions(const VCachedPositions &) = default;
auto operator=(const VCachedPositions &) -> VCachedPositions & = default;
~VCachedPositions() = default;
}; };
enum class Cases : qint8 enum class Cases : qint8

View File

@ -80,8 +80,8 @@ public:
VTextManager(const VTextManager &text) = default; VTextManager(const VTextManager &text) = default;
auto operator=(const VTextManager &text) -> VTextManager & = default; auto operator=(const VTextManager &text) -> VTextManager & = default;
VTextManager(VTextManager &&text) = default; VTextManager(VTextManager &&text) noexcept = default;
auto operator=(VTextManager &&text) -> VTextManager & = default; auto operator=(VTextManager &&text) noexcept -> VTextManager & = default;
virtual auto GetSpacing() const -> int; virtual auto GetSpacing() const -> int;

View File

@ -112,6 +112,4 @@ static inline void q_dispatch_async_main(const msgHandlerBlock &block, QtMsgType
q_dispatch_async(mainThread, block, type, context, msg); q_dispatch_async(mainThread, block, type, context, msg);
} }
#undef V_UNUSED
#endif // THREAD_DISPATCHER_H #endif // THREAD_DISPATCHER_H