plasma-framework/src/scriptengines
Friedrich W. H. Kossebau eb87bd715d Remove unneeded Q_DECLARE_METATYPE calls for pointers to QObject subclasses
Compare API dox of Q_DECLARE_METATYPE:
"
Some types are registered automatically and do not need this macro:
* Pointers to classes derived from QObject
* QPointer<T>, QSharedPointer<T>, QWeakPointer<T>,
  where T is a class that derives from QObject
"

This is a ABI-compatible change, as this just replaces explicitly
defined template code (by the Q_DECLARE_METATYPE macro use) with the
generic predefined one picking up pointers to QObject subclasses.

So instead of the custom explicitly template overload
    template <>
    struct QMetaTypeId< TYPE >
    { /**/ static int qt_metatype_id() {/**/} };
the predefined template overload one is picked up via
    template <typename T>
    struct QMetaTypeId : public QMetaTypeIdQObject<T>
    { /**/ };
    template <typename T, int =
        QtPrivate::IsPointerToTypeDerivedFromQObject<T>::Value ?
            QMetaType::PointerToQObject :
        /**/ 0>
    struct QMetaTypeIdQObject
    { /**/ };
    template <typename T>
    struct QMetaTypeIdQObject<T*, QMetaType::PointerToQObject>
    { /**/ static int qt_metatype_id() {/**/} };

And thus the constexpr code using QMetaTypeId<T>::qt_metatype_id(),
for which all this is done, evaluates as before.

GIT_SILENT
2020-07-20 21:55:53 +00:00
..
python SVN_SILENT made messages (.desktop file) - always resolve ours 2020-06-18 05:32:17 +02:00
qml Remove unneeded Q_DECLARE_METATYPE calls for pointers to QObject subclasses 2020-07-20 21:55:53 +00:00
ruby SVN_SILENT made messages (.desktop file) - always resolve ours 2020-06-18 05:32:17 +02:00
CMakeLists.txt port libplasma away from sycoca as much as possible 2015-05-07 16:26:37 +02:00