Rex Dieter adf30a
From 1d79c645ffbd858517f07cee3143dc64fac7c3e9 Mon Sep 17 00:00:00 2001
Rex Dieter adf30a
From: =?UTF-8?q?Dan=20Vr=C3=A1til?= <dvratil@redhat.com>
Rex Dieter adf30a
Date: Mon, 10 Nov 2014 11:51:45 +0100
Rex Dieter adf30a
Subject: [PATCH 11/30] Convert some qDebugs to akDebugs
Rex Dieter adf30a
Rex Dieter adf30a
This should make Akonadi in release mode even less chatty.
Rex Dieter adf30a
---
Rex Dieter adf30a
 server/src/handler/merge.cpp        |  3 ++-
Rex Dieter adf30a
 server/src/handler/modify.cpp       |  6 +++---
Rex Dieter adf30a
 server/src/handler/remove.cpp       |  4 ++--
Rex Dieter adf30a
 server/src/search/searchmanager.cpp | 12 ++++++------
Rex Dieter adf30a
 4 files changed, 13 insertions(+), 12 deletions(-)
Rex Dieter adf30a
Rex Dieter adf30a
diff --git a/server/src/handler/merge.cpp b/server/src/handler/merge.cpp
Rex Dieter adf30a
index fffe100..c26917d 100644
Rex Dieter adf30a
--- a/server/src/handler/merge.cpp
Rex Dieter adf30a
+++ b/server/src/handler/merge.cpp
Rex Dieter adf30a
@@ -328,8 +328,9 @@ bool Merge::parseStream()
Rex Dieter adf30a
       }
Rex Dieter adf30a
 
Rex Dieter adf30a
     } else {
Rex Dieter adf30a
+      akDebug() << "Multiple merge candidates:";
Rex Dieter adf30a
       Q_FOREACH (const PimItem &item, result) {
Rex Dieter adf30a
-          qDebug() << item.id() << item.remoteId() << item.gid();
Rex Dieter adf30a
+          akDebug() << "\t" << item.id() << item.remoteId() << item.gid();
Rex Dieter adf30a
       }
Rex Dieter adf30a
       // Nor GID or RID are guaranteed to be unique, so make sure we don't merge
Rex Dieter adf30a
       // something we don't want
Rex Dieter adf30a
diff --git a/server/src/handler/modify.cpp b/server/src/handler/modify.cpp
Rex Dieter adf30a
index 9671fb9..ad329db 100644
Rex Dieter adf30a
--- a/server/src/handler/modify.cpp
Rex Dieter adf30a
+++ b/server/src/handler/modify.cpp
Rex Dieter adf30a
@@ -216,9 +216,9 @@ bool Modify::parseStream()
Rex Dieter adf30a
 
Rex Dieter adf30a
       queryAttributes = attrs.join( QLatin1String( " " ) );
Rex Dieter adf30a
 
Rex Dieter adf30a
-      qDebug() << collection.queryAttributes() << queryAttributes;
Rex Dieter adf30a
-      qDebug() << collection.queryCollections() << queryCollections;
Rex Dieter adf30a
-      qDebug() << collection.queryString() << queryString;
Rex Dieter adf30a
+      akDebug() << collection.queryAttributes() << queryAttributes;
Rex Dieter adf30a
+      akDebug() << collection.queryCollections() << queryCollections;
Rex Dieter adf30a
+      akDebug() << collection.queryString() << queryString;
Rex Dieter adf30a
 
Rex Dieter adf30a
       if ( collection.queryAttributes() != queryAttributes
Rex Dieter adf30a
           || collection.queryCollections() != queryCollections
Rex Dieter adf30a
diff --git a/server/src/handler/remove.cpp b/server/src/handler/remove.cpp
Rex Dieter adf30a
index 090531f..daec5a0 100644
Rex Dieter adf30a
--- a/server/src/handler/remove.cpp
Rex Dieter adf30a
+++ b/server/src/handler/remove.cpp
Rex Dieter adf30a
@@ -40,8 +40,8 @@ bool Remove::parseStream()
Rex Dieter adf30a
 {
Rex Dieter adf30a
   mScope.parseScope( m_streamParser );
Rex Dieter adf30a
   connection()->context()->parseContext( m_streamParser );
Rex Dieter adf30a
-  qDebug() << "Tag context:" << connection()->context()->tagId();
Rex Dieter adf30a
-  qDebug() << "Collection context: " << connection()->context()->collectionId();
Rex Dieter adf30a
+  akDebug() << "Tag context:" << connection()->context()->tagId();
Rex Dieter adf30a
+  akDebug() << "Collection context: " << connection()->context()->collectionId();
Rex Dieter adf30a
 
Rex Dieter adf30a
 
Rex Dieter adf30a
   SelectQueryBuilder<PimItem> qb;
Rex Dieter adf30a
diff --git a/server/src/search/searchmanager.cpp b/server/src/search/searchmanager.cpp
Rex Dieter adf30a
index 35e76e1..c821aa3 100644
Rex Dieter adf30a
--- a/server/src/search/searchmanager.cpp
Rex Dieter adf30a
+++ b/server/src/search/searchmanager.cpp
Rex Dieter adf30a
@@ -159,7 +159,7 @@ void SearchManager::loadSearchPlugins()
Rex Dieter adf30a
   Q_FOREACH ( const QString &pluginDir, dirs ) {
Rex Dieter adf30a
     QDir dir( pluginDir + QLatin1String( "/akonadi" ) );
Rex Dieter adf30a
     const QStringList desktopFiles = dir.entryList( QStringList() << QLatin1String( "*.desktop" ), QDir::Files );
Rex Dieter adf30a
-    qDebug() << "SEARCH MANAGER: searching in " << pluginDir + QLatin1String( "/akonadi" ) << ":" << desktopFiles;
Rex Dieter adf30a
+    akDebug() << "SEARCH MANAGER: searching in " << pluginDir + QLatin1String( "/akonadi" ) << ":" << desktopFiles;
Rex Dieter adf30a
 
Rex Dieter adf30a
     Q_FOREACH ( const QString &desktopFileName, desktopFiles ) {
Rex Dieter adf30a
       QSettings desktop( pluginDir + QLatin1String( "/akonadi/" ) + desktopFileName, QSettings::IniFormat );
Rex Dieter adf30a
@@ -170,13 +170,13 @@ void SearchManager::loadSearchPlugins()
Rex Dieter adf30a
 
Rex Dieter adf30a
       const QString libraryName = desktop.value( QLatin1String( "X-Akonadi-Library" ) ).toString();
Rex Dieter adf30a
       if ( loadedPlugins.contains( libraryName ) ) {
Rex Dieter adf30a
-        qDebug() << "Already loaded one version of this plugin, skipping: " << libraryName;
Rex Dieter adf30a
+        akDebug() << "Already loaded one version of this plugin, skipping: " << libraryName;
Rex Dieter adf30a
         continue;
Rex Dieter adf30a
       }
Rex Dieter adf30a
       // When search plugin override is active, ignore all plugins except for the override
Rex Dieter adf30a
       if ( !pluginOverride.isEmpty() ) {
Rex Dieter adf30a
         if ( libraryName != pluginOverride ) {
Rex Dieter adf30a
-          qDebug() << desktopFileName << "skipped because of AKONADI_OVERRIDE_SEARCHPLUGIN";
Rex Dieter adf30a
+          akDebug() << desktopFileName << "skipped because of AKONADI_OVERRIDE_SEARCHPLUGIN";
Rex Dieter adf30a
           continue;
Rex Dieter adf30a
         }
Rex Dieter adf30a
 
Rex Dieter adf30a
@@ -198,7 +198,7 @@ void SearchManager::loadSearchPlugins()
Rex Dieter adf30a
         continue;
Rex Dieter adf30a
       }
Rex Dieter adf30a
 
Rex Dieter adf30a
-      qDebug() << "SearchManager: loaded search plugin" << libraryName;
Rex Dieter adf30a
+      akDebug() << "SearchManager: loaded search plugin" << libraryName;
Rex Dieter adf30a
       mPlugins << plugin;
Rex Dieter adf30a
       loadedPlugins << libraryName;
Rex Dieter adf30a
     }
Rex Dieter adf30a
@@ -390,7 +390,7 @@ void SearchManager::searchUpdateResultsAvailable( const QSet<qint64> &results )
Rex Dieter adf30a
     }
Rex Dieter adf30a
   }
Rex Dieter adf30a
 
Rex Dieter adf30a
-  qDebug() << "Got" << newMatches.count() << "results, out of which" << existingMatches.count() << "are already in the collection";
Rex Dieter adf30a
+  akDebug() << "Got" << newMatches.count() << "results, out of which" << existingMatches.count() << "are already in the collection";
Rex Dieter adf30a
 
Rex Dieter adf30a
   newMatches = newMatches - existingMatches;
Rex Dieter adf30a
 
Rex Dieter adf30a
@@ -405,7 +405,7 @@ void SearchManager::searchUpdateResultsAvailable( const QSet<qint64> &results )
Rex Dieter adf30a
     Collection::addPimItem( collection.id(), id );
Rex Dieter adf30a
   }
Rex Dieter adf30a
 
Rex Dieter adf30a
-  qDebug() << "Added" << newMatches.count();
Rex Dieter adf30a
+  akDebug() << "Added" << newMatches.count();
Rex Dieter adf30a
 
Rex Dieter adf30a
   if ( !existingTransaction && !DataStore::self()->commitTransaction() ) {
Rex Dieter adf30a
     akDebug() << "Failed to commit transaction";
Rex Dieter adf30a
-- 
Rex Dieter adf30a
2.1.0
Rex Dieter adf30a