KApplication::notify

Aaron J. Seigo aseigo at kde.org
Wed Dec 27 22:58:10 GMT 2006


hi =)

yesterday i spent time during compiles looking through kapplication and 
drawing up a diagram for how the various methods interact with each other.

turns out there are still several in there that really don't belong, such as 
tempSaveName, which will be addressed this coming monday.

one of the other methods caught my eye in the process: notify. this method is 
called for pretty well each and every event passed through the app. notify 
was doing three things:

 - ensuring ctrl+u works in line edits
 - ensuring that KStandardShortcut::selectAll() is honored in QLineEdits and 
QTextEdits
 - helping with startup notification

the latter seems to be working fine in qt4 right now, so this code shouldn't 
be needed anymore. this is particularly nice since it was code run for every 
event for the life of the app and applied to every top level window.

ctrl+u is now in qt4, though it behaves slightly differently than how we had 
it: it clears the entire line rather than deleting the line from where you 
are. it's debatable imho which is better, but i'm happy delegating this to 
qt.

select all in qt4's text widgets is ctrl+a. in kde it's configurable for 
applications and we try and respect that in line/textedits as well. this is 
nice for consistency but comes at a performance cost for our apps. moreover, 
how many people actually change the "select all" shortcut?

my proposal is therefore that we (i) remove KApplication::notify this coming 
monday. it's one less symbol and less code executed on each event.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20061227/a44dbffd/attachment.sig>


More information about the kde-core-devel mailing list