summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatype.h
Commit message (Collapse)AuthorAgeFilesLines
* doc: Fix all clang parse errors in QtBase during PCH buildMartin Smith2018-11-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update eliminates ALL parsing errors when clang parses the Qt headers to build the precompiled header qdoc needs. These errors are often cases where an old use of Q_QDOC no longer works because clang sees the enclosed fake declarations as erroneous. In a few cases, clang reported errors because two dummy function declartations under the Q_CLANG_QDOC guard were indistinguishable, so one of them was removed, and the documentation was patched accordingly. Using the macro Q_DECLARE_INTERFACE(...) causes clang to report errors because the class parametewr is abstract. These uses of the macro are not needed, so they are removed with #ifndef Q_CLANG_QDOC. Some declarations of default GL types that had been provided for qdoc were no longer needed, so they are removed. Now there are some member function signatures in QDBusPendingReply and QDBusPendingCall that have very long template clauses and qualifiers in their signatures. These unwieldy signatures will be unnecessary in the documentation and will look bad there, but for now they are correct. The ultimate solution will be to add a metacommand to qdoc, something like \simplify-signature to tell qdoc to generate the documentation for these member functions without the long template caluses and qualifiers. Change-Id: I012cf17a544fbba2ebc71002f31bdc865119bb8e Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* Expose type id from QMetaType instanceJędrzej Nowacki2018-10-011-0/+6
| | | | | | | | | There is not reason why it should be kept in secret. Not having public accessor forces a user code to keep a copy of the id. Visible for example in QML (QQmlValueType). Change-Id: If0de65fb8d91bcd50880c66b5f87c68f6d888dd3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Allow registering constructor for a set of dynamic typesBogDan Vatra2018-08-301-9/+24
| | | | | | | | | | | | | | | This feature is needed to register complex types (e.g. Q_GADGETS) at runtime, using a single constructor method and added type parameter. Without having the type id available to the Constructor it is impossible to specialize behavior, thus requiring separate constructors for each type. Generating these separate constructors at compile time is easy, but not at runtime. [ChangeLog][QMetaType] QMetaType can now register constructor for a set of dynamic types. Change-Id: I6071271d0e157864594dd07b4bc3a0abbeb15a44 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Metatype: make the Qt CBOR value-like types built-in meta typesThiago Macieira2018-07-041-2/+15
| | | | | | | | This change only adds them to the registry and reserves the IDs. The next commit will handle conversions. Change-Id: I56b444f9d6274221a3b7fffd150d2d49f40940c2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix metatype trait for types that are both QObject and Q_GADGETDaniel Vrátil2018-06-301-2/+2
| | | | | | | | | | Fixes ambiguous template instantiation for types that derive from both a QObject and Q_GADGET. For such types we treat them only as QObjects as they extend the functionality of the gadget. Task-number: QTBUG-68803 Change-Id: Ic42766034e14e5df43c4e6f7811e2c0be1dc7e74 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Make sure we can build with -no-feature-itemmodelUlf Hermann2018-03-211-2/+9
| | | | | | | Various pieces of code have to be disabled in this case. Change-Id: I83b133f17e9f024016a79c9103293627185449d2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Allow use of template class instances inheriting from a Q_GADGET in QmlNils Jeisecke2018-03-101-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | The Q_GADGET macro cannot be used in templates. It can however be useful to derive a template class from a Q_GADGET enabled base class to benefit from type safety features in C++ (e.g. the class could represent an id or handle for some C++ type). For proper wrapping of a QVariant with a gadget value in a QJSValue, the QMetaType::IsGadget flag must be set for the registered template instance type - which does not happen prior to the fix because IsGadgetHelper requires qt_check_for_QGADGET_macro to be defined in the registered class but not in an ancestor class - in other words: The class must declare Q_GADGET. To overcome this, IsGadgetHelper/IsPointerToGadgetHelper can now differentiate between a Q_GADGET flagged class (allowing automatic registration) and a derived class, e.g. a template class (forcing Q_DECLARE_METATYPE to be used explicitly). [ChangeLog][QtCore][QMetaObject] It is now possible to use template class instances inheriting from a Q_GADGET in Qml Task-number: QTBUG-66744 Change-Id: I7632ad45cff79fa422b3f852ca0b963f35fab155 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* doc: Correct clang parsing errors in qvariant.hMartin Smith2018-01-091-0/+3
| | | | | | | | | | | | Some old uses of Q_QDOC to prevent the old qdoc C++ parser from seeing declarations it didn't need to see were preventing clang from seeing declarations it did need to see. These have been removed, and some internal documentation has been added to account for some declarations that suddenly became public but should not be seen in the Qt API. Change-Id: Iccf423e5cf8767f0a271150ab59bea54cf90ac46 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct qdoc warnings in qobject.cpp and qmetatype.cppMartin Smith2018-01-081-8/+8
| | | | | | | | | | | | | | clang required adding template clauses to a few \fn commands. There were also a few cases where Q_QDOC was changed to Q_CLANG_QDOC and a few cases where special declarations for qdoc were removed in favor of the actual declarations. Unfortunately, a few qdoc warnings remain unfixed for classes QObject and QMetaType, but these might be caused by minor bugs in clang-qdoc itself, so they will be fixed there. Change-Id: Ib586628cb6d2aa9cf4bcad303b5af09b412a7e57 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-46/+46
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-071-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-061-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/widgets/widgets/qtabbar.cpp Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
| | * Mark to remove const from function parameters in QtCore public headersThiago Macieira2017-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some compilers are known to complain about this with a warning. GCC complains about const on return values on -Wignored-qualifiers (enabled at -Wextra), so it's not too much of a jump to assume that others do too. Besides, this is not Qt Library API policy. As maintainer for QtCore, I'm exercising my prerrogative in specifying certain unspecified parts of the coding style, like I've done for constructor initializer lists. Since all the classes involved are exported (including QVector, through derived classes), we can't remove the qualifier until Qt 6, since there are compilers known to encode the qualifier in the mangled name (suncc). I'm not introducing #ifdef to silence unknown compilers unless we get an actual complaint. Change-Id: I33850dcdb2ce4a47878efffd14a876edef843c46 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Introduce QMetaType::PointerToGadget flag for pointers to gadgetsDaniel Vrátil2017-02-231-1/+46
|/ / | | | | | | | | | | | | | | | | | | | | | | | | A Q_GADGET class can be used both as a value class and a pointer, but right now QMetaType::IsGadget is only set for value types. This change introduces PointerToGadget metatype flag which is set for pointers. This allow for better handling of gadgets in code as well as disambiguating between value types and pointers to value types. Change-Id: Id3bd9e18a8eec7ca1cc6b1c25ed03cdc8c0a75a1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* / Use std::enable_if instead of QEnableIfAlexander Volkov2017-01-271-4/+4
|/ | | | | | Change-Id: Ideca8283141484cb6da47c50333f5c96e416f082 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8.0Liang Qi2016-12-081-5/+0
|\ | | | | | | Change-Id: I576187a9905802c177ae483e6c29d0f55cf7034d
| * Remove unnecessary warning disablingThiago Macieira2016-11-271-5/+0
| | | | | | | | | | | | | | Qt 5.7 cannot be compiled in C++03 mode anymore. Change-Id: Iaeecaffe26af4535b416fffd1489d808edc3c996 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Remove compiler-specific implementations of Q_IS_ENUMKai Koehne2016-11-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | Since the macro is now just a wrapper for std::is_enum, its use is also deprecated. [ChangeLog][QtCore][Global] Q_IS_ENUM is deprecated. Use std::is_enum<>::value instead. Change-Id: I09b9f4559c02c81f338cace927873318f2acafde Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Replace custom type traits with std one'sKai Koehne2016-11-081-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove most type traits from qtypetraits.h, but keep the custom implementation of is_signed/is_unsigned. This gets rid of BSD-3 licensed code from Google in a public header (hugh!). The custom implementations for is_signed/is_unsigned are kept because the implementations in gcc's standard headers do not work as we expect for enums - both is_signed and is_unsigned always returns false there - see also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59027 [ChangeLog][QtCore][General] Qt now relies on type traits from the C++ standard library. Change-Id: I3f2188b46949f04ca4482a6ac9afd3482103f0e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QMetaType: clean up #ifdefsMarc Mutz2016-08-151-7/+0
| | | | | | | | | | | | | | | | | | We require Q_COMPILER_VARIADIC_TEMPLATES since Qt 5.7, so remove the non-variadic version which anyway has zero test coverage. Change-Id: I24dd22a798e11d797238f9209312802d1d84a672 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Add std::nullptr_t as builtin type in QMetaTypeJędrzej Nowacki2016-08-031-1/+2
| | | | | | | | | | | | Change-Id: If6c484bc89a2610c6a9e3e7bd54ef85ef40a783f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-121-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure src/corelib/io/qprocess_wince.cpp src/plugins/platforms/windows/qwindowstheme.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qtimezone/BLACKLIST tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-291-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf mkspecs/features/qt_common.prf src/gui/text/qzip.cpp src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/windows/array.h src/testlib/qtestcase.cpp src/widgets/dialogs/qfilesystemmodel.h Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
| | * Add missing initializersTimur Pocheptsov2016-04-251-0/+2
| | | | | | | | | | | | | | | | | | | | | Coverity, CIDs: 10724, 10725. Data member _iterator is not initialized. Change-Id: I0c94f5cef031e208aab1687209282fae0317f0ab Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | | Let Q_DECLARE_METATYPE and Q_DECLARE_FLAGS be undefined under Q_MOC_RUNThiago Macieira2016-05-041-1/+2
| | | | | | | | | | | | | | | | | | | | | That's required so that they remain in the output from the preprocessor Change-Id: Id69569111e7d4e619e22ffff144b4a1ee90865f0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | qdoc: Remove Q_QDOC for int type() in qmetatype.hMartin Smith2016-04-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It probably wasn't necessary in the first place, but it certainly isn't needed now. Also changed a pair of internal qdoc comments on static functions that are not declared outside the .cpp file. Now they are no longer qdoc comments. This change does not require clang in qdoc. Change-Id: I39df3eb1e3f57ba1da93f27892d0c3af8f9481ef Task-number: QTBUG-52454 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-051-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/corelib/ipc/ipc.pro src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-041-1/+1
| |\| | | | | | | | | | Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
| | * QVariant: Fix flags for type-erased associative iterator keyStephen Kelly2016-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flags here are passed to a private QVariant constructor, and they really represent a boolean - IsPointer or not. Because the flag for the key_type was incorrectly populated with the flag for the value_type, memory would be corrupted when using a mapping type whose value_type is a pointer, but whose key type was not, such as QMap<QString, int*> This typo has been there since the concept was introduced in commit v5.2.0-alpha1~807 (Add container access functionality for associative containers in QVariant., 2013-04-05). Task-number: QTBUG-52246 Change-Id: I9ecb13c603015eed2dc2ca43947fa0ecd6be8b5a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Fix Q_QDOC code for PointerToMemberFunctionOlivier Goffart2016-03-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In functions such as QObject::connect and similar which are using pointer to member function or functor, we have a different declaration for qdoc because we don't want to show the QEnableIf and other type traits in the doc. However, The code still needs to be valid, as we will use clang to parse the documentation. Fix it by making 'PointerToMemberFunction' and 'Functor' template parameters (which they actually are). Change-Id: Ie2648407bae21ba6d1677f6de2d6f597486b5c98 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* | | Fix parsing of documentation for QByteArrayList and QStringListOlivier Goffart2016-03-231-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | QListSpecialMethod is an internal class. Everything needs to be hidden from Q_QDOC otherwise while parsing with clang, we get errors. Importantly, hides it while inheriting from QList so it does not appear in the documentation Change-Id: If2ac158f35d6a367aa033cfc7e6a054c912359b9 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* / Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Use QTypeInfo<T>::isRelocatable in QVariantThiago Macieira2015-09-241-1/+1
| | | | | Change-Id: Ib306f8f647014b399b87ffff13f1f01c40dc3ef7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Avoid recreating QVariantLists when extracted from a QVariantJocelyn Turcotte2015-08-241-15/+0
| | | | | | | | | | | | | | | Wrapping a QVariantList in a QVariant to pass it to QML would trigger a deep copy each time QML would try to access elements in the list (specifically in QQmlListAccessor::at). This reverts a part of 8c4deff51c8064f5a15cae0342bfa66b6663662b by specifying the associative array conversions explicitly without including the current type in the list of types to convert through an iteration. Task-number: QTBUG-41403 Change-Id: If9fddfe6d36f789ac4aa61a7c32677cd1dd077d8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Mark some QtMetaTypePrivate classes movableMarc Mutz2015-07-161-0/+8
| | | | | | | | | | | | | | These types are held in QVariant. This change should be BC, because it's private API, even though it is located in a public header file. The classes are used as private data members in the respective public API classes, but we don't change the size or composition, and holding these types in a QList would be outside the use of non-private API for which we promise BC. Change-Id: I7ef1c1ca57e9d87c6474c97bb2fa8afef170c88f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QPairVariantInterfaceImpl: init all fieldsMarc Mutz2015-07-161-0/+4
| | | | | | | Same pattern as used for Q{Sequential,Associative}IterableImpl. Change-Id: Iacec3266af80eecf491d2bb766c6fddd1365bdaa Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QtCore: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-011-43/+43
| | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I0cc388ef9faf45cbcf425ad0dc77db3060c104a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaType: Fix compilation with non default constructible Q_GADGETOlivier Goffart2015-05-271-1/+1
| | | | | | | | | | | Do not try to automatically register the meta type for Q_GADGET that are not default constructible. This fixes a source incompatibility in the function pointer syntax of QObject::connect when such types are used as an argument of a signal. Task-number: QTBUG-45721 Change-Id: I3065f6d57bc1f37e16988d2dee99118de250ca56 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaType: Do not automatically register types that derives from a Q_GADGETOlivier Goffart2015-05-231-4/+8
| | | | | | | Otherwise the type is registered with the wrong name Change-Id: I68ec3a05e2528816626e648b46ccc9d70b004866 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix QtPrivate::IsQEnumHelper<void>Olivier Goffart2015-05-171-0/+1
| | | | | Change-Id: I1633ef128212a6b99b66129f13e0b4d5ea46644d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add support for unregistering of custom meta types.Robert Griebl2015-04-141-0/+1
| | | | | | | | | | | | | This patch addresses a specific Qml problem, where the meta types list will grow indefinitely when unloading and reloading Qml components over and over (in an failed effort to save memory). The implementation is not specific to Qml though, but will cater to all use-cases where registered types may not live until the application's termination. Change-Id: Ic0224dcd19aeb559715ef088b22a30509be2456b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Silence clang warnings in C++03 modeOlivier Goffart2015-04-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | C++03 forbid the use of local or unnamed type as template parameter. But in C++11 that is allowed, and clang accept them even in C++03 mode, but with a warning. The Warning happen for example with this code: enum { Foo = 3 }; int x = 3 << Foo; Then the compiler issues warnings: metatype.h:1379:31: warning: template argument uses local type [-Wlocal-type-template-args] enum { Value = sizeof(qt_getEnumMetaObject(declval())) == sizeof(QMetaObject*) }; ^~~~~~~~~~~~~~~~~~~~ qdebug.h:269:42: note: in instantiation of template class 'QtPrivate::IsQEnumHelper<(anonymous enum)>' requested here typename QtPrivate::QEnableIf<QtPrivate::IsQEnumHelper<T>::Value, QDebug>::Type operator<<(QDebug dbg, T value) Normaly the compiler should not even try to instantiate the operator<< with such types in C++03 mode. Change-Id: I48c7d5d1836fd87986835fe15c7e0b1beb73c728 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix source incompatibility while connecting signals with forward declared ↵Olivier Goffart2015-03-181-4/+4
| | | | | | | | | | | | | | | | | | | arguments QObject::connect tries to determine if the arguments are registered metatypes. This used to work even for arguments that were forward declared. But now, the metatype system tries to call QtPrivate::IsQEnumHelper<T>::Value to know if it is registered. That fails on gcc if T is forward declared. Apparently gcc needs to know the full type of T to pass it in the ellipsis function, even within a sizeof expression. So change the ellipsis expression to a template one. Task-number: QTBUG-44496 Change-Id: I7fa07bd3cde470b134c2ec53b0d581333d16a6f1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QPersistentModelIndex an internal meta-typeGabriel de Dietrich2015-03-061-2/+3
| | | | | | | | | | | It was already a user meta-type, so it only gets promoted to internal. [ChangeLog][QtCore] QPersistentModel index becomes an built-in meta-type, including QVariant support. Change-Id: I63d733d1eb66aa61691e7afce27fe7372a83ac00 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QMetaType: improve docs and commentsOlivier Goffart2015-02-141-0/+3
| | | | | Change-Id: I7bcc8cec95eb5abda75d936732b1113b943622dc Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMetaType: Automatic registration of Q_GADGET and Q_ENUM typesOlivier Goffart2015-02-121-2/+53
| | | | | | Change-Id: If43dcc2b77fea5ae3ec40cc847467fc21fbd2c83 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QMetatype: Register the QMetaObject of a Q_ENUM or Q_FLAGOlivier Goffart2015-02-051-1/+19
| | | | | Change-Id: Id1343c3fb51d88a43d4d97e8859dbe2b0cfbea34 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Support QMetaType::equals()Alex Blasche2015-01-131-0/+29
| | | | | | | | This avoids having to define operator< for types where operator== is required but operator< doesn't make any sense (e.g. QGeoCoordinate). Change-Id: I81f6a9d8fc0009a4514c974b5e02b446c50d1e31 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove qRegisterSequentialContainer, qRegisterAssociativeContainer tracesKai Koehne2015-01-071-5/+2
| | | | | | | | | | | The methods where introduced with commit 01fb843af88d9, but removed before the next release in a1898f446651. Also add a comment that we should get rid of the special Q_CC_MSVC handling in Qt 6. Change-Id: I8bb992a59f31a0de7e3f14f34d1d4f604ebfe8f3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>