QMetaTypeModuleHelper: prevent slicing

Disable copy and move SMFs and make the dtor protected. This requires
to restore the default ctor, which in turn also becomes protected,
because it needn't be public.

Found by clazy-copyable-polymorphic.

Pick-to: 6.3
Change-Id: Ibde8202e755f6de05cd8f9e92cf0f9cf19b4e19b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Marc Mutz 2022-04-05 15:41:51 +02:00
parent a322af7df4
commit bf2bff543c
1 changed files with 4 additions and 0 deletions

View File

@ -76,6 +76,10 @@ QT_BEGIN_NAMESPACE
class QMetaTypeModuleHelper
{
Q_DISABLE_COPY_MOVE(QMetaTypeModuleHelper)
protected:
QMetaTypeModuleHelper() = default;
~QMetaTypeModuleHelper() = default;
public:
static constexpr auto makePair(int from, int to) -> quint64
{