summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Sanders <don.sanders@nokia.com>2012-04-20 13:06:06 +0300
committerDon Sanders <don.sanders@nokia.com>2012-04-20 13:06:06 +0300
commit9308dceab1017632150483b378f7b36cdf979a30 (patch)
tree297e37623bac3bb4f4f4df2ca4b5b78db4a5c65c
parentaf249aacffbbabe61284b02cdeb5a0d7ed2b2ee6 (diff)
Replace uses of qDebug with qMailLog.
As qDebug shouldn't be used in release code, and may become deprecated. There's still some uses of qDebug left, namely, some automated tests that actually test qDebug/qMailLog functionality, some uses of qDebug in uncompiled documentation code snippet examples, one use of include QDebug in symbian code, and in qmailid some uses of defining operator<<(QDebug <<, ...). There's still about 500 uses of qWarning and qFatal left. For these I include qmaillog.h as currently that inclues QDebug. Apart from the one symbian case already mention.
-rw-r--r--benchmarks/tst_messageserver/benchmarkcontext.cpp2
-rw-r--r--benchmarks/tst_messageserver/tst_messageserver.cpp2
-rw-r--r--examples/qtmail/app/emailclient.cpp1
-rw-r--r--examples/qtmail/libs/qmfutil/qtmailnamespace.cpp2
-rw-r--r--examples/qtmail/plugins/composers/email/attachmentlistwidget.cpp1
-rw-r--r--examples/qtmail/plugins/viewers/generic/browserwidget.cpp1
-rw-r--r--src/libraries/qmfclient/qmailaccountlistmodel.cpp1
-rw-r--r--src/libraries/qmfclient/qmailstore_p.cpp4
-rw-r--r--src/libraries/qmfclient/qmailthreadlistmodel.cpp1
-rw-r--r--src/libraries/qmfclient/support/qcharsetdetector.cpp4
-rw-r--r--src/libraries/qmfclient/support/qcopadaptor.cpp2
-rw-r--r--src/libraries/qmfclient/support/qcopchannel.cpp1
-rw-r--r--src/libraries/qmfclient/support/qmailnamespace.cpp3
-rw-r--r--src/libraries/qmfmessageserver/qmailmessagebuffer.cpp2
-rw-r--r--src/tools/messageserver/main.cpp1
-rw-r--r--tests/tst_qmailmessage/tst_qmailmessage.cpp1
16 files changed, 9 insertions, 20 deletions
diff --git a/benchmarks/tst_messageserver/benchmarkcontext.cpp b/benchmarks/tst_messageserver/benchmarkcontext.cpp
index 909ac28e..aba13f62 100644
--- a/benchmarks/tst_messageserver/benchmarkcontext.cpp
+++ b/benchmarks/tst_messageserver/benchmarkcontext.cpp
@@ -57,7 +57,7 @@
#include <qmailnamespace.h>
#include <QCoreApplication>
-#include <QDebug>
+#include <qmaillog.h>
#include <QDir>
#include <QTest>
diff --git a/benchmarks/tst_messageserver/tst_messageserver.cpp b/benchmarks/tst_messageserver/tst_messageserver.cpp
index 61af4215..10a71a24 100644
--- a/benchmarks/tst_messageserver/tst_messageserver.cpp
+++ b/benchmarks/tst_messageserver/tst_messageserver.cpp
@@ -467,7 +467,7 @@ void tst_MessageServer::compareMessages(QMailMessageIdList const& actual, TestMa
#ifdef LEARN
if (!exp.at(i).count()) {
foreach (QByteArray const& line, actual.split('\n'))
- qDebug() << line.constData();
+ qDebug() << line.constData(); // not compiled by default
}
#endif
}
diff --git a/examples/qtmail/app/emailclient.cpp b/examples/qtmail/app/emailclient.cpp
index 5454ed6b..d1619a49 100644
--- a/examples/qtmail/app/emailclient.cpp
+++ b/examples/qtmail/app/emailclient.cpp
@@ -56,7 +56,6 @@
#include <qmailstore.h>
#include <qmailtimestamp.h>
#include <QApplication>
-#include <QDebug>
#include <QDesktopWidget>
#include <QFile>
#include <QGridLayout>
diff --git a/examples/qtmail/libs/qmfutil/qtmailnamespace.cpp b/examples/qtmail/libs/qmfutil/qtmailnamespace.cpp
index 8b3a48ed..ac294423 100644
--- a/examples/qtmail/libs/qmfutil/qtmailnamespace.cpp
+++ b/examples/qtmail/libs/qmfutil/qtmailnamespace.cpp
@@ -40,8 +40,8 @@
****************************************************************************/
#include "qtmailnamespace.h"
+#include <qmaillog.h>
#include <QMap>
-#include <QDebug>
typedef QMap<QString,QIcon> IconMap;
diff --git a/examples/qtmail/plugins/composers/email/attachmentlistwidget.cpp b/examples/qtmail/plugins/composers/email/attachmentlistwidget.cpp
index 6f7b818d..732578af 100644
--- a/examples/qtmail/plugins/composers/email/attachmentlistwidget.cpp
+++ b/examples/qtmail/plugins/composers/email/attachmentlistwidget.cpp
@@ -44,7 +44,6 @@
#include <QListView>
#include <QVBoxLayout>
#include <QLabel>
-#include <QDebug>
#include <QMessageBox>
#include <QDialogButtonBox>
#include <QTreeView>
diff --git a/examples/qtmail/plugins/viewers/generic/browserwidget.cpp b/examples/qtmail/plugins/viewers/generic/browserwidget.cpp
index 4bb13dd4..afdbc2b9 100644
--- a/examples/qtmail/plugins/viewers/generic/browserwidget.cpp
+++ b/examples/qtmail/plugins/viewers/generic/browserwidget.cpp
@@ -47,7 +47,6 @@
#include "qmaillog.h"
#include <QApplication>
-#include <QDebug>
#include <QImageReader>
#include <QKeyEvent>
#include <QMenu>
diff --git a/src/libraries/qmfclient/qmailaccountlistmodel.cpp b/src/libraries/qmfclient/qmailaccountlistmodel.cpp
index d105291b..02cff557 100644
--- a/src/libraries/qmfclient/qmailaccountlistmodel.cpp
+++ b/src/libraries/qmfclient/qmailaccountlistmodel.cpp
@@ -42,7 +42,6 @@
#include "qmailaccountlistmodel.h"
#include "qmailstore.h"
#include "qmailaccount.h"
-#include <QDebug>
#include <QCache>
static const int fullRefreshCutoff = 10;
diff --git a/src/libraries/qmfclient/qmailstore_p.cpp b/src/libraries/qmfclient/qmailstore_p.cpp
index 7cfc0cd2..c7df9fb8 100644
--- a/src/libraries/qmfclient/qmailstore_p.cpp
+++ b/src/libraries/qmfclient/qmailstore_p.cpp
@@ -2863,7 +2863,7 @@ bool QMailStorePrivate::execute(QSqlQuery& query, bool batch)
}
#ifdef QMAILSTORE_LOG_SQL
- qDebug() << "(" << pid << ")" << qPrintable(queryText(query));
+ qMailLog(Messaging) << "(" << pid << ")" << qPrintable(queryText(query));
#endif
if (!inTransaction) {
@@ -3899,7 +3899,7 @@ bool QMailStorePrivate::upgradeTimeStampToUtc()
{
QMailMessageIdList allMessageIds = queryMessages(QMailMessageKey(), QMailMessageSortKey(), 0, 0);
- qDebug() << Q_FUNC_INFO << "Time stamp for " << allMessageIds.count() << " will be updated ";
+ qMailLog(Messaging) << Q_FUNC_INFO << "Time stamp for " << allMessageIds.count() << " will be updated ";
QMailMessageKey::Properties updateDateProperties = QMailMessageKey::TimeStamp | QMailMessageKey::ReceptionTimeStamp;
foreach(const QMailMessageId &updateId, allMessageIds)
diff --git a/src/libraries/qmfclient/qmailthreadlistmodel.cpp b/src/libraries/qmfclient/qmailthreadlistmodel.cpp
index e3268875..258e69da 100644
--- a/src/libraries/qmfclient/qmailthreadlistmodel.cpp
+++ b/src/libraries/qmfclient/qmailthreadlistmodel.cpp
@@ -42,7 +42,6 @@
#include "qmailthreadlistmodel.h"
#include "qmailstore.h"
#include "qmailthread.h"
-#include <QDebug>
#include <QCache>
class LessThanFunctorT
diff --git a/src/libraries/qmfclient/support/qcharsetdetector.cpp b/src/libraries/qmfclient/support/qcharsetdetector.cpp
index c53f55d9..a57d4a70 100644
--- a/src/libraries/qmfclient/support/qcharsetdetector.cpp
+++ b/src/libraries/qmfclient/support/qcharsetdetector.cpp
@@ -53,7 +53,7 @@
#include <QString>
#include <QStringList>
#include <QTextCodec>
-#include <QDebug>
+#include "qmaillog.h"
QCharsetMatchPrivate::QCharsetMatchPrivate()
: _confidence(0),
@@ -584,7 +584,7 @@ QList<QCharsetMatch> QCharsetDetector::detectAll()
clearError();
text(*it);
if(hasError()) {
- // qDebug() << __PRETTY_FUNCTION__
+ // qMailLog(Messaging) << __PRETTY_FUNCTION__
// << "removing match" << (*it).name()
// << "because it cannot encode the complete input"
// << errorString();
diff --git a/src/libraries/qmfclient/support/qcopadaptor.cpp b/src/libraries/qmfclient/support/qcopadaptor.cpp
index 3003a982..61c3d962 100644
--- a/src/libraries/qmfclient/support/qcopadaptor.cpp
+++ b/src/libraries/qmfclient/support/qcopadaptor.cpp
@@ -45,7 +45,7 @@
#include <QtCore/qmetaobject.h>
#include <QtCore/qdatastream.h>
#include <QtCore/qatomic.h>
-#include <QtCore/qdebug.h>
+#include "qmaillog.h"
#include <QtCore/qcoreapplication.h>
#include <QtCore/qvarlengtharray.h>
diff --git a/src/libraries/qmfclient/support/qcopchannel.cpp b/src/libraries/qmfclient/support/qcopchannel.cpp
index 242ac1e1..3b6539ed 100644
--- a/src/libraries/qmfclient/support/qcopchannel.cpp
+++ b/src/libraries/qmfclient/support/qcopchannel.cpp
@@ -49,7 +49,6 @@
#include "qregexp.h"
#include "qcoreapplication.h"
#include "qeventloop.h"
-#include "qdebug.h"
#include "qtimer.h"
#include "qshareddata.h"
#include "qthreadstorage.h"
diff --git a/src/libraries/qmfclient/support/qmailnamespace.cpp b/src/libraries/qmfclient/support/qmailnamespace.cpp
index d5d148f3..4cd090c1 100644
--- a/src/libraries/qmfclient/support/qmailnamespace.cpp
+++ b/src/libraries/qmfclient/support/qmailnamespace.cpp
@@ -45,9 +45,6 @@
#include "qmaillog.h"
#include <QCoreApplication>
#include <QDir>
-#include <QDebug>
-#include <QDir>
-#include <QtDebug>
#include <QMutex>
#include <QRegExp>
#include <QThreadStorage>
diff --git a/src/libraries/qmfmessageserver/qmailmessagebuffer.cpp b/src/libraries/qmfmessageserver/qmailmessagebuffer.cpp
index 1d48f647..f785231e 100644
--- a/src/libraries/qmfmessageserver/qmailmessagebuffer.cpp
+++ b/src/libraries/qmfmessageserver/qmailmessagebuffer.cpp
@@ -41,10 +41,10 @@
#include "qmailmessagebuffer.h"
#include "qmailstore.h"
+#include <qmaillog.h>
#include <QTimer>
#include <QSettings>
-#include <QDebug>
#include <QFile>
diff --git a/src/tools/messageserver/main.cpp b/src/tools/messageserver/main.cpp
index e1156970..aaa9e202 100644
--- a/src/tools/messageserver/main.cpp
+++ b/src/tools/messageserver/main.cpp
@@ -41,7 +41,6 @@
#include "messageserver.h"
#include <QCoreApplication>
-#include <QDebug>
#include <qmailnamespace.h>
#include <qmaillog.h>
#include <qloggers.h>
diff --git a/tests/tst_qmailmessage/tst_qmailmessage.cpp b/tests/tst_qmailmessage/tst_qmailmessage.cpp
index b415e064..17d6d47f 100644
--- a/tests/tst_qmailmessage/tst_qmailmessage.cpp
+++ b/tests/tst_qmailmessage/tst_qmailmessage.cpp
@@ -1447,7 +1447,6 @@ void tst_QMailMessage::unterminatedDoubleQuote()
QMailMessage m1;
QString testString("\"String with unterminated double quote");
m1.setSubject( testString );
- qDebug() << m1.toRfc2822();
QMailMessage m2(QMailMessage::fromRfc2822(m1.toRfc2822()));
QCOMPARE( m2.subject(), testString );
}