From 32764c9696bcdbaf8136e47376ec6fe7a1c8ce05 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 24 Nov 2010 15:51:58 +0000 Subject: Allow to search for filenames + textcontent also for non-local files. svn path=/trunk/KDE/kdebase/apps/; revision=1200303 --- src/search/dolphinsearchbox.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/search/dolphinsearchbox.cpp') diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index 23d0c658a..7c2d15264 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -97,18 +97,22 @@ KUrl DolphinSearchBox::urlForSearching() const if (m_nepomukActivated && isSearchPathIndexed()) { url = nepomukUrlForSearching(); } else { - url = m_searchPath; url.setProtocol("filenamesearch"); url.addQueryItem("search", m_searchInput->text()); if (m_contentButton->isChecked()) { url.addQueryItem("checkContent", "yes"); } + + QString encodedUrl; if (m_everywhereButton->isChecked()) { // It is very unlikely, that the majority of Dolphins target users // mean "the whole harddisk" instead of "my home folder" when // selecting the "Everywhere" button. - url.setPath(QDir::homePath()); + encodedUrl = QDir::homePath(); + } else { + encodedUrl = m_searchPath.url(); } + url.addQueryItem("url", encodedUrl); } return url; -- cgit v1.3