[qt/qt/qtbase]: Summary of bulk changes made

KDE Git Services - Bulk Change <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git repository change summary for qt/qt/qtbase
Pushed by mirror-service into branch '6.12'.
Changed from f77e3b2df28bc10400853dd52734dab304f64db7 to 9a2bd5ae09b64b669e794dd54e0c90d7cfaab63f
Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository.

This change contains the following new commits:

Git commit 9a2bd5ae09b64b669e794dd54e0c90d7cfaab63f by Qt Cherry-pick Bot (on behalf of Marc Mutz) on 27/07/2026 at 06:12..
Deprecate Q_FLAGS and Q_ENUMS

These have effectively been deprecated since Qt 5.5, but we forgot
to remove them for 6.0 (and maybe that's just as well, because
there was no compiler-warning about them being deprecated).

Immediate (6.12) deprecation is therefore warranted.

The question, so far, was: how?

Clang has a mechanism to enable deprecation warnings for macros,
presumably added so that libc++ can deprecate ATOMIC_VAR_INIT.
Use that to back a new QT_DEPRECATION macro for macros.

GCC doesn't have something similar, yet, so I requested it as a
new feature: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122667
We could potentially use pragma(GCC warning) in the expansion of
these macros, but that would look different, and have different
syntax, so it's not done in this patch.

As Moss found out, MSVC also supports macro deprecation similar to
Clang via `#pragma deprecated("macro")`, albeit without the
deprecation _message_. Use it nonetheless. Claude claims clang-cl
never implemented the MSVC syntax. Didn't verify, since the Clang one
is better, anyway.

IMHO, having at least two of the major compilers warn about this is
user benefit enough for us to add it to our deprecation framework,
so do that and use it to deprecate Q_FLAGS and Q_ENUMS. There is no
need to guard the #define's under Q_MOC_RUN, as moc won't warn,
anyway.

Suppress warnings in tst_moc.

[ChangeLog][QtCore][QObject] Use of deprecated Q_FLAGS and Q_ENUMS
macros now causes deprecation compiler warnings on compilers that
support deprecating preprocessor macros (only Clang and MSVC, at
this time).

Done-with: Moss Heim <[email protected]>
Task-number: QTBUG-99060
Change-Id: I0e87cd3179d6a1f8f28c1c87c1fd4faa32548de5
Reviewed-by: Thiago Macieira <[email protected]>
(cherry picked from commit dbbd4846b66a320b099d85bd20b127237182e482)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
https://invent.kde.org/qt/qt/qtbase/-/commit/9a2bd5ae09b64b669e794dd54e0c90d7cfaab63f
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.