diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-08-22 04:06:54 +0200 |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-08-22 04:18:37 +0200 |
commit | 67138dcf8e3a1788928fd31256b29a257dae5eee (patch) | |
tree | 5acfb521de78d5a09ec475b4e7baa288c1967041 /src/mainwindow.cpp | |
parent | Change the Find action to show() instead of toggle() (diff) | |
download | rekonq-67138dcf8e3a1788928fd31256b29a257dae5eee.tar.xz |
Use the selected text as the default search string of the FindBar
The common behavior of the Find action is to start a search with the
current selected text if any.
This patch implement this behavior for Rekonq.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5eb43aa0..44cc6d59 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -907,6 +907,15 @@ void MainWindow::setWidgetsVisible(bool makeVisible) } +QString MainWindow::selectedText() const +{ + if (!currentTab()) + return QString(); + + return currentTab()->view()->selectedText(); +} + + void MainWindow::viewPageSource() { if (!currentTab()) |