mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
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
This commit is contained in:
parent
0483b8a77f
commit
be077d3a0c
|
@ -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
|
||||
|
|
|
@ -331,6 +331,7 @@ private:
|
|||
KUrlNavigator* m_urlNavigator;
|
||||
QPushButton* m_emptyTrashButton;
|
||||
DolphinSearchBox* m_searchBox;
|
||||
bool m_searchModeEnabled;
|
||||
KMessageWidget* m_messageWidget;
|
||||
|
||||
DolphinView* m_view;
|
||||
|
|
Loading…
Reference in a new issue