GCC warnings.
--HG-- branch : develop
This commit is contained in:
parent
b4f081727d
commit
965d908663
|
@ -55,6 +55,7 @@ Q_DECLARE_LOGGING_CATEGORY(vXML)
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
/**
|
||||
* @brief The VDomDocument class represents a Valentina document (.val file).
|
||||
|
|
|
@ -1407,9 +1407,7 @@ void QmuParserBase::CreateRPN() const
|
|||
}
|
||||
++stArgCount.top();
|
||||
// fallthrough intentional (no break!)
|
||||
#ifdef Q_CC_CLANG
|
||||
[[clang::fallthrough]];
|
||||
#endif
|
||||
QMUP_FALLTHROUGH
|
||||
case cmEND:
|
||||
ApplyRemainingOprt(stOpt, stVal);
|
||||
break;
|
||||
|
@ -1466,9 +1464,7 @@ void QmuParserBase::CreateRPN() const
|
|||
case cmIF:
|
||||
m_nIfElseCounter++;
|
||||
// fallthrough intentional (no break!)
|
||||
#ifdef Q_CC_CLANG
|
||||
[[clang::fallthrough]];
|
||||
#endif
|
||||
QMUP_FALLTHROUGH
|
||||
case cmLE:
|
||||
case cmGE:
|
||||
case cmNEQ:
|
||||
|
|
|
@ -52,6 +52,24 @@
|
|||
# define QMUP_NOEXCEPT_EXPR(x)
|
||||
# endif
|
||||
|
||||
#if __cplusplus > 201402L && __has_cpp_attribute(fallthrough)
|
||||
# define QMUP_FALLTHROUGH [[fallthrough]];
|
||||
#elif defined(Q_CC_CLANG) && __cplusplus >= 201103L
|
||||
/* clang's fallthrough annotations are only available starting in C++11. */
|
||||
# define QMUP_FALLTHROUGH [[clang::fallthrough]];
|
||||
#elif defined(Q_CC_MSVC)
|
||||
/*
|
||||
* MSVC's __fallthrough annotations are checked by /analyze (Code Analysis):
|
||||
* https://msdn.microsoft.com/en-us/library/ms235402%28VS.80%29.aspx
|
||||
*/
|
||||
# include <sal.h>
|
||||
# define QMUP_FALLTHROUGH __fallthrough;
|
||||
#elif defined(Q_CC_GNU) && (__GNUC__ >= 7)
|
||||
# define QMUP_FALLTHROUGH [[gnu::fallthrough]];
|
||||
#else
|
||||
# define QMUP_FALLTHROUGH
|
||||
#endif
|
||||
|
||||
/** @brief If this macro is defined mathematical exceptions (div by zero) will be thrown as exceptions. */
|
||||
//#define QMUP_MATH_EXCEPTIONS
|
||||
|
||||
|
|
|
@ -530,5 +530,23 @@ const double dxfColors[][3] =
|
|||
#define DL_DCS_TRANS_CODE 2
|
||||
#define DL_PCS_TRANS_CODE 3
|
||||
|
||||
#if __cplusplus > 201402L && __has_cpp_attribute(fallthrough)
|
||||
# define DL_FALLTHROUGH [[fallthrough]];
|
||||
#elif defined(Q_CC_CLANG) && __cplusplus >= 201103L
|
||||
/* clang's fallthrough annotations are only available starting in C++11. */
|
||||
# define DL_FALLTHROUGH [[clang::fallthrough]];
|
||||
#elif defined(Q_CC_MSVC)
|
||||
/*
|
||||
* MSVC's __fallthrough annotations are checked by /analyze (Code Analysis):
|
||||
* https://msdn.microsoft.com/en-us/library/ms235402%28VS.80%29.aspx
|
||||
*/
|
||||
# include <sal.h>
|
||||
# define DL_FALLTHROUGH __fallthrough;
|
||||
#elif defined(Q_CC_GNU) && (__GNUC__ >= 7)
|
||||
# define DL_FALLTHROUGH [[gnu::fallthrough]];
|
||||
#else
|
||||
# define DL_FALLTHROUGH
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -5866,14 +5866,10 @@ int DL_Dxf::getLibVersion(const std::string& str)
|
|||
{
|
||||
case 4:
|
||||
v3 = ver.at(3).toInt();
|
||||
#ifdef Q_CC_CLANG
|
||||
[[clang::fallthrough]];
|
||||
#endif
|
||||
DL_FALLTHROUGH
|
||||
case 3:
|
||||
v2 = ver.at(2).toInt();
|
||||
#ifdef Q_CC_CLANG
|
||||
[[clang::fallthrough]];
|
||||
#endif
|
||||
DL_FALLTHROUGH
|
||||
case 2:
|
||||
v0 = ver.at(0).toInt();
|
||||
v1 = ver.at(1).toInt();
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VAbstractArcData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VAbstractCurveData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VArcData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VCubicBezierData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VCubicBezierPathData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VEllipticalArcData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VGObjectData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VPointFData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VSplineData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VSplinePathData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VFSplinePointData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -44,6 +44,7 @@ class VAbstractPieceData;
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
/**
|
||||
* @brief The VSAPoint class seam allowance point
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VAbstractPieceData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VContourData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VLayoutPaperData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VLayoutPieceData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VLayoutPiecePathData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class QCommandLineOptionPrivate : public QSharedData
|
||||
{
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class QCommandLineOptionPrivate;
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ QT_WARNING_PUSH
|
|||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_GCC("-Wsuggest-attribute=noreturn")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
typedef QHash<QString, int> NameHash_t;
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ class QCoreApplication;
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class QCommandLineParser
|
||||
{
|
||||
|
|
|
@ -282,10 +282,22 @@ enum class GSizes : unsigned char { ALL,
|
|||
#define SCASSERT(cond) qt_noop();
|
||||
#endif /* V_NO_ASSERT */
|
||||
|
||||
#ifdef Q_CC_CLANG
|
||||
#define V_FALLTHROUGH [[clang::fallthrough]];
|
||||
#if __cplusplus > 201402L && __has_cpp_attribute(fallthrough)
|
||||
# define V_FALLTHROUGH [[fallthrough]];
|
||||
#elif defined(Q_CC_CLANG) && __cplusplus >= 201103L
|
||||
/* clang's fallthrough annotations are only available starting in C++11. */
|
||||
# define V_FALLTHROUGH [[clang::fallthrough]];
|
||||
#elif defined(Q_CC_MSVC)
|
||||
/*
|
||||
* MSVC's __fallthrough annotations are checked by /analyze (Code Analysis):
|
||||
* https://msdn.microsoft.com/en-us/library/ms235402%28VS.80%29.aspx
|
||||
*/
|
||||
# include <sal.h>
|
||||
# define V_FALLTHROUGH __fallthrough;
|
||||
#elif defined(Q_CC_GNU) && (__GNUC__ >= 7)
|
||||
# define V_FALLTHROUGH [[gnu::fallthrough]];
|
||||
#else
|
||||
#define V_FALLTHROUGH
|
||||
# define V_FALLTHROUGH
|
||||
#endif
|
||||
|
||||
extern const QString LONG_OPTION_NO_HDPI_SCALING;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VAbstractFloatItemDataPrivate : public QSharedData
|
||||
{
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VGrainlineDataPrivate : public QSharedData
|
||||
{
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VPatternLabelDataPrivate : public QSharedData
|
||||
{
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VPieceLabelDataPrivate : public QSharedData
|
||||
{
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VArcRadiusData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VCurveVariableData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VIncrementData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VInternalVariableData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VLineAngleData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VLengthLineData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VMeasurementData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VVariableData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -62,6 +62,7 @@ class VEllipticalArc;
|
|||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_INTEL(2021)
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VContainerData : public QSharedData //-V690
|
||||
{
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VNodeDetailData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VPieceData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VPieceNodeData : public QSharedData
|
||||
{
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Weffc++")
|
||||
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
||||
|
||||
class VPiecePathData : public QSharedData
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user