~ubuntu-branches/ubuntu/maverick/kdebase-workspace/maverick-proposed

« back to all changes in this revision

Viewing changes to plasma/generic/runners/webshortcuts/webshortcutrunner.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-07-08 01:11:52 UTC
  • mfrom: (1.1.43 upstream)
  • Revision ID: james.westby@ubuntu.com-20100708011152-z0h26httnjr91mmy
Tags: 4:4.4.92-0ubuntu1
* New upstream rc release:
  - Bump kde-sc-dev-latest to 4.4.92
  - Refresh patches
  - Update symbols
  - plasma-widgets-workspace replaces/conflicts plasma-widget-logout

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <KSycoca>
28
28
#include <KToolInvocation>
29
29
#include <KUrl>
 
30
#include <KUriFilter>
30
31
 
31
32
WebshortcutRunner::WebshortcutRunner(QObject *parent, const QVariantList& args)
32
33
    : Plasma::AbstractRunner(parent, args),
192
193
 
193
194
QString WebshortcutRunner::searchQuery(const QString &query, const QString &term)
194
195
{
195
 
    const QString searchWord = term.right(term.length() - term.indexOf(m_delimiter) - 1);
196
 
    if (searchWord.isEmpty()) {
197
 
        return QString();
198
 
    }
199
 
 
200
 
    QString finalQuery(query);
201
 
    // FIXME? currently only basic searches are supported
202
 
    finalQuery.replace("\\{@}", searchWord);
203
 
    KUrl url(finalQuery);
204
 
    return url.url();
 
196
    QString q(term);
 
197
    KUriFilter::self()->filterUri(q, QStringList("kurisearchfilter"));
 
198
    //kDebug() << "term" << term << "filtered to" << q;
 
199
    return q;
205
200
}
206
201
 
207
202
KIcon WebshortcutRunner::iconForUrl(const KUrl &url)