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

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
parent 2fe07600
......@@ -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 );
......
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