summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Iacovitti <aiacovitti@libero.it>2011-09-17 15:57:41 (GMT)
committerAndrea Iacovitti <aiacovitti@libero.it>2011-09-17 15:57:41 (GMT)
commit6828cc00a65f1a1034065c787781043ae16dede8 (patch)
tree48cd00e1e1a6a55979f3a1f8686f1be9dddef2b6
parent4b41e546a12ae4ccf7930f78ed09fe7a6ea745d0 (diff)
Revert my previous changes to klineedit code and attempt to fix the bug
khtml side as David suggested. CCBUG: 282133 FIXED-IN: 4.7.2 CCMAIL: faure@kde.org
-rw-r--r--kdeui/widgets/klineedit.cpp2
-rw-r--r--khtml/rendering/render_form.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/kdeui/widgets/klineedit.cpp b/kdeui/widgets/klineedit.cpp
index c919b99..701b8f1 100644
--- a/kdeui/widgets/klineedit.cpp
+++ b/kdeui/widgets/klineedit.cpp
@@ -1150,7 +1150,7 @@ void KLineEdit::mouseReleaseEvent( QMouseEvent* e )
{
if ( d->clickInClear ) {
if ( d->clearButton == childAt(e->pos()) || d->clearButton->underMouse() ) {
- QString newText = QString::fromLatin1("");
+ QString newText;
if ( e->button() == Qt::MidButton ) {
newText = QApplication::clipboard()->text( QClipboard::Selection );
setText( newText );
diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp
index 24bcbe1..c15247a 100644
--- a/khtml/rendering/render_form.cpp
+++ b/khtml/rendering/render_form.cpp
@@ -1159,7 +1159,7 @@ void RenderLineEdit::slotTextChanged(const QString &string)
if (m_blockElementUpdates) return;
// don't use setValue here!
- element()->m_value = string;
+ element()->m_value = string.isNull() ? DOMString("") : string;
element()->m_unsubmittedFormChange = true;
}