Don't use adhoc Q_DECLARE_METATYPE in header files unless the type is defined there
Don't use adhoc Q_DECLARE_METATYPE in header files unless the type is defined there

For foreign structs, either use Q_DECLARE_METATYPE in .cpp file, or if it's used
more often throughout the library, put it to types.h. Otherwise it can lead to
'redefinition of struct QMetaTypeId' error when two headers are included from a
single .cpp file, both calling Q_DECLARE_METATYPE on the same type.

Fixes build breakage introduced in e66011d83da5712f56e5f480ffebff6823e295c8

KDE/ktp-common-internals,leonhandreke/ktp-common-internals,KDE/ktp-common-internals,leonhandreke/ktp-common-internals,KDE/ktp-common-internals,leonhandreke/ktp-common-internals