Commit cc0c1afd authored by Andrea Iacovitti's avatar Andrea Iacovitti
Browse files

Fix regression about input text clearButton stopping to work on khtml forms

BUG: 246513
parent 1bd0f699
...@@ -1116,7 +1116,7 @@ void KLineEdit::mousePressEvent( QMouseEvent* e ) ...@@ -1116,7 +1116,7 @@ void KLineEdit::mousePressEvent( QMouseEvent* e )
if ( (e->button() == Qt::LeftButton || if ( (e->button() == Qt::LeftButton ||
e->button() == Qt::MidButton ) && e->button() == Qt::MidButton ) &&
d->clearButton ) { d->clearButton ) {
d->clickInClear = d->clearButton == childAt( e->pos() ); d->clickInClear = ( d->clearButton == childAt(e->pos()) || d->clearButton->underMouse() );
if ( d->clickInClear ) { if ( d->clickInClear ) {
d->possibleTripleClick = false; d->possibleTripleClick = false;
...@@ -1145,7 +1145,7 @@ void KLineEdit::mousePressEvent( QMouseEvent* e ) ...@@ -1145,7 +1145,7 @@ void KLineEdit::mousePressEvent( QMouseEvent* e )
void KLineEdit::mouseReleaseEvent( QMouseEvent* e ) void KLineEdit::mouseReleaseEvent( QMouseEvent* e )
{ {
if ( d->clickInClear ) { if ( d->clickInClear ) {
if ( d->clearButton == childAt( e->pos() ) ) { if ( d->clearButton == childAt(e->pos()) || d->clearButton->underMouse() ) {
QString newText; QString newText;
if ( e->button() == Qt::MidButton ) { if ( e->button() == Qt::MidButton ) {
newText = QApplication::clipboard()->text( QClipboard::Selection ); newText = QApplication::clipboard()->text( QClipboard::Selection );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment