This fixes a dolphin crash if tab with a search box open gets its path
changed while its not active.
This patch adds a guard for the m_urlNavigatorConnected->setLocation,
and makes sure the searchPath is set to the correct folder.
BUG:496387
if (url.isEmpty() || !url.isValid() || isSearchUrl(url)) {
url = Dolphin::homeUrl();
}
if (url.isEmpty() || !url.isValid() || isSearchUrl(url)) {
url = Dolphin::homeUrl();
}
- m_urlNavigatorConnected->setLocationUrl(url);
+ if (m_urlNavigatorConnected) {
+ m_urlNavigatorConnected->setLocationUrl(url);
+ }
}
m_searchModeEnabled = enabled;
}
m_searchModeEnabled = enabled;
// URL history.
m_urlNavigator->saveLocationState(QByteArray());
m_urlNavigator->setLocationUrl(newUrl);
// URL history.
m_urlNavigator->saveLocationState(QByteArray());
m_urlNavigator->setLocationUrl(newUrl);
+ m_searchBox->setSearchPath(newUrl);
setSearchModeEnabled(isSearchUrl(newUrl));
m_urlNavigator->blockSignals(block);
setSearchModeEnabled(isSearchUrl(newUrl));
m_urlNavigator->blockSignals(block);