Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add QT_NO_STD_FORMAT_SUPPORT definition to disable std::format support
The outcome from the QtCS discussion [0] was that we want to add std::format support directly into the Qt class' header, so that the users do not need to include anything extra to be able to use it. This, however, means that many of Qt headers would include <format>, which itself is quite heavy. As a result, we decided to add a define that allows to disable std::format support, if the users do not need it. This patch introduces QT_NO_STD_FORMAT_SUPPORT as such definition. Users can define it in their projects. It is also defined for Qt for now, because we cannot use std::format inside Qt anyway. Note that we cannot use compile-time QT_FEATURE for that, because Qt itself can be configured with different parameters than the user project. This patch does not add any public documentation for the definition, because it's not yet clear where to provide these docs. However, it adds some comments that would hopefully clarify the situation with the macros. [0]: https://wiki.qt.io/QtCS2024_std::format Fixes: QTBUG-128779 Change-Id: Ie3041966c3a2131e3b47750fbe6831e11b4b74cc Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
- Loading branch information