aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-12-21 17:52:56 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-12-21 17:52:56 +0100
commitcf06dcb0650f603ae3d634634d81f9ec78d21937 (patch)
tree07b6aff6426ba091cd5b1a90832527d651101ac6 /src
parentAdded Search Box (diff)
downloadsmolbote-cf06dcb0650f603ae3d634634d81f9ec78d21937.tar.xz
Edited documentation
- Search highlighting is removed when you close the search box - Fixed PKGBUILD not working - PKGBUILD can now pick compiler and optimization
Diffstat (limited to 'src')
-rw-r--r--src/forms/searchform.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/forms/searchform.cpp b/src/forms/searchform.cpp
index 0e5161f..c05c6b2 100644
--- a/src/forms/searchform.cpp
+++ b/src/forms/searchform.cpp
@@ -26,9 +26,11 @@ SearchForm::SearchForm(MainWindow *parentWindow, QWidget *parent) :
// show/hide action
QAction *toggleSearchBox = new QAction(this);
toggleSearchBox->setShortcut(QKeySequence(QString::fromStdString(parentWindow->m_config->value<std::string>("browser.shortcuts.toggleSearchBox").value())));
- connect(toggleSearchBox, &QAction::triggered, this, [this]() {
+ connect(toggleSearchBox, &QAction::triggered, this, [this, parentWindow]() {
if(isVisible()) {
setVisible(false);
+ // remove highlighting by passing an empty string
+ parentWindow->m_currentView->findText("");
} else {
setVisible(true);
setFocus();