summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatype.h
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-291-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/kernel/qplatformsystemtrayicon.cpp src/gui/kernel/qplatformsystemtrayicon.h src/plugins/platforms/xcb/xcb-plugin.pro Change-Id: I00355d3908b678af8a61c38f9e814a63df808c79
| * MSVC: Restore 'public' accessibility of QMetaType member functionsAndy Shaw2014-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | They were made 'private' as a side effect of a change enabling support of template friends for MSVC. However, accessibility is part of the MSVC's name mangling and thus BC was broken. [ChangeLog][Important Behavior Changes] Restored binary compatibility with Qt 5.3.2 on Windows when using MSVC 2012 or MSVC 2013. This means that Qt 5.4.1 is no longer binary compatible with Qt 5.4.0 when using either of those compilers. Change-Id: I18679aa15821a7365606dc80fdc8411641573820 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Implement proper C++ type numeric promotion for QVariant comparisonsThiago Macieira2014-12-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, QVariant would try to convert one operand to the other's type, which would produce unexpected results: the results would depend in the order of the operands and whether there was data loss in the conversion. In addition, ordering comparisons were only done with signed values, yielding other unexpected results, like QVariant(LLONG_MAX / 2) < QVariant(Q_UINT64_C(0)). Instead, try to obey the C++ standard rules for type promotion in expressions. Our code is a little simpler than the standard would seem to require since we know some more details from the ABI. [ChangeLog][Important Behavior Changes][QVariant] QVariant now obeys the C++ type promotion rules when comparing numeric types (integrals, float and double), including the fact that unsigned comparisons are preferred for types of the same rank (that is, now QVariant(-1) > QVariant(0U)). Task-number: QTBUG-42722 Change-Id: Ie7b19073dcb45485354710975e561bcdb1a753f1 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Remove unused private apiJędrzej Nowacki2014-11-191-14/+0
| | | | | | | | | | Change-Id: Iffe5a33b8a1f134d722371a9e92ba9c9d13c51f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Reduce code bloat, by cleaning up QMetaTypeFunctionHelperJędrzej Nowacki2014-11-171-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create and Delete wrappers are not necessary, because they can be easily simulated with Construct and Destruct. This change removes redundant function wrappers and a bit of over-optimized code. Gain is quite big: Before: text data bss dec hex filename 5366008 47460 14904 5428372 52d494 libQt5Core.so.5.5.0 505578 7060 2124 514762 7daca libQt5DBus.so.5.5.0 5591079 134656 6728 5732463 57786f libQt5Gui.so.5.5.0 1398785 31676 2576 1433037 15ddcd libQt5Network.so.5.5.0 6642431 220952 2536 6865919 68c3ff libQt5Widgets.so.5.5.0 After: text data bss dec hex filename 5342559 47460 14904 5404923 5278fb libQt5Core.so.5.5.0 496025 7068 2124 505217 7b581 libQt5DBus.so.5.5.0 5579291 134272 6728 5720291 5748e3 libQt5Gui.so.5.5.0 1389461 31676 2576 1423713 15b961 libQt5Network.so.5.5.0 6637139 220952 2536 6860627 68af53 libQt5Widgets.so.5.5.0 Cost of the change, is moved to CPU while calling QMetaType create() and destroy(), these two functions became a bit slower. The cost should not be visible, because they call operator new anyway. Change-Id: I34fd410343377d9c29925675d7da8172bfda9ce6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Let QMetaType know which types are Q_GADGETOlivier Goffart2014-11-161-3/+19
| | | | | | | | | | | | | | | | | | This is required so we can take a QVariant and detect that it contains a Q_GADGET and then use method like QMetaType::metaObject and QMetaProperty::write with the QVariant::data Change-Id: I3603692e4e84426e10bf59949e3def3ea4947bec Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Add QMetaType::type(QByteArray) functionKent Hansen2014-10-311-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMetaType::type(const char *) requires that the string argument is 0-terminated. This new overload makes it possible to query the type of a string with an explicit length. In particular, QByteArrays constructed by QByteArray::fromRawData(), for example from a substring of a normalized method signature (the "int" part of "mySlot(int"), can now be queried without making a copy of the string. Also, Qt5 meta-objects represent type names as QByteArray literals, which can be fed directly to this new QMetaType::type() overload (no need to call strlen). Change-Id: I60d35aa6bdc0f77e0997f98b0e30e12fd3d5e100 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-271-0/+15
|\| | | | | | | | | | | | | Conflicts: src/gui/text/qfontdatabase.cpp Change-Id: I6ac1f55faa22b8e7b591386fb67f0333d0ea443d
| * Fix QVariant associative container conversion from built-in types.Jędrzej Nowacki2014-10-241-0/+15
| | | | | | | | | | | | Task-number: QTBUG-41403 Change-Id: I9dab0f9450cac11678eb6d20abd2dd08e86e0900 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-291-19/+11
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/image/qimage.cpp src/gui/image/qppmhandler.cpp src/gui/kernel/qguiapplication.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765