From kde-core-devel Mon Apr 25 22:21:02 2011 From: Albert Astals Cid Date: Mon, 25 Apr 2011 22:21:02 +0000 To: kde-core-devel Subject: Re: Replacement for Qt's Undo Framework Message-Id: <201104252321.02596.aacid () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=130376994903219 A Dilluns, 25 d'abril de 2011, Alexander Potashev va escriure: > Hi, > > The Qt's Undo Framework (QUndoCommand, QUndoStack, QUndoGroup, > QUndoView) has a few oddities: > > The solution is to fork QUndo* classes and fix the problems in the new > classes, so did I: > https://github.com/aspotashev/libkundo2 > (the code looks like garbage, I only made it working, but didn't try > to clean it up) > > > I kept the arguments of UndoCommand() the same, but now if you put > something like "Create a document|-|creation of a document" as the > "text" into the constructor (or translate it with a similar string > with "|-|"), you'll get "Create a document" as the name of an item in > Undo History panel, and the "Undo ..." menu item will be called "Undo > creation of a document". This approach seems a bit too fragile to "wrong/careless" translations, though i guess we can always add it to the pology checks > What do you think about inclusion of KUndo*2 into kdelibs? Maybe it would make sense you to improve your code to a point to are happy with it before asking for inclusion? Albert