[CRASH] KLineEdit Crashes on an undo

Carsten Pfeiffer carpdjih at sp.zrz.tu-berlin.de
Sat Apr 13 22:28:49 BST 2002


On Sunday 14 April 2002 00:49, Richard Newton wrote:

> A fix in KLineEdit::clear() which went in on 23 March (revision 1.143
> according to the WebCVS) can cause and KLineEdit to crash on an undo
> command.

Hmm, bad :-/

> The problem in KLineEdit (and until recently QLineEdit which did exactly
> what was done here) is that it screws up the undo function.  If you put

Good point.

> some text in a lineedit and then do a clear followed by an undo, the
> behaviour is incorrect.  Worse is if the line of text is only one
> character, the after a clear followed by and undo, the program will
> segfault.

But that's a Qt bug then, no? Did you report that?

> The fix in qt was to make the behaviour of clear equivalent to doing a
> select all followed by a delete.  This apparently causes some unwanted side
> effects, so another way needs to be found.

Are you speaking of qt-rsync? I got a reply from qt-bugs to my report and he 
said the problem was fixed. So I hope we can remove the setText( 
QString::null ) and simply call QLineEdit::clear() soon.

Cheers
Carsten Pfeiffer




More information about the kde-core-devel mailing list