summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Iacovitti <aiacovitti@libero.it>2011-09-16 20:51:57 (GMT)
committerAndrea Iacovitti <aiacovitti@libero.it>2011-09-16 20:51:57 (GMT)
commit24d7e18682e25fc8657980ac5521d8dea23fd293 (patch)
treed54bd05cb28d379bc6ac9c04f3bd59d4287c9046
parent4ff2405142970d6b5215fccf4507d33cecfd5c3d (diff)
Initialize QString variable to empty string.
It helps clearButton to work properly in khtml's forms. BUG: 282133
-rw-r--r--kdeui/widgets/klineedit.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/kdeui/widgets/klineedit.cpp b/kdeui/widgets/klineedit.cpp
index 4b8835b..715e182 100644
--- a/kdeui/widgets/klineedit.cpp
+++ b/kdeui/widgets/klineedit.cpp
@@ -1149,7 +1149,7 @@ void KLineEdit::mouseReleaseEvent( QMouseEvent* e )
{
if ( d->clickInClear ) {
if ( d->clearButton == childAt(e->pos()) || d->clearButton->underMouse() ) {
- QString newText;
+ QString newText = QString::fromLatin1("");
if ( e->button() == Qt::MidButton ) {
newText = QApplication::clipboard()->text( QClipboard::Selection );
setText( newText );
@@ -1168,12 +1168,12 @@ void KLineEdit::mouseReleaseEvent( QMouseEvent* e )
QLineEdit::mouseReleaseEvent( e );
- if (QApplication::clipboard()->supportsSelection() ) {
- if ( e->button() == Qt::LeftButton ) {
+ if (QApplication::clipboard()->supportsSelection() ) {
+ if ( e->button() == Qt::LeftButton ) {
// Fix copying of squeezed text if needed
copySqueezedText( false );
- }
- }
+ }
+ }
}
void KLineEdit::tripleClickTimeout()