mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +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
1 changed files with 3 additions and 3 deletions
|
@ -385,6 +385,9 @@ bool DolphinViewContainer::isFilterBarVisible() const
|
||||||
|
|
||||||
void DolphinViewContainer::setSearchModeEnabled(bool enabled)
|
void DolphinViewContainer::setSearchModeEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
|
m_searchBox->setVisible(enabled);
|
||||||
|
m_navigatorWidget->setVisible(!enabled);
|
||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
const QUrl& locationUrl = m_urlNavigator->locationUrl();
|
const QUrl& locationUrl = m_urlNavigator->locationUrl();
|
||||||
m_searchBox->fromSearchUrl(locationUrl);
|
m_searchBox->fromSearchUrl(locationUrl);
|
||||||
|
@ -398,9 +401,6 @@ void DolphinViewContainer::setSearchModeEnabled(bool enabled)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_searchBox->setVisible(enabled);
|
|
||||||
m_navigatorWidget->setVisible(!enabled);
|
|
||||||
|
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
m_view->setViewPropertiesContext(QString());
|
m_view->setViewPropertiesContext(QString());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue