summaryrefslogtreecommitdiff
path: root/src/opensearch
diff options
context:
space:
mode:
Diffstat (limited to 'src/opensearch')
-rw-r--r--src/opensearch/opensearchmanager.cpp8
-rw-r--r--src/opensearch/searchengine.cpp1
-rw-r--r--src/opensearch/suggestionparser.cpp8
3 files changed, 5 insertions, 12 deletions
diff --git a/src/opensearch/opensearchmanager.cpp b/src/opensearch/opensearchmanager.cpp
index 35716d9a..ea2ace32 100644
--- a/src/opensearch/opensearchmanager.cpp
+++ b/src/opensearch/opensearchmanager.cpp
@@ -53,6 +53,7 @@
#include <QDBusMessage>
#include <QDBusConnection>
+
OpenSearchManager::OpenSearchManager(QObject *parent)
: QObject(parent)
, m_activeEngine(0)
@@ -81,14 +82,12 @@ void OpenSearchManager::setSearchProvider(const QString &searchProvider)
kDebug() << searchProvider << " trimmed name: " << trimmedEngineName(searchProvider) << " file name path: " << fileName;
if(fileName.isEmpty())
{
- kDebug() << "OpenSearch file name empty";
return;
}
QFile file(fileName);
if(!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
- kDebug() << "Cannot open opensearch description file: " + fileName;
return;
}
@@ -154,7 +153,6 @@ void OpenSearchManager::requestSuggestion(const QString &searchText)
else
{
KUrl url = m_activeEngine->suggestionsUrl(searchText);
- kDebug() << "Requesting for suggestions: " << url.url();
_typedText = searchText;
m_currentJob = KIO::get(url, KIO::NoReload, KIO::HideProgressInfo);
m_state = REQ_SUGGESTION;
@@ -184,7 +182,6 @@ void OpenSearchManager::jobFinished(KJob *job)
if(m_state == REQ_SUGGESTION)
{
const ResponseList suggestionsList = m_activeEngine->parseSuggestion(_typedText, m_jobData);
- kDebug() << "Received suggestions in " << _typedText << " from " << m_activeEngine->name() << ": ";
Q_FOREACH(const Response & r, suggestionsList)
{
kDebug() << r.title;
@@ -251,7 +248,6 @@ void OpenSearchManager::loadEngines()
QFile file(KStandardDirs::locate("appdata", "opensearch/db_opensearch.json"));
if(!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
- kDebug() << "opensearch db cannot be read";
return;
}
@@ -259,7 +255,6 @@ void OpenSearchManager::loadEngines()
QScriptEngine reader;
if(!reader.canEvaluate(fileContent))
{
- kDebug() << "opensearch db cannot be read";
return;
}
@@ -281,7 +276,6 @@ void OpenSearchManager::saveEngines()
QFile file(KStandardDirs::locateLocal("appdata", "opensearch/db_opensearch.json"));
if(!file.open(QIODevice::WriteOnly))
{
- kDebug() << "opensearch db cannot be writen";
return;
}
QTextStream out(&file);
diff --git a/src/opensearch/searchengine.cpp b/src/opensearch/searchengine.cpp
index 09eb5891..224a8d56 100644
--- a/src/opensearch/searchengine.cpp
+++ b/src/opensearch/searchengine.cpp
@@ -67,7 +67,6 @@ void SearchEngine::reload()
if(service)
{
QUrl url = service->property("Query").toUrl();
- kDebug() << "ENGINE URL: " << url;
rApp->iconManager()->downloadIconFromUrl(url);
favorites << service;
diff --git a/src/opensearch/suggestionparser.cpp b/src/opensearch/suggestionparser.cpp
index 0e390d99..6b467353 100644
--- a/src/opensearch/suggestionparser.cpp
+++ b/src/opensearch/suggestionparser.cpp
@@ -107,7 +107,7 @@ ResponseList JSONParser::parse(const QByteArray &resp)
if(response.isEmpty())
{
- kDebug() << "RESPONSE IS EMPTY";
+ // RESPONSE IS EMPTY
return ResponseList();
}
@@ -115,14 +115,14 @@ ResponseList JSONParser::parse(const QByteArray &resp)
|| !response.endsWith(QL1C(']'))
)
{
- kDebug() << "RESPONSE is NOT well FORMED";
+ // RESPONSE is NOT well FORMED
return ResponseList();
}
// Evaluate the JSON response using QtScript.
if(!m_reader.canEvaluate(response))
{
- kDebug() << "m_reader cannot evaluate the response";
+ // m_reader cannot evaluate the response
return ResponseList();
}
@@ -130,7 +130,7 @@ ResponseList JSONParser::parse(const QByteArray &resp)
if(!responseParts.property(1).isArray())
{
- kDebug() << "RESPONSE is not an array";
+ // RESPONSE is not an array
return ResponseList();
}