qt6-bb10/src/corelib
Stephen Kelly 32bc019ac1 Fix automatic declaration of QSharedPointer<T> metatypes.
QSharedPointer doesn't work like the other automatic template metatype
declarations because in some cases T* is declared as a metatype, but we
are interested in QSharedPointer<T> (eg QObject*). In other cases, T is
declared as a metatype and we are interested
in QSharedPointer<T> (eg char).

In particular the macro used before this patch was attempting to get the
metatype id of the element_type using for example qMetaTypeId<QObject>()
instead of qMetaTypeId<QObject*>(), which did not work.

Similarly, the variadic macro driven test is no good, because it was
testing QSharedPointer<QObject*> instead of QSharedPointer<QObject>,
so that is removed.

In the end, the only thing we can sensibly automatically declare as
metatypes are QSharedPointers to QObject derived types. That is also
the type that makes the most sense in a QML context anyway.

Change-Id: I13dd40147e2e6bedf38661f898102abaaaa96208
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-06-12 11:16:45 +02:00
..
animation Use QPointer instead of QWeakPointer. 2012-06-05 18:42:26 +02:00
arch Compile with -qtnamespace on Windows 2012-05-10 13:50:35 +02:00
codecs QtCore: remove \link usages 2012-05-29 11:35:21 +02:00
doc Update of the plugin documentation 2012-06-06 02:02:46 +02:00
global Logging: Remove outdated QMessageHandler 2012-06-10 15:55:49 +02:00
io update QStandardPaths::standardLocations() documentation 2012-06-11 00:37:12 +02:00
itemmodels Use a QVector<int> instead of a QSet<int> in itemviews/models. 2012-06-12 04:30:07 +02:00
json Fixed QJsonObject::find() 2012-06-06 02:03:11 +02:00
kernel Fix automatic declaration of QSharedPointer<T> metatypes. 2012-06-12 11:16:45 +02:00
mimetypes Rename QMimeDatabase method for consistency. 2012-05-15 14:25:37 +02:00
plugin Remove support for Qt 4 style plugins 2012-06-06 02:02:49 +02:00
statemachine statemachine: Make delayed event posting work from secondary thread 2012-06-06 13:27:32 +02:00
thread QMutex: de-inline lock(), unlock(), and tryLock() 2012-05-29 07:35:31 +02:00
tools Windows/ICU: Compile fix. 2012-06-12 07:11:39 +02:00
xml Replace `const QLatin1String &` with `QLatin1String` where appropriate 2012-05-25 21:49:21 +02:00
Qt5CoreConfigExtras.cmake.in Expand the 'existing target guard' in generated CMake files. 2012-06-07 19:08:34 +02:00
Qt5CoreMacros.cmake Find Qt5 modules automatically in the qt5_use_modules function. 2012-05-14 04:35:01 +02:00
QtCore.dynlist Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
corelib.pro turn off exceptions by default where they aren't required 2012-05-17 05:14:26 +02:00
eval.pri Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00