[Development] Moving QUndoStack and QUndoCommand out of QtWidgets

Anselmo L. S. Melo anselmo.melo at openbossa.org
Fri Feb 3 14:09:24 CET 2012


On 12/15/2011 07:10 PM, Olivier Goffart wrote:
> On Thursday 15 December 2011 18:40:45 Jesus Sanchez-Palencia wrote:
>> Hi there,
>> I would like to gather your opinion on whether we should move
>> QUndoStack and QUndoCommand out of QtWidgets so they could be used
>> without requiring this module as an extra dependency.


>> After a brief investigation, I believe this could done by:
>> 1- moving QUndoCommand entirely;
>> 2- moving QUndoStack without moving the APIs that rely on or need
>> QAction (QAction *createUndoAction() and QAction *createRedoAction());
>> 3- creating a new class (QUndoStackAction ??) inside QtWidgets and
>> implement the APIs mentioned above there (createUndoAction and
>> createRedoAction);
>> 4- applying the same logic to QUndoGroup.
>> QtWebKit, for instance, would benefit from this immediately, as we aim
>> on removing the QtWidgets dependencies.
>> Suggestions, comments and any sort of feedback here would be more than
>> welcome.
> I beleive QAction should also be moved back in QtGui

I did some experiments about it yesterday, doing a mix of the two suggestions sent to this thread, i.e., moving QUndo{Command,Stack,Group}
and QAction out of QtWidgets. QtGui was built successfully, however, before procced to do the adjustments needed in QtWidgets, I considered
important to ask for feedback regarding this task.

A question related to the feature freeze: Should I create a new task on JIRA for it, or reopen this old one:
https://bugreports.qt-project.org/browse/QTBUG-3415 ?

Back to the topic: The current status is: QUndo{Command,Stack,Group} and QAction where moved out of QtWidgets and renamed to temporary (and
IMHO bad) names like QGuiUndo{Command,Stack,Group} and QGuiActuion, so the QtWidgets subclasses would maintain the original names, to not
introduce additional SiC between Qt4/QtGui->Qt5/QtWidgets. Any suggestions regarding names here?

Feedback is appreciated.


Anselmo L. S. Melo
openBossa / INdT

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120203/8669748e/attachment.sig>

More information about the Development mailing list