diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-07-23 00:31:39 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-07-23 00:31:39 +0200 |
commit | 6db7ee5a7d007a17511c53d87d02e257165bf591 (patch) | |
tree | 31cd85692eddaf7e87ec8d0f6a842f71ad23c2f3 /src/mainwindow.cpp | |
parent | Modified tailor script (diff) | |
download | rekonq-6db7ee5a7d007a17511c53d87d02e257165bf591.tar.xz |
Fixing findbar focus on find request.
Also hiding it with ESC key when it has no focus.
Courtesy patch from Johannes Zellner. Many Thanks!
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5958e4be..d86729ad 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -855,6 +855,18 @@ bool MainWindow::queryClose() } +void MainWindow::keyPressEvent(QKeyEvent *event) +{ + if (event->key() == Qt::Key_Escape) + { + m_findBar->hide(); + return; + } + + KXmlGuiWindow::keyPressEvent(event); +} + + QAction *MainWindow::actionByName(const QString name) { QAction *ret = actionCollection()->action(name); |