diff options
| author | Kai Uwe Broulik <[email protected]> | 2018-09-27 12:57:18 +0200 |
|---|---|---|
| committer | Kai Uwe Broulik <[email protected]> | 2018-09-27 12:57:18 +0200 |
| commit | be077d3a0cde5b461fd6d4e7d73054538b44470b (patch) | |
| tree | 43e77fd1259bb17e4bc5dace0bb8dc8b02de47b8 /src | |
| parent | 0483b8a77f859b8466e2bffe669698ec81663640 (diff) | |
Track search mode in variable
Rather than relying on a widget being visible which might not be the case for e.g. non-active tabs
Differential Revision: https://phabricator.kde.org/D15774
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinviewcontainer.cpp | 5 | ||||
| -rw-r--r-- | src/dolphinviewcontainer.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 71a1ae872..5978ae938 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -56,6 +56,7 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) : m_urlNavigator(nullptr), m_emptyTrashButton(nullptr), m_searchBox(nullptr), + m_searchModeEnabled(false), m_messageWidget(nullptr), m_view(nullptr), m_filterBar(nullptr), @@ -378,11 +379,13 @@ void DolphinViewContainer::setSearchModeEnabled(bool enabled) } m_urlNavigator->setLocationUrl(url); } + + m_searchModeEnabled = enabled; } bool DolphinViewContainer::isSearchModeEnabled() const { - return m_searchBox->isVisible(); + return m_searchModeEnabled; } QString DolphinViewContainer::placesText() const diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h index 409aecfcf..f33a5a118 100644 --- a/src/dolphinviewcontainer.h +++ b/src/dolphinviewcontainer.h @@ -331,6 +331,7 @@ private: KUrlNavigator* m_urlNavigator; QPushButton* m_emptyTrashButton; DolphinSearchBox* m_searchBox; + bool m_searchModeEnabled; KMessageWidget* m_messageWidget; DolphinView* m_view; |
