void DolphinSearchBox::fromSearchUrl(const QUrl& url)
{
- if (url.scheme() == QLatin1String("baloosearch")) {
- const DolphinQuery query = DolphinQuery::fromBalooSearchUrl(url);
+ if (DolphinQuery::supportsScheme(url.scheme())) {
+ const DolphinQuery query = DolphinQuery::fromSearchUrl(url);
updateFromQuery(query);
} else if (url.scheme() == QLatin1String("filenamesearch")) {
const QUrlQuery query(url);
setSearchPath(QUrl::fromLocalFile(QDir::homePath()));
}
- setText(query.text());
+ // If the input box has focus, do not update to avoid messing with user typing
+ if (!m_searchInput->hasFocus()) {
+ setText(query.text());
+ }
if (query.hasContentSearch()) {
m_contentButton->setChecked(true);