diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-08-01 20:45:23 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-08-01 20:45:23 +0200 |
commit | 10a27aef00debef6c27b6ec5e52d3e6a62c30838 (patch) | |
tree | 28ec2c9afa2598e271b6a7ce72d80785874e56b7 /src | |
parent | Merge branch 'POPUS' (diff) | |
parent | fix focus when right click bug (diff) | |
download | rekonq-10a27aef00debef6c27b6ec5e52d3e6a62c30838.tar.xz |
Merge branch 'FOCUSOUT'
Diffstat (limited to 'src')
-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); } |