QMetaTypeModuleHelper: suppress cppcoreguidelines-virtual-class-destructor
Says clang-tidy: destructor of '(unnamed struct at qmetatype.cpp:966:14)' is public and non-virtual in file:src/corelib/kernel/qmetatype.cpp line:966 col:14 static const struct : QMetaTypeModuleHelper Yes, these classes are polymorphic (because the base class is). Yes, the destructor is non-virtual (because the base class' one isn't, but it's also protected, so fine). But these classes are not used as base classes, so suppress the warning. Pick-to: 6.5 6.2 Change-Id: I75be86bca36a4a0e93d72acb1a0d2fe0dca1c505 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 11d153ae1ce3ce75e76a1fcac7bf99e4cff05716) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 256ac3994395e308337b5c6ef03a8191ae3690fc)
This commit is contained in:
parent
db447658b4
commit
be64808342
@ -954,6 +954,7 @@ static const struct { const char * typeName; int typeNameLength; int type; } typ
|
||||
{nullptr, 0, QMetaType::UnknownType}
|
||||
};
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-virtual-class-destructor): this is not a base class
|
||||
static const struct : QMetaTypeModuleHelper
|
||||
{
|
||||
template<typename T, typename LiteralWrapper =
|
||||
|
@ -56,6 +56,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace {
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-virtual-class-destructor): this is not a base class
|
||||
static const struct : QMetaTypeModuleHelper
|
||||
{
|
||||
#define QT_IMPL_METATYPEINTERFACE_GUI_TYPES(MetaTypeName, MetaTypeId, RealName) \
|
||||
|
@ -12,6 +12,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace {
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-virtual-class-destructor): this is not a base class
|
||||
static const struct : QMetaTypeModuleHelper
|
||||
{
|
||||
const QtPrivate::QMetaTypeInterface *interfaceForType(int type) const override {
|
||||
|
Loading…
x
Reference in New Issue
Block a user