mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Fix crash when lauching dolphin with a search scheme
Summary: Widget objects are initialized in `DolphinSearchBox::init()`, which is called on `QEvent::Polish`, so we must set it visible before calling `fromSearchUrl`. Test Plan: `dolphin --new-window baloosearch://` Reviewers: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24432
This commit is contained in:
parent
d9d3b142b7
commit
31fd775f36
|
@ -385,6 +385,9 @@ bool DolphinViewContainer::isFilterBarVisible() const
|
|||
|
||||
void DolphinViewContainer::setSearchModeEnabled(bool enabled)
|
||||
{
|
||||
m_searchBox->setVisible(enabled);
|
||||
m_navigatorWidget->setVisible(!enabled);
|
||||
|
||||
if (enabled) {
|
||||
const QUrl& locationUrl = m_urlNavigator->locationUrl();
|
||||
m_searchBox->fromSearchUrl(locationUrl);
|
||||
|
@ -398,9 +401,6 @@ void DolphinViewContainer::setSearchModeEnabled(bool enabled)
|
|||
return;
|
||||
}
|
||||
|
||||
m_searchBox->setVisible(enabled);
|
||||
m_navigatorWidget->setVisible(!enabled);
|
||||
|
||||
if (!enabled) {
|
||||
m_view->setViewPropertiesContext(QString());
|
||||
|
||||
|
|
Loading…
Reference in a new issue