summaryrefslogtreecommitdiff
path: root/src/searchengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/searchengine.cpp')
-rw-r--r--src/searchengine.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/searchengine.cpp b/src/searchengine.cpp
index 6f7f6edc..9f0dd847 100644
--- a/src/searchengine.cpp
+++ b/src/searchengine.cpp
@@ -54,9 +54,14 @@ void SearchEngine::reload()
//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,14 @@ 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;