Go to file
Volker Hilsheimer 8fed0a6aa6 Undeprecate QAction::setMenu(QMenu *)
We deprecated QAction::setMenu(QMenu *) in Qt 6.0 because QAction needed
to become part of QtGui, and QMenu is a QtWidgets class. To keep
existing code working, we added a private API operating on QObject *,
and a template overload of setMenu, which allows callers to pass in and
get the object as a QMenu without any change to their code. The
implementation relies on a virtual function in QApplicationPrivate.

This solution might be as good as it gets. Making QAction operate only
on QObject* in the public API breaks exiting widget code, and it is
unlikely that we will come up with a QMenu abstraction that unifies
widgets and Quick UIs without breaking code either.

So, undeprecate the existing solution. If we come up with something
better, we can still deprecate it again in time for removing it in Qt 7.

Pick-to: 6.4 6.3 6.2
Change-Id: I1982b61feb1b1af99f4647e892c5fd74340d9c77
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-07-21 23:11:58 +02:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
bin Minor fixes for qt-configure-module 2022-06-27 17:55:19 +02:00
cmake Add -Wshorten-64-to-32 to headersclean 2022-07-21 17:14:08 +02:00
coin Adjust documentation build dir for out of source builds 2022-06-27 11:05:23 +00:00
config.tests CMake: add one more test for no_direct_extern_access 2022-07-20 14:54:21 -07:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Move the docs for porting to QRegularExpression to a common place 2022-07-20 13:15:59 +02:00
examples Examples: Use signals, slots instead of Q_SIGNALS, Q_SLOTS 2022-07-21 11:24:36 +02:00
lib
libexec Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
LICENSES Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
mkspecs CMake: fix the word order in "no_direct_extern_access" 2022-07-20 14:54:20 -07:00
qmake Doc: Clarify qmake's c++latest CONFIG value 2022-06-29 18:32:05 +02:00
src Undeprecate QAction::setMenu(QMenu *) 2022-07-21 23:11:58 +02:00
tests Do not use QTextFormat::FontFamily when building with QT_DISABLE_DEPRECATED_BEFORE >= 0x060000 2022-07-21 19:59:08 +02:00
util CMake: Rewrite double-conversion find module 2022-07-02 00:11:12 +02:00
.cmake.conf Bump version to 6.5.0 2022-06-06 13:23:59 +03:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Assume qhelpgenerator in libexec instead of bin 2021-11-08 19:27:32 +01:00
.lgtm.yml
.tag
CMakeLists.txt Use REALPATH based check for symbolic links on Windows 2022-01-07 14:31:38 +01:00
conanfile.py Conan: Do not force 'qt_host_path' usage in cross-build context 2022-06-22 18:18:42 +03:00
config_help.txt CMake: update the x86 intrinsic checks 2022-06-28 03:28:42 +00:00
configure Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
configure.bat Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
configure.cmake CMake: disable auto-detection of no_direct_extern_access 2022-07-20 14:54:22 -07:00
dependencies.yaml
qt_cmdline.cmake C++23/c++2b support 2022-06-08 19:43:34 +02:00
sync.profile Remove deprecated qgl.h from sync.profile 2022-06-11 00:42:13 +02:00