From e75248a3358f56978df8cfa1abd7f0d361e31988 Mon Sep 17 00:00:00 2001 From: nowrep Date: Mon, 12 Aug 2013 10:46:24 +0200 Subject: [PATCH] Set DuckDuckGo as a default search engine --- src/lib/opensearch/searchenginesmanager.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/opensearch/searchenginesmanager.cpp b/src/lib/opensearch/searchenginesmanager.cpp index 72ae7d4c2..86819b168 100644 --- a/src/lib/opensearch/searchenginesmanager.cpp +++ b/src/lib/opensearch/searchenginesmanager.cpp @@ -126,6 +126,12 @@ QUrl SearchEnginesManager::searchUrl(const QString &string) void SearchEnginesManager::restoreDefaults() { + Engine duck; + duck.name = "DuckDuckGo"; + duck.icon = QIcon(":/icons/sites/duck.png"); + duck.url = "https://duckduckgo.com/?q=%s&t=qupzilla"; + duck.shortcut = "d"; + Engine google; google.name = "Google"; google.icon = QIcon(":icons/sites/google.png"); @@ -147,18 +153,12 @@ void SearchEnginesManager::restoreDefaults() yt.shortcut = "yt"; yt.suggestionsUrl = "http://suggestqueries.google.com/complete/search?ds=yt&output=firefox&q=%s"; - Engine duck; - duck.name = "DuckDuckGo"; - duck.icon = QIcon(":/icons/sites/duck.png"); - duck.url = "https://duckduckgo.com/?q=%s&t=qupzilla"; - duck.shortcut = "d"; - + addEngine(duck); addEngine(google); addEngine(wiki); addEngine(yt); - addEngine(duck); - m_defaultEngine = google; + m_defaultEngine = duck; emit enginesChanged(); }