[Development] QAction in Qt 6 - next step proposal
Jaroslaw Kobus
Jaroslaw.Kobus at qt.io
Wed Nov 27 12:34:48 CET 2019
> as discussed on the change, there is not much one can do with the newly
> introduced QGuiAction; it serves as a base class for QAction and
> QQuickAction, The naming follows the Q(Gui)Application pattern.
I didn't know that there is going to be one more subclass. Will QQuickAction be a public class?
> This in my opinion is a no-go, we cannot do source-incompatible changes
> in this area because there have been many deprecations already and code
> needs to compile against 5 and 6 with minimal changes.
We have still some time to add a substitution API for these 6 methods,
which are easy 1:1 in porting, to the 5.15 branch and deprecate there
the old methods. This way we could drop them for Qt 6.
Jarek
________________________________________
From: Development <development-bounces at qt-project.org> on behalf of Friedemann Kleint <Friedemann.Kleint at qt.io>
Sent: Wednesday, November 27, 2019 11:19 AM
To: development at qt-project.org
Subject: Re: [Development] QAction in Qt 6 - next step proposal
Hi,
as discussed on the change, there is not much one can do with the newly
introduced QGuiAction; it serves as a base class for QAction and
QQuickAction, The naming follows the Q(Gui)Application pattern.
> QMenu *menu() const;
> -> static QMenu *QMenu::menuForAction(QAction *action);
> void setMenu(QMenu *menu);
> -> static void QMenu::setMenuForAction(QAction *action, QMenu *menu);
This in my opinion is a no-go, we cannot do source-incompatible changes
in this area because there have been many deprecations already and code
needs to compile against 5 and 6 with minimal changes.
Ofc, having one QAction class in QtGui is desirable; but it must not
infer source-incompatible changes (and no, hacks like forward declaring
QWidget from QtGui or similar are also a no-go since it causes trouble
for Qt for Python).
Regards, Friedemann
--
Friedemann Kleint
The Qt Company GmbH
_______________________________________________
Development mailing list
Development at qt-project.org
https://lists.qt-project.org/listinfo/development
More information about the Development
mailing list