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
{
int opacity{20};
bool showText{true};
QString text{};
int textRotation{0};
QFont font{};
bool showImage{true};
QString path{};
int imageRotation{0};
bool grayscale{false};
bool invalidFile{false};
QColor textColor{Qt::black};
int opacity{20}; // NOLINT(misc-non-private-member-variables-in-classes)
bool showText{true}; // NOLINT(misc-non-private-member-variables-in-classes)
QString text{}; // NOLINT(misc-non-private-member-variables-in-classes)
int textRotation{0}; // NOLINT(misc-non-private-member-variables-in-classes)
QFont font{}; // NOLINT(misc-non-private-member-variables-in-classes)
bool showImage{true}; // NOLINT(misc-non-private-member-variables-in-classes)
QString path{}; // NOLINT(misc-non-private-member-variables-in-classes)
int imageRotation{0}; // NOLINT(misc-non-private-member-variables-in-classes)
bool grayscale{false}; // NOLINT(misc-non-private-member-variables-in-classes)
bool invalidFile{false}; // NOLINT(misc-non-private-member-variables-in-classes)
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

View File

@ -93,9 +93,16 @@ QT_WARNING_DISABLE_GCC("-Weffc++")
struct VFormulaField
{
QString expression;
QDomElement element;
QString attribute;
QString expression; // NOLINT(misc-non-private-member-variables-in-classes)
QDomElement element; // NOLINT(misc-non-private-member-variables-in-classes)
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

View File

@ -63,10 +63,17 @@ struct ThreeDotsPosData
struct FoldLabelPosData
{
QFont font{};
QPointF pos{};
QString label{};
qreal angle{0};
QFont font{}; // NOLINT(misc-non-private-member-variables-in-classes)
QPointF pos{}; // NOLINT(misc-non-private-member-variables-in-classes)
QString label{}; // NOLINT(misc-non-private-member-variables-in-classes)
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
@ -76,6 +83,11 @@ class VFoldLine
public:
VFoldLine() = default;
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 SetWidth(qreal newWidth);

View File

@ -102,8 +102,15 @@ struct VBestSquareResData
struct VCachedPositions
{
QRectF boundingRect{};
QPainterPath layoutAllowancePath{};
QRectF boundingRect{}; // NOLINT(misc-non-private-member-variables-in-classes)
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

View File

@ -80,8 +80,8 @@ public:
VTextManager(const VTextManager &text) = default;
auto operator=(const VTextManager &text) -> VTextManager & = default;
VTextManager(VTextManager &&text) = default;
auto operator=(VTextManager &&text) -> VTextManager & = default;
VTextManager(VTextManager &&text) noexcept = default;
auto operator=(VTextManager &&text) noexcept -> VTextManager & = default;
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);
}
#undef V_UNUSED
#endif // THREAD_DISPATCHER_H