diff options
| author | Ismael Asensio <[email protected]> | 2019-10-06 11:34:30 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2019-10-06 11:34:30 +0200 |
| commit | 31fd775f368f61f6dde54c0c3a2e83d65599c3c2 (patch) | |
| tree | 27713e9a5c4efe1516e09e827ca6878adc2a9e5f /src/dolphinviewcontainer.cpp | |
| parent | d9d3b142b786b2bbc5729e9c0dc90c0dba478f64 (diff) | |
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
Diffstat (limited to 'src/dolphinviewcontainer.cpp')
| -rw-r--r-- | src/dolphinviewcontainer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index c6d9d89ad..536ab0fa8 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -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()); |
