Commit 785e196d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Convert to qCDebug

parent c255a9ad
...@@ -6,9 +6,16 @@ find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED) ...@@ -6,9 +6,16 @@ find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
# Turn exceptions on # Turn exceptions on
kde_enable_exceptions() kde_enable_exceptions()
ecm_qt_declare_logging_category(kmime_autotest_SRCS
HEADER kmime_debug.h
IDENTIFIER KMIME_LOG
CATEGORY_NAME org.kde.pim.kmime
)
macro(ADD_KMIME_TEST) macro(ADD_KMIME_TEST)
foreach(_testName ${ARGN}) foreach(_testName ${ARGN})
add_executable(${_testName} ${_testName}.cpp) add_executable(${_testName} ${_testName}.cpp ${kmime_autotest_SRCS})
add_test(NAME kmime-${_testName} COMMAND ${_testName}) add_test(NAME kmime-${_testName} COMMAND ${_testName})
target_link_libraries(${_testName} target_link_libraries(${_testName}
KF5Mime KF5Mime
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
*/ */
#include "kmime_codecs.h" #include "kmime_codecs.h"
#include "kmime_debug.h"
#include <KCharsets> #include <KCharsets>
#include <QDebug> #include <QDebug>
...@@ -282,7 +282,7 @@ QString decodeRFC2231String(const QByteArray &str, QByteArray &usedCS, const QBy ...@@ -282,7 +282,7 @@ QString decodeRFC2231String(const QByteArray &str, QByteArray &usedCS, const QBy
} }
p++; p++;
} }
qDebug() << "Got pre-decoded:" << st; qCDebug(KMIME_LOG) << "Got pre-decoded:" << st;
const QTextCodec *charsetcodec = KCharsets::charsets()->codecForName(QString::fromLatin1(charset)); const QTextCodec *charsetcodec = KCharsets::charsets()->codecForName(QString::fromLatin1(charset));
if (!charsetcodec || forceCS) { if (!charsetcodec || forceCS) {
charsetcodec = KCharsets::charsets()->codecForName(QString::fromLatin1(defaultCS)); charsetcodec = KCharsets::charsets()->codecForName(QString::fromLatin1(defaultCS));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment