mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Merge branch 'Applications/19.08'
This commit is contained in:
commit
43ea7052e1
|
@ -396,10 +396,7 @@ void DolphinViewContainer::setSearchModeEnabled(bool enabled)
|
||||||
m_searchBox->setVisible(enabled);
|
m_searchBox->setVisible(enabled);
|
||||||
m_navigatorWidget->setVisible(!enabled);
|
m_navigatorWidget->setVisible(!enabled);
|
||||||
|
|
||||||
if (enabled) {
|
if (!enabled) {
|
||||||
const QUrl& locationUrl = m_urlNavigator->locationUrl();
|
|
||||||
m_searchBox->fromSearchUrl(locationUrl);
|
|
||||||
} else {
|
|
||||||
m_view->setViewPropertiesContext(QString());
|
m_view->setViewPropertiesContext(QString());
|
||||||
|
|
||||||
// Restore the URL for the URL navigator. If Dolphin has been
|
// Restore the URL for the URL navigator. If Dolphin has been
|
||||||
|
@ -676,11 +673,15 @@ void DolphinViewContainer::slotUrlNavigatorLocationChanged(const QUrl& url)
|
||||||
slotReturnPressed();
|
slotReturnPressed();
|
||||||
|
|
||||||
if (KProtocolManager::supportsListing(url)) {
|
if (KProtocolManager::supportsListing(url)) {
|
||||||
setSearchModeEnabled(isSearchUrl(url));
|
const bool searchUrl = isSearchUrl(url);
|
||||||
|
if (searchUrl) {
|
||||||
|
m_searchBox->fromSearchUrl(url);
|
||||||
|
}
|
||||||
|
setSearchModeEnabled(searchUrl);
|
||||||
m_view->setUrl(url);
|
m_view->setUrl(url);
|
||||||
tryRestoreViewState();
|
tryRestoreViewState();
|
||||||
|
|
||||||
if (m_autoGrabFocus && isActive() && !isSearchUrl(url)) {
|
if (m_autoGrabFocus && isActive() && !searchUrl) {
|
||||||
// When an URL has been entered, the view should get the focus.
|
// When an URL has been entered, the view should get the focus.
|
||||||
// The focus must be requested asynchronously, as changing the URL might create
|
// The focus must be requested asynchronously, as changing the URL might create
|
||||||
// a new view widget.
|
// a new view widget.
|
||||||
|
|
Loading…
Reference in a new issue