diff options
Diffstat (limited to 'kwebapp/searchengine.cpp')
-rw-r--r-- | kwebapp/searchengine.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/kwebapp/searchengine.cpp b/kwebapp/searchengine.cpp index 6f7f6edc..212f0ee8 100644 --- a/kwebapp/searchengine.cpp +++ b/kwebapp/searchengine.cpp @@ -48,15 +48,20 @@ K_GLOBAL_STATIC(SearchEnginePrivate, d) void SearchEngine::reload() { - KConfig config("kuriikwsfilterrc"); //Shared with konqueror + KConfig config("kuriikwsfilterrc"); KConfigGroup cg = config.group("General"); - //load delimiter + // load delimiter d->delimiter = cg.readEntry("KeywordDelimiter", ":"); - //load favorite engines + // load favorite engines QStringList favoriteEngines; +#if KDE_IS_VERSION(4,9,0) + favoriteEngines = cg.readEntry("PreferredWebShortcuts", favoriteEngines); +#else favoriteEngines = cg.readEntry("FavoriteSearchEngines", favoriteEngines); +#endif + KService::List favorites; KService::Ptr service; Q_FOREACH(const QString & engine, favoriteEngines) @@ -69,8 +74,13 @@ void SearchEngine::reload() } d->favorites = favorites; - //load default engine - QString dse = cg.readEntry("DefaultSearchEngine"); + // load default engine + QString dse; +#if KDE_IS_VERSION(4,9,0) + dse = cg.readEntry("DefaultWebShortcut"); +#else + dse = cg.readEntry("DefaultSearchEngine"); +#endif d->defaultEngine = KService::serviceByDesktopPath(QString("searchproviders/%1.desktop").arg(dse)); d->isLoaded = true; |