[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 'dev'.
Changed from 761a7b10943f38f45d2c26590b7a1457ba918ca5 to dbbd4846b66a320b099d85bd20b127237182e482
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 1a1410e8d01ad6b595ed55c24e4ec4da0a5f38e5 by Thiago Macieira on 26/07/2026 at 18:00..
QHash/Doc: document that emplace() replaces an existing item

Pick-to: 6.12 6.11 6.8
Fixes: QTBUG-146766
Change-Id: I30c15fa86a20e6fa8eb6fffd417ce2ac9141e797
Reviewed-by: Ivan Solovev <[email protected]>
https://invent.kde.org/qt/qt/qtbase/-/commit/1a1410e8d01ad6b595ed55c24e4ec4da0a5f38e5

Git commit dbbd4846b66a320b099d85bd20b127237182e482 by Marc Mutz on 26/07/2026 at 23:03..
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]>
Pick-to: 6.12
Task-number: QTBUG-99060
Change-Id: I0e87cd3179d6a1f8f28c1c87c1fd4faa32548de5
Reviewed-by: Thiago Macieira <[email protected]>
https://invent.kde.org/qt/qt/qtbase/-/commit/dbbd4846b66a320b099d85bd20b127237182e482
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.