diff options
-rw-r--r-- | src/lineedit.cpp | 11 | ||||
-rw-r--r-- | src/lineedit.h | 1 | ||||
-rw-r--r-- | src/urlbar.cpp | 2 |
3 files changed, 1 insertions, 13 deletions
diff --git a/src/lineedit.cpp b/src/lineedit.cpp index fd43346d..270d1634 100644 --- a/src/lineedit.cpp +++ b/src/lineedit.cpp @@ -69,17 +69,6 @@ void LineEdit::focusInEvent(QFocusEvent *event) KLineEdit::focusInEvent(event); } - -void LineEdit::focusOutEvent(QFocusEvent *event) -{ - KLineEdit::focusOutEvent(event); - - // reset cursor state and deselect - setCursorPosition(0); - deselect(); -} - - void LineEdit::mouseDoubleClickEvent(QMouseEvent *) { selectAll(); diff --git a/src/lineedit.h b/src/lineedit.h index 4d989cf4..9fbf189b 100644 --- a/src/lineedit.h +++ b/src/lineedit.h @@ -43,7 +43,6 @@ protected: virtual void keyPressEvent(QKeyEvent*); virtual void contextMenuEvent(QContextMenuEvent*); virtual void focusInEvent(QFocusEvent*); - virtual void focusOutEvent(QFocusEvent*); virtual void mouseDoubleClickEvent(QMouseEvent *); }; diff --git a/src/urlbar.cpp b/src/urlbar.cpp index ba9773db..c2c28954 100644 --- a/src/urlbar.cpp +++ b/src/urlbar.cpp @@ -229,7 +229,7 @@ void UrlBar::paintEvent(QPaintEvent *event) void UrlBar::focusOutEvent(QFocusEvent *event) { // set back last loaded url in case user cleared it - setUrl(m_currentUrl); + if (!m_currentUrl.equals(KUrl(lineEdit()->text()))) setUrl(m_currentUrl); KHistoryComboBox::focusOutEvent(event); } |