summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qtclasshelpermacros.h
Commit message (Collapse)AuthorAgeFilesLines
* Make it possible to use QObjectPrivate::connect in private codeVolker Hilsheimer2023-03-101-1/+10
| | | | | | | | | | | | | | | | | | | | In most QObjectPrivate-subclasses, the Q_DECLARE_PUBLIC macro is used in the private segment of the class declaration. In that case, the q_ptr becomes a private member of the private class, and then the QObjectPrivate::connect function can no longer be used, as it needs to access the d_ptr. Fix this by declaring QObjectPrivate, and the static-assert-helper, as friends of the class using the Q_DECLARE_PUBLIC macro. Adapt the QObject test by moving the Q_DECLARE_PUBLIC macro into the private section of the test-private, and add a compile test. Pick-to: 6.5 6.5.0 Change-Id: Ifc04be3b305221e138b1e08bb3a3838d871f4fcb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove Q_DUMMY_COMPARISON_OPERATORSona Kurazyan2022-08-301-20/+0
| | | | | | | | | | | | | | | | It's not needed for any of our supported compilers and isn't used in Qt codbase anymore. It was only required for IBM xlC compiler, which doesn't seem to support C++17 at the moment (when it does, hopefully they will also fix the issue). [ChangeLog][QtGlobal] Removed the Q_DUMMY_COMPARISON_OPERATOR macro, which was needed to workaround outdated template instantiation rules on some outdated compilers. Fixes: QTBUG-105098 Change-Id: I2b992dd8c0f389d874d2a8521fc1a1aad3f80699 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove unneeded Q_DECLARE_SHARED_IMPLSona Kurazyan2022-08-241-3/+2
| | | | | | | | | | After d06a686cad63474ddb2dfe4a4118c923c805e290, Q_DECLARE_SHARED_IMPL is used only in Q_DECLARE_TYPEINFO, so remove the indirection through Q_DECLARE_TYPEINFO_IMPL. Change-Id: Ida188053c4ea512e9ebdf04f807f86a6159f8425 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Extract header qtclasshelpermacros.hSona Kurazyan2022-08-191-0/+144
Move the class helper macros from qglobal.h and Q_DECLARE_SHARED from qtypeinfo.h there. Task-number: QTBUG-99313 Change-Id: I8c8b6241a76916176a48c09fbaf4effc87683770 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>