commit bbe998b3f3285ad09e0b464fbac9673d3c62c271 Author: Andrea Iacovitti <aiacovitti@libero.it> Date: Sat Jul 9 19:51:40 2011 +0200 Backport to KDE/4.6 Fix regression about input text clearButton stopping to work on khtml forms BUG: 246513 CCMAIL: kde@opensource.sf-tec.de diff --git a/kdeui/widgets/klineedit.cpp b/kdeui/widgets/klineedit.cpp index 7eb8bdc..09c1ebf 100644 --- a/kdeui/widgets/klineedit.cpp +++ b/kdeui/widgets/klineedit.cpp @@ -1095,7 +1095,7 @@ void KLineEdit::mousePressEvent( QMouseEvent* e ) if ( (e->button() == Qt::LeftButton || e->button() == Qt::MidButton ) && d->clearButton ) { - d->clickInClear = d->clearButton == childAt( e->pos() ); + d->clickInClear = ( d->clearButton == childAt(e->pos()) || d->clearButton->underMouse() ); if ( d->clickInClear ) { d->possibleTripleClick = false; @@ -1114,7 +1114,7 @@ void KLineEdit::mousePressEvent( QMouseEvent* e ) void KLineEdit::mouseReleaseEvent( QMouseEvent* e ) { if ( d->clickInClear ) { - if ( d->clearButton == childAt( e->pos() ) ) { + if ( d->clearButton == childAt(e->pos()) || d->clearButton->underMouse() ) { QString newText; if ( e->button() == Qt::MidButton ) { newText = QApplication::clipboard()->text( QClipboard::Selection );