summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobjectbuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QMetaObjectBuilder: Avoid arithmetic on null pointerFabian Kosmale2024-01-191-2/+2
| | | | | | | | | | | | In Prepare mode, "buf" is a null pointer. We never dereference it, but we still compute an offset from it to obtain a pointer to a (then unused) QMetaObjectPrivater. clang's UBSan complains about this, so initialize the pointer to nullptr instead when in Prepare mode. Pick-to: 6.7 6.6 6.5 Change-Id: Id9d78058f72bb1b44440d07f565374f3eb3c20fd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: Record types of enumerationsUlf Hermann2023-03-311-1/+28
| | | | | | | | | | | This will be helpful in a number of places, in particular in order to support enums of different sizes in QML. We record the type as string in the JSON output and as QMetaTypeInterface in the generated C++. Task-number: QTBUG-112180 Change-Id: I943fac67f8b25b013d3860301416cdd293c0c69e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix for a duplicate macro definitionAmir Masoud Abdol2023-02-211-0/+3
| | | | | | | | | | | ALIGN was conflicting with a system macro, /SDKs/MacOSX13.1.sdk/usr/include/arm/param.h. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ia460ee781f8bd1a1cdcff0371efab784c9eebb57 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QtCore: Disambiguate static variablesFriedemann Kleint2023-02-021-3/+3
| | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I5f1fbee07872a742a78adc9864fe00c710ca24d0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaObject: add revision 11 for Qt 6.5Thiago Macieira2022-08-251-1/+1
| | | | | | | | | | | | | | | We changed qTryMetaTypeInterfaceForType() so it does record void and void* (see commit 2d0c31e7d92a3e9df4ce2b9c1d41b94fb12735fc and commit 3695b35dfc427f274e55f8e2a6a9876deb52f1b4). By incrementing the revision number, we make it possible to determine at runtime whether the new information ought to be present. We may add even more types (namely, non-const references) before 6.5.0 is out. For pointers, the restriction remains that the metatype is recorded only if the pointer is a pointer to a complete type. Change-Id: Ic6547f8247454b47baa8fffd170dad79b1a90f6b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QMetaObjectBuilder: Always set Data::metatypesFabian Kosmale2022-03-021-27/+25
| | | | | | | | | | | The array of metatypes should always contain at least one entry (for the metatype of the current metaobject itself). This prevents crashes in the case of a metaobject without meta-methods and properties (as observed in Qt for Python). Pick-to: 6.2 6.3 Change-Id: I7a6fb316eea48c4852b6f1c26e0a930aeba4c799 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QMetaObjectBuilder: fix addProperty() recording of the property typeThiago Macieira2022-02-161-1/+1
| | | | | | | | | | | | Issue introduced by commit 465701bb98f3c3454d15c22b8e38ab4ad8821dfc. [ChangeLog][QtCore][QMetaObjectBuilder] Fixed a bug that would cause addProperty() to use the incorrect type for the property if the property's name matched a valid type registered with QMetaType. Pick-to: 6.2 6.3 Change-Id: Ic15405335d804bdea761fffd16d402f2c9611f30 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Deduplicate offset calculation in QMetaObjectBuilderIvan Tkachenko2021-07-271-1/+1
| | | | | | | | | | | | Not even an optimization (unless your compiler sucks). Just improves readability, since offset is already calculated few lines above. Offset formula used to be somewhat more complicated, but since commit e58b44d557b859b7b55869f1e137aa1bc8968307 it became reusable here. Change-Id: I4128b2643daf2cb112c9b861342fd0e27c9a1a95 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QMetaObjectBuilder: replace an int with QFlagsGiuseppe D'Angelo2021-05-131-3/+3
| | | | | | | | | The int was used as a flag the entire time, except in one stance. So just use the right QFlags type instead, and replace that one usage with a call to toInt(). Change-Id: I3670e6afdc244df69189dd15b8c2c34573476e2f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaMethod: Store method constness in metaobject systemFabian Kosmale2021-05-071-0/+22
| | | | | | | | | [ChangeLog][QtCore][QMetaMethod] It is now possible to query the constness of a method with QMetaMethod::isConst. Change-Id: I8a94480b8074ef5b30555aeccd64937c4c6d97d4 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Silence MSVC warning about int/size_t mismatchVolker Hilsheimer2021-05-061-2/+2
| | | | | | | | | | | | | | | Warning was qmetaobjectbuilder.cpp(1439): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data Instead of adding another cast in that line, fix the warning by making the size variable a qsizetype, and remove the now unnecessary static_cast to int. Pick-to: 6.1 Change-Id: Ieff9330501f5a07c4bbe1e851a3ef211f8bf2d24 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Introduce QMetaObject::metaTypeFabian Kosmale2021-03-251-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This function returns the metatype corresponding to the metaobject, or an invalid metatype for namespaces. This works as follows: First we increment the metaobject revision for new metaobjects. Metaobjects with older revisions are handled by doing a lookup by name. That fallback is also used for dynamic metaobjects (from QtDBUS and those created by QMetaObjectBuilder). For new metaobjects, we store the metatype in its metatype array, behind the property metatypes. This avoids any changes to the property and method metatype extraction logic: For properties, the metatype access does not change, as the new metatype is after their metatypes. For method metatypes, we already have an indirection layer (using offsets), so by adjusting those offsets by one, the same logic keeps working. To distinguish between namespaces and dynamic metaobjects, namespaces store the metatypeinterface pointer for void in the metatype array, whereas dynamic metaobjects store a nullptr. One nice additional benefit is that this simplifies the generator logic in moc, as the metatype array is now never empty. Task-number: QTBUG-92077 Change-Id: Id3f920f28553f12032a71a1a87dad29e5374dbe7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* QMetaObjectBuilder: remove unused serialization codeFabian Kosmale2021-03-201-268/+0
| | | | | Change-Id: I73a13265a69079581d2974400b3311d3fdfda2d0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaObjectBuilder: use constexpr ifFabian Kosmale2020-12-091-37/+43
| | | | | Change-Id: I23319c263447714b280e9ba9da72162e19fe4e1b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2020-11-301-3/+3
| | | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this patch should have no impact on users. Pick-to: 6.0 Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* QMetaProperty::typeName: use name from metatypeFabian Kosmale2020-11-301-7/+8
| | | | | | | | | | | | | | | Except for types marked as unresolved, we're doing it anyway - the only difference is that now we skip looking up the metatype by typeid. [ChangeLog][QMetaProperty][Important Behavior Change] QMetaProperty::typeName returns now always the same name as name() of the corresponding metatype. This can cause a change for enum properties which were not fully-qualified. Change-Id: I1f57743948b7262ac06095d3bbc838d620f6e481 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QMetaObjectBuilder: remove relocatable data supportFabian Kosmale2020-11-301-80/+9
| | | | | Change-Id: I6f1dc9e81723e9a8af8988a8cb45c63c05214296 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QMetaPropertyBuilder: carry metatypeFabian Kosmale2020-11-301-3/+13
| | | | | | | | | | Properties of non-dynamic classes always have the metatype stored, so we can make use of it. Moreover, when the builder is converted into a metaobject, we need to resolve the metatype anyway. As a driveby, add a dedicated metatype test to tst_qmetaobjectbuilder. Change-Id: I7eea0cd8fc2da5d92c7fc803f05cd81e3a9d4cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Whitespace cleanup in corelib/kernelAllan Sandfeld Jensen2020-10-241-50/+47
| | | | | Change-Id: If061ef0af5ced4384e20a82afcea3712fa7e45d7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use qmetaobject_p.h's MetaObjectFlag in QMetaObjectBuilderEdward Welbourne2020-10-201-2/+2
| | | | | | | | This saves duplicating them with its own flags. Task-number: QTBUG-85700 Change-Id: I9e938322fd787282cfd9f941f83af8c0d76aaa9d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Replace Q_DECL_UNUSED with [[maybe_unused]]Allan Sandfeld Jensen2020-10-031-1/+1
| | | | | | | Use C++17 attribute directly Change-Id: Id853e7a5117065e4adb549f81303c1820fe198ce Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaPropertyBuilder: support bindable flagFabian Kosmale2020-09-231-0/+21
| | | | | Change-Id: I0d6ad00e49fd5df4c3b9c0692839404d53d8f6ed Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use C++17 [[maybe_unused]]Allan Sandfeld Jensen2020-09-061-1/+1
| | | | | | | In some places needs to be ordered before const/constexpr though. Change-Id: I57a521ac0ad22b5a018761c4d52befbef69d64c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Deprecate the static int based API in QMetaTypeLars Knoll2020-08-241-7/+7
| | | | | | | | | | | | | And remove one of the type id to name mapping that still existed in QMetaType. QMetaTypeInterface can provide that, so there's no need to have a second copy of the data. qMetaTypeTypeInternal() can still map all the names of all builtin types to ids. That functionality is for now still required by moc and can't be removed yet. Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Another round of 0->nullptr cleanupAllan Sandfeld Jensen2020-07-311-1/+1
| | | | | Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix some MSVC int conversion warningsFriedemann Kleint2020-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | kernel\qmetaobjectbuilder.cpp(1279): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data kernel\qmetaobjectbuilder.cpp(1432): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data sax\qxml.cpp(1275): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data text\qtextengine.cpp(2664): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2665): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2706): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2707): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data itemviews\qbsptree.cpp(60): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) kernel\qprintengine_win.cpp(1558): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(804): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(822): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(1585): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(1602): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data windows\qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data Change-Id: I04fbe17b9782f4c2704933fc005449b1e992475e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use qsizetype in QListLars Knoll2020-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | The change creates a slight source incompatibility. The main things to take care of are * code using printf statements on list.size(). Using qsizetype in printf statements will always require a cast to work on both 32 and 64 bit. * A few places where overloads now get ambiguous. One example is QRandomGenerator::bounded() that has overloads for int, uint and double, but not int64. * Streaming list.size() to a QDataStream will change the format depending on the architecture. [ChangeLog][QtCore][QList] QList now uses qsizetype to index into elements. Change-Id: Iaff562a4d072b97f458417b670f95971bd47cbc6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QList instead of QVector in corelib implementationJarek Kobus2020-06-291-1/+1
| | | | | | | | Omitting state machine and docs for now. Task-number: QTBUG-84469 Change-Id: Ibfa5e7035515773461f6cdbff35299315ef65737 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Port Q_STATIC_ASSERT(_X) to static_assertGiuseppe D'Angelo2020-06-191-1/+1
| | | | | | | | | | | | | | | | | There is no reason for keep using our macro now that we have C++17. The macro itself is left in for the moment being, as well as its detection logic, because it's needed for C code (not everything supports C11 yet). A few more cleanups will arrive in the next few patches. Note that this is a mere search/replace; some places were using double braces to work around the presence of commas in a macro, no attempt has been done to fix those. tst_qglobal had just some minor changes to keep testing the macro. Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add some support to flag alias propertiesLars Knoll2020-06-111-0/+23
| | | | | | | | | | | This is required if we want to be able to get rid of the property cache. Also reserve a flag for var properties, in case it turns out that we need to keep the distinction between var and QVariant properties in QML. Change-Id: I55c2191adcc2d94bd8f148216e26423defaa900f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Get rid of the obsolete isEditable flag for propertiesLars Knoll2020-06-111-27/+0
| | | | | | Change-Id: I54411bd8e223671523c9c8fad5c80bfa6b5b7097 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Cleanups in QMetaPropertyFabian Kosmale2020-06-111-67/+12
| | | | | | | | | This changes the layout of the meta object data, so also bump the meta object revision. Original-patch-by: Lars Knoll <lars.knoll@qt.io> Change-Id: I176fb16c207e8ebe59e358e69554be813406232f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Clean up QMetaEnum codeLars Knoll2020-06-111-3/+3
| | | | | | Change-Id: I9c1fcfd72890fb3d69d2d9caed7f3cff931c3ff6 Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* MetaObject: Store the QMetaType of the methodsFabian Kosmale2020-06-021-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | This does the analog of 46f407126ef3e94d59254012cdc34d6a4ad2faf2 for the methods we care about (signals, slots, Q_INVOKABLEs). In addition to the actual QMetaType, we store an array with offsets so that we later can do a mapping from methodIndex to metatype. The newly added QMetaMethod::{return,parameter}MetaType methods can then be used to retrieve the metatypes. This does however require that all involved types are complete. This is unfortunately not a feasible requirement. Thus, we only populate the metatype array on a best effort basis. For any incomplete type, we store QMetaType::Unknown. Then, when accessing the metatype, we fall back to the old string based code base if it's Unknown. Squashes "moc: support incomplete types" and "Fix compile failures after QMetaMethod change" Fixes: QTBUG-82932 Change-Id: I6b7a587cc364b7cad0c158d6de54e8a204289ad4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove deprecated functionality in QMetaObjectBuilderShawn Rutledge2020-05-131-11/+0
| | | | | Change-Id: Ic0539aed854b9bf9b335cbb8030d5a4eb4296a7d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-111-1/+11
|\ | | | | | | | | | | | | Conflicts: tests/auto/network/socket/platformsocketengine/platformsocketengine.pri Change-Id: I22daf269a8f28f80630b5f521b91637531156404
| * Fix warning about QMetaObject::isEditable() being deprecatedThiago Macieira2020-04-091-1/+11
| | | | | | | | | | Change-Id: Ibdc95e9af7bd456a94ecfffd1603f482445bff28 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Fix a few size_t / int conversion warningsFriedemann Kleint2020-04-101-2/+2
| | | | | | | | | | | | | | | | Change the hash function of QTypeRevision and QtFontFallbacksCacheKey to use size_t and add a few casts. Change-Id: I89a8fc617abbe8b0c67529ec41795691c99b0574 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix warning in qmetaobjectbuilder.cppMitch Curtis2020-03-101-1/+1
| | | | | | | | | | | | | | | | src\corelib\kernel\qmetaobjectbuilder.cpp(1489): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data Change-Id: I9cf9bdcb62b796eb8d3f3c633640b648cb11b39f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | MetaObject: store the QMetaType of the propertiesOlivier Goffart2020-02-251-0/+15
| | | | | | | | | | Change-Id: I563e7232b70e94de4184f2c23a581319313dcf5c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-091-16/+16
|\| | | | | | | Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
| * Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-16/+16
| | | | | | | | | | | | | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Change representation of string data in the meta objectLars Knoll2019-12-081-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Don't store our string data as QByteArrayLiterals anymore, but revert back to simply storing them as an array of char* and offsets into that array. This is required to be able to inline size and begin into QByteArray itself. Once that change is done, we can then avoid creating copies of the string data again. Change-Id: I362a54581caefdb1b3da4a7ab922d37e2e63dc02 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Replace Q_ALIGNOF usage in qtbase with C++11 alignof keywordVolker Hilsheimer2019-10-291-1/+1
|/ | | | | | | | | | | | | | | | The macro is not documented, so not part of the public Qt API. It is made obsolete by the alignof keyword in C++11. Remove the usage of the macro across qtbase, in particular the workarounds for compilers that didn't support alignof, and that will not be supported in Qt 6. The macro definition is left in place, no need to break existing code. Task-number: QTBUG-76414 Change-Id: I1cfedcd4dd748128696cdfb546d97aae4f98c3da Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Qt6: Fix uninitialized meta objects on WindowsThiago Macieira2019-07-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows has a problem relating to cross-DLL variable relocations: they are not supported. Since QMetaObject's link to the parent class is done via a pointer, every QMetaObject in a DLL or in the EXE that derives from a class from another DLL (such as QObject) will be dynamically initialized. This commit changes the meta object pointers in QMetaObject::d from raw pointers to a wrapper class SuperData, which is almost entirely source- compatible with the pointer itself. On all systems except for Windows with Qt 6, it's binary compatible with the current implementation. But for Windows with Qt 6, this commit will store both the raw pointer and a pointer to a function that returns the QMetaObject, with one of them non-null only. For all meta objects constructed by moc, we store the function pointer, which allows the staticMetaObject to be statically intialized. For dynamic meta objects (QMetaObjectBuilder, QtDBus, QtQml, ActiveQt), we'll store the actual raw pointer. [ChangeLog][QtCore][QMetaObject] Some internal members of the QMetaObject class have changed types. Those members are not public API and thus should not cause source incompatibilities. The macro QT_NO_DATA_RELOCATION existed in Qt 4 but was called Q_NO_DATA_RELOCATION and only applied to Symbian. It was removed in commit 24a72c4efa929648d3afd95b3c269a95ecf46e57 ("qglobal: Remove symbian specific features"). Task-number: QTBUG-38876 Fixes: QTBUG-69963 Change-Id: Id92f4a61915b49ddaee6fffd14ae1cf615525e92 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix QMetaObject naming of class enum flagAllan Sandfeld Jensen2018-08-111-9/+40
| | | | | | | | | Adds an enumName to QMetaEnum to carry the name of the enum since for flags that doesn't match the name of the Qt type, but is needed if the flag is scoped. Change-Id: I1c0f77eb9e40e6fd1eb6a59bea77caf0f33fcf43 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add support for scoped enums to QMetaObjectBuilderMichael Brasser2017-04-241-3/+33
| | | | | | Change-Id: I7b3c3973ff4396a854014f5b2b671b71007e80da Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.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>
* QMetaObjectBuilder: replace index-based for loops with C++11 range-forMarc Mutz2015-10-171-139/+123
| | | | | | | | | | | | | | ...for the recently-introduced std::vector objects (QVector would detach). Also, as a drive-by, reorder two comparisons so the cheaper one is first, twice. Saves 1700B of text size on GCC 4.9 optimized C++11 AMD64 Linux builds. Change-Id: I05a29ef1f2e67c98d26236c2cc40a13856a91af6 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>