Fix incompatibility with GCC < 10.1.
This commit is contained in:
parent
b44919c53e
commit
30aa5e7c22
|
@ -39,6 +39,7 @@
|
||||||
#include <Qt>
|
#include <Qt>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
#include "../vmisc/def.h"
|
||||||
#include "../vmisc/defglobal.h"
|
#include "../vmisc/defglobal.h"
|
||||||
|
|
||||||
class VPieceLabelData;
|
class VPieceLabelData;
|
||||||
|
@ -74,7 +75,7 @@ class VTextManager
|
||||||
Q_DECLARE_TR_FUNCTIONS(VTextManager) // NOLINT
|
Q_DECLARE_TR_FUNCTIONS(VTextManager) // NOLINT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VTextManager() noexcept = default;
|
DEF_CONSTRUCTOR(VTextManager)
|
||||||
virtual ~VTextManager() = default;
|
virtual ~VTextManager() = default;
|
||||||
|
|
||||||
VTextManager(const VTextManager &text) = default;
|
VTextManager(const VTextManager &text) = default;
|
||||||
|
|
|
@ -68,7 +68,7 @@ template <class T> class QSharedPointer;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_COMPILER_GCC) && defined(Q_CC_GNU) && defined(Q_CC_GNU_VERSION) && (Q_CC_GNU_VERSION <= 40900)
|
#if (defined(Q_CC_GNU) && Q_CC_GNU <= 409) && !defined(Q_CC_CLANG)
|
||||||
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||||
#define COPY_CONSTRUCTOR_IMPL(className) \
|
#define COPY_CONSTRUCTOR_IMPL(className) \
|
||||||
className::className(const className &item) \
|
className::className(const className &item) \
|
||||||
|
@ -90,6 +90,18 @@ template <class T> class QSharedPointer;
|
||||||
#define COPY_CONSTRUCTOR_IMPL_2(className, baseClassName) className::className(const className &) = default;
|
#define COPY_CONSTRUCTOR_IMPL_2(className, baseClassName) className::className(const className &) = default;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// https://stackoverflow.com/questions/75008386/constructor-is-implicitly-deleted-because-its-exception-specification-does-not-m
|
||||||
|
#if (defined(Q_CC_GNU) && Q_CC_GNU < 1001) && !defined(Q_CC_CLANG)
|
||||||
|
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||||
|
#define DEF_CONSTRUCTOR(className) \
|
||||||
|
className() noexcept \
|
||||||
|
{ \
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||||
|
#define DEF_CONSTRUCTOR(className) className() noexcept = default;
|
||||||
|
#endif
|
||||||
|
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
class QMarginsF;
|
class QMarginsF;
|
||||||
class VTranslateMeasurements;
|
class VTranslateMeasurements;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user