summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtmetamacros.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove QNotifiedProperty and Q_PRIVATE_QPROPERTYLars Knoll2020-09-021-35/+0
| | | | | | | | | | | | | And all related functionality. This is being replaced by Q_BINDABLE_PROPERTY and Q_OBJECT_BINDABLE_PROPERTY in the next few commits. The new infrastructure coming will play nicer along with the existing property system. Commented out some autotests, that will get reimplemented with the updated infrastructure. Change-Id: I50c30bd4d5c6c6b6471f8eb93870e27d86f5a009 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Replace Qt CONSTEXPR defines with constexprAllan Sandfeld Jensen2020-08-141-4/+4
| | | | | | | | Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QObject/Q_OBJECT: remove deprecated old APIEdward Welbourne2020-08-141-2/+0
| | | | | | | Since 5.0, trUtf8(), qFindChild() Change-Id: I7bc0d125f92faebf24a422c1aac528a3f4687434 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove deprecated empty macroLars Schmertmann2020-07-021-3/+0
| | | | | Change-Id: Ib2a646ee22a7f97dae584e6f068f17378fe2b494 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* moc: Fix QProperty code generationFabian Kosmale2020-06-251-3/+3
| | | | | | | | | | | | | | | | This addresses two issues: 1. The generated code for QNotifiedProperty<T, ...> was broken when T is a pointer. Notably, const S* & is not a constant reference to S*. This is addressed by consistently using T const& instead of const T&. 2. The Q_PRIVATE_QPROPERTY approach assumed that the property name and the getter are equal. This does break when they are not, and we are unable to change either of them due to API compatibility concerns. An example of this would be QQuickItem's parent property with a parentItem getter. Therefore, we now allow the usage of NAME to override the name of the property. Change-Id: Idf2e85576c74371b5b0f6db15dbe6f2d17c5e33d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Cleanups in QMetaPropertyFabian Kosmale2020-06-111-1/+1
| | | | | | | | | 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>
* Attempt to squeeze unionized fake qproperty members even furtherSimon Hausmann2020-04-301-2/+9
| | | | | | | | | ... by using the [[no_unique_address]] attribute, if available, instead of the union. Change-Id: Iab4db7039f1140a0005c7dd2fb6e08597ceec8f5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Provide a way of exposing private QProperties with a fake APISimon Hausmann2020-04-301-0/+32
| | | | | | | | | | | | The API reduces the amount of manual plumbing required to offer a conceptual property through the traditional setter/getter API as well as through QProperty<T> API. Since the latter would require inlining the type and thus making it impossible to add new properties without breaking binary compatibility, this patch introduces a fake API that behaves similar but does not contain the property by value. Change-Id: Ib9bccd867f0e4e36a520e5583ba348e728284253 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: Extend revision markers to allow for major and minor versionUlf Hermann2020-02-071-2/+2
| | | | | | | | | | | | | As we want Qt's own revisions to follow the Qt versioning scheme, we need to allow for the minor version to reset to 0 now. In order to facilitate this, we interpret the argument passed the current Q_REVISION macro as major version and allow for an optional minor version. Both are encoded it into the resulting revision number. Change-Id: I3519fe20233d473f34a24ec9589d045cdd162a12 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Introduce Q_MOC_INCLUDEOlivier Goffart2020-01-171-0/+1
| | | | | | | | A new macro that can be added in the header file parsed by moc to tell moc to include that file in the generated file Change-Id: I03ad702c3fcd8380371015f226ee4b7456daf132 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use Q_NAMESPACE for the Qt namespace, and remove the old moc hack to support itOlivier Goffart2019-12-061-0/+233
Since I can't #include qobjectdefs from qnamespace because of circular dependency, move the Qt macro in the qtmetamacros.h header. Deprecate QObject::staticQtMetaObject since now one can just use Qt::staticMetaObject Change-Id: I11982aa17c2afa2067486b113f8052672f3695eb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>