summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qtdeprecationmarkers.h
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate QDataStream::readBytes(char *&, uint &) instead of removing itIvan Solovev2024-02-071-0/+14
| | | | | | | | | | | | | | | | | | | | | | We cannot remove the overload using QT_REMOVED_SINCE, because a qint64 lvalue in the new overload will not bind to an uint& parameter, so the old code would not compile. Deprecate the old overload, and add a unit-test that makes sure that it still behaves correctly. This commit also introduces the new deprecation macros that are required to do the deprecation in Qt 6.11. Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef Found in 6.7 API review Pick-to: 6.7 Change-Id: I02893bfbe040df736f8e746384e0261a0f0041d3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clear the _X version of alongside the enum deprecatorEdward Welbourne2023-08-111-0/+2
| | | | | | | | | | | | | | | | When QT_NO_DEPRECATED_WARNINGS is defined, we undefine Q_DECL_ENUMERATOR_DEPRECATED as it's used raw (rather than via an intermediary or version-variant). The same is true of its _X() variant, so do the same for this - which involves redefining it to a still function-like macro, so that its parameter gets ignored. This amends commit 59b03992ab332a320ac7cff7c5b099b2c30e14b2 (and shall get conflicts on older branches, before the defines in question moved to qtdeprecationmarkers.h in 6.5). Pick-to: 5.15 6.2 6.5 6.6 Change-Id: If85c135cddbb33e93cb90f400af123c74e0298ac Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Add missing deprecation guardsYuhang Zhao2023-02-211-0/+14
| | | | | | | | | | | | The deprecated implementation of QSharedMemory and QSystemSemaphore are not correctly guarded by the deprecation macros, and thus it's causing compilation errors when we disable deprecated code. As a drive-by, change the deprecate version from 6.9 to 6.10 as requested. Change-Id: Icfed181c27248b9e1381101a64523419097dd1da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qtdeprecationmarkers.h: include qcompilerdetection.hFabian Kosmale2022-09-271-0/+1
| | | | | | | Without it, we do not have Q_DECL_DEPRECATED Change-Id: I6b16176446027e0f7da923f16971e903aacc80d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move docs for deprecation macros to qtdeprecationmarkers.qdocSona Kurazyan2022-09-221-0/+5
| | | | | | | | | | | | | Additionally: - Generate the QtDeprecationMarkers fw header - Add an overview page for QtDeprecationMarkers (otherwise the docs for deprecated QT_DISABLE_DEPRECATED_BEFORE aren't generated) - Fix docs to stop mentioning deprecated QT_DISABLE_DEPRECATED_BEFORE. Task-number: QTBUG-106154 Change-Id: Ic8c45ba3d9d267036ca470b208676a3ac82485eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QT_ASCII_CAST_WARN macro from qglobal.h to qtdeprecationmarkers.hSona Kurazyan2022-08-301-0/+7
| | | | | | | Task-number: QTBUG-99313 Change-Id: I6449f519db3f67ed3d390295b8fa93eff28d7cda Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QLibraryInfo: Add isSharedBuild() function and deprecate qSharedBuild()Yuhang Zhao2022-08-291-0/+14
| | | | | | | | | | | | | | | | | | | Now that there's QLibraryInfo::isDebugBuild(), it's better to also have QLibraryInfo::isSharedBuild() at the same time. It's also a very useful information about the current Qt build. I think debug/release and static/shared are the most important properties of a library, so it's better to have them both. Deprecate the global function qSharedBuild() in favor of the newly introduced QLibraryInfo::isSharedBuild(). As a drive-by, add the nodiscard attribute to both functions. [ChangeLog][QtCore] Added QLibraryInfo::isSharedBuild() and deprecated qSharedBuild(). Change-Id: I48fa0dc5eeca97e709d5267733fa70aae244174f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename QT_DEPRECATED_WARNINGS_SINCE -> QT_WARN_DEPRECATED_UP_TOIvan Solovev2022-08-191-19/+24
| | | | | | | | | | | | | | The new name describes the behavior in a better way. [ChangeLog][Build System] The QT_DEPRECATED_WARNINGS_SINCE macro is renamed to QT_WARN_DEPRECATED_UP_TO. The old name is deprecated, but is still recognized if it is defined during configuration and the new name is not defined. Fixes: QTBUG-104944 Change-Id: I320c033010dfab120db6922598454f95169657f7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Rename QT_DISABLE_DEPRECATED_BEFORE -> QT_DISABLE_DEPRECATED_UP_TOIvan Solovev2022-08-191-6/+11
| | | | | | | | | | | | | | The new name describes the behavior in a better way. [ChangeLog][Build System] The QT_DISABLE_DEPRECATED_BEFORE macro is renamed to QT_DISABLE_DEPRECATED_UP_TO. The old name is deprecated, but is still recognized if it is defined during configuration and the new name is not defined. Task-number: QTBUG-104944 Change-Id: Ifc34323e0bbd9e3dc2f86c3e80d4d0940ebccbb8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove qtnamespacemacros.h and use qtconfigmacros.h insteadSona Kurazyan2022-08-191-1/+1
| | | | | | | Change-Id: Ibae6e6e255c1bb1ee52839a051d585de81833bf9 Pick-to: 6.4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Extract header qtdeprecationmarkers.h from qglobal.hSona Kurazyan2022-07-311-0/+280
Task-number: QTBUG-99313 Change-Id: Ief3d7ddb9dc0962bd3404f1fe61d292f2fe434cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>