Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > cf3451d6b816766353105160f3c6b8ab > files > 13

kdelibs4-4.6.5-1.5.mga1.src.rpm

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 );