8fed0a6aa6
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> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
conanfile.py | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake | ||
sync.profile |