Replacement for Qt's Undo Framework

Alexander Potashev aspotashev at gmail.com
Tue Apr 26 18:05:40 BST 2011


2011/4/26 Aaron J. Seigo <aseigo at kde.org>:
> On Monday, April 25, 2011 22:12:55 Alexander Potashev wrote:
>> What do you think about inclusion of KUndo*2 into kdelibs?
>
> we really don't want more duplication of code and effort between Qt and
> kdelibs, and we certainly don't want forks of Qt code in kdelibs.
>
> please work on having this fixed in Qt itself, which is the correct/best place
> for this effort. it would be good to have this improved, and it's great that
> you're willing to work on it :)

Attempts to fix the bug in Qt are going to look very hacky (and those
hack will most likely not be accepted for inclusion in Qt), or even
break the Qt API (as Albert has also written).

Example: The prefix "Undo"/"Redo" is stored in an instance variable
(m_prefix) of QUndoAction. If we still allow custom prefixes
(otherwise it will be an API breakage), we need to keep m_prefix. This
will lead to unnecessary memory usage for it.

> in the code you've written, i see in the #includes KLocale as well as some
> "kis_" files. i didn't see any actual use of KLocale, however? is there any
> actual use of kdelibs in your work (hopefully not, as that would make a Qt
> target easier), are there any binary incompatible changes (again, hopefully
> not... :)

KLocale is here for i18n() (i18n("Undo %1"), i18n("Undo action"), etc).
The "kis_" includes were left over after copying KUndoView2 from
Krita's KisUndoView, they can be removed.


-- 
Alexander Potashev




More information about the kde-core-devel mailing list