Skip to content

Drop unneeded Qt metatype declarations

KNSCore::Entry has a Q_GADGET macro and thus has automatic coverage. KNSCore::Entry::List is a QList<Entry> typedef, where for QList<T> with T being a registered meta type that is also registered automatically.

KNewStuffQuick::CommentsModel::IncludedComments & ItemsModel::ItemStatus are both registered with Q_ENUM, thus also have automatic coverage.

The explicit declaration macros only add costs to all places using the header, where the metatype declaration will be only needed by code using the types in queued connections.

See also end of section here: https://doc.qt.io/qt-6/qmetatype.html#Q_DECLARE_METATYPE

Edited by Friedrich W. H. Kossebau

Merge request reports