Summary:
Searchbar options (text and options) were only updated when toggling the search on, $
Main use case is when changing between stored search urls in Places panel.
Test Plan:
- Store two search urls in Places panel
- Navigate between them
- The searchbar text and parameters change accordingly
BEFORE:
{
F7500811}
AFTER:
{
F7500813}
Reviewers: #dolphin, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24369
m_searchBox->setVisible(enabled);
m_navigatorWidget->setVisible(!enabled);
m_searchBox->setVisible(enabled);
m_navigatorWidget->setVisible(!enabled);
- if (enabled) {
- const QUrl& locationUrl = m_urlNavigator->locationUrl();
- m_searchBox->fromSearchUrl(locationUrl);
- } else {
m_view->setViewPropertiesContext(QString());
// Restore the URL for the URL navigator. If Dolphin has been
m_view->setViewPropertiesContext(QString());
// Restore the URL for the URL navigator. If Dolphin has been
slotReturnPressed();
if (KProtocolManager::supportsListing(url)) {
slotReturnPressed();
if (KProtocolManager::supportsListing(url)) {
- setSearchModeEnabled(isSearchUrl(url));
+ const bool searchUrl = isSearchUrl(url);
+ if (searchUrl) {
+ m_searchBox->fromSearchUrl(url);
+ }
+ setSearchModeEnabled(searchUrl);
m_view->setUrl(url);
tryRestoreViewState();
m_view->setUrl(url);
tryRestoreViewState();
- if (m_autoGrabFocus && isActive() && !isSearchUrl(url)) {
+ if (m_autoGrabFocus && isActive() && !searchUrl) {
// When an URL has been entered, the view should get the focus.
// The focus must be requested asynchronously, as changing the URL might create
// a new view widget.
// When an URL has been entered, the view should get the focus.
// The focus must be requested asynchronously, as changing the URL might create
// a new view widget.