blob: 31589294073204e42e4aab0102cb7bee6e2f386a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
commit 0b7201c1fe4f12dc7b17abbf19047864d1cca302
Author: Andrea Iacovitti <aiacovitti@libero.it>
Date: Sat Jul 9 19:51:40 2011 +0200
Fix regression about input text clearButton stopping to work on khtml forms
BUG: 246513
FIXED-IN: 4.7.0
diff --git a/kdeui/widgets/klineedit.cpp b/kdeui/widgets/klineedit.cpp
index 7382806..8f1c8a4 100644
--- a/kdeui/widgets/klineedit.cpp
+++ b/kdeui/widgets/klineedit.cpp
@@ -1116,7 +1116,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;
@@ -1145,7 +1145,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 );
|