[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    KateTemplateHandler vs. textChanged() signal
From:       bbeschow () cs ! tu-berlin ! de
Date:       2010-04-28 11:56:29
Message-ID: 0a9bc3582e9209d0aa524b314fede469.squirrel () mail ! cs ! tu-berlin ! de
[Download RAW message or body]

Hi Kate devs,

I want to improve the grouping of undo items such that it works better for
both the template handler (th) and the autobrace plugin. Especially the th
does some voodoo to get the grouping right - and that is where I need your
help.

The problem is that the th is connected to the
KTE::Document::textChanged() signal, which is emitted when the current
edit is already over. Since that means that the current undo group may
already be closed, it has to reopen it and do its voodoo.

Now the th is also connected to the textRemoved() and textInserted()
signals, which (should?) always preceede the textChanged() signal. Both
signals have the advantage of being emitted *within* the current edit,
where the correct undo grouping comes for free.

To me, it seems that the connection to the textChanged() signal is just
redundant. Is that true, can it be removed? If not, under which
circumstances is it needed?

Any hint is very appreciated.

Greetings,
Bernhard


_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic