diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h --- a/src/search/dolphinsearchbox.h +++ b/src/search/dolphinsearchbox.h @@ -161,6 +161,8 @@ bool isIndexingEnabled() const; private: + QString queryTitle(const QString& text) const; + bool m_startedSearching; bool m_active; diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -136,6 +136,7 @@ } query.addQueryItem(QStringLiteral("url"), searchPath().url()); + query.addQueryItem(QStringLiteral("title"), queryTitle(m_searchInput->text())); url.setQuery(query); } @@ -472,6 +473,12 @@ connect(m_startSearchTimer, &QTimer::timeout, this, &DolphinSearchBox::emitSearchRequest); } +QString DolphinSearchBox::queryTitle(const QString& text) const +{ + return i18nc("@title UDS_DISPLAY_NAME for a KIO directory listing. %1 is the query the user entered.", + "Query Results from '%1'", text); +} + QUrl DolphinSearchBox::balooUrlForSearching() const { #ifdef HAVE_BALOO @@ -494,8 +501,7 @@ query.setSearchString(queryStrings.join(QLatin1Char(' '))); - return query.toSearchUrl(i18nc("@title UDS_DISPLAY_NAME for a KIO directory listing. %1 is the query the user entered.", - "Query Results from '%1'", text)); + return query.toSearchUrl(queryTitle(text)); #else return QUrl(); #endif