Commit 6e39d8c7 authored by Laurent Montel's avatar Laurent Montel 😁

Use QCDebug

parent db0a5364
......@@ -18,6 +18,7 @@
*/
#include "checkgravatarplugininterface.h"
#include "kaddressbook_checkgravatarplugin_debug.h"
#include "gravatar/widgets/gravatarupdatedialog.h"
#include <KMessageBox>
#include <KLocalizedString>
......@@ -134,7 +135,7 @@ void CheckGravatarPluginInterface::exec()
void CheckGravatarPluginInterface::slotModifyContactFinished(KJob *job)
{
if (job->error()) {
qDebug() << "Error while modifying items. " << job->error() << job->errorString();
qCDebug(KADDRESSBOOK_CHECKGRAVATAR_LOG) << "Error while modifying items. " << job->error() << job->errorString();
}
}
......
......@@ -4,8 +4,11 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/
set(KDEPIMLIBS_RUN_ISOLATED_TESTS TRUE)
set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE)
set(kaddressbook_checkgravatarplugin_test_SRCS)
ecm_qt_declare_logging_category(kaddressbook_checkgravatarplugin_test_SRCS HEADER kaddressbook_checkgravatarplugin_debug.h IDENTIFIER KADDRESSBOOK_CHECKGRAVATAR_LOG CATEGORY_NAME log_kaddressbook_checkgravatar)
add_akonadi_isolated_test_advanced( gravatarupdatejobtest.cpp "../job/gravatarupdatejob.cpp" "KF5::PimCommon;KF5::Contacts;KF5::Gravatar;KF5::I18n")
add_akonadi_isolated_test_advanced( gravatarupdatedialogtest.cpp "../widgets/gravatarupdatedialog.cpp;../widgets/gravatarupdatewidget.cpp" "KF5::PimCommon;KF5::Gravatar;KF5::I18n")
add_akonadi_isolated_test_advanced( gravatarupdatewidgettest.cpp "../widgets/gravatarupdatewidget.cpp" "KF5::PimCommon;KF5::Gravatar;KF5::I18n")
add_akonadi_isolated_test_advanced( gravatarupdatejobtest.cpp "../job/gravatarupdatejob.cpp;${kaddressbook_checkgravatarplugin_test_SRCS}" "KF5::PimCommon;KF5::Contacts;KF5::Gravatar;KF5::I18n")
add_akonadi_isolated_test_advanced( gravatarupdatedialogtest.cpp "../widgets/gravatarupdatedialog.cpp;../widgets/gravatarupdatewidget.cpp;${kaddressbook_checkgravatarplugin_test_SRCS}" "KF5::PimCommon;KF5::Gravatar;KF5::I18n")
add_akonadi_isolated_test_advanced( gravatarupdatewidgettest.cpp "../widgets/gravatarupdatewidget.cpp;${kaddressbook_checkgravatarplugin_test_SRCS}" "KF5::PimCommon;KF5::Gravatar;KF5::I18n")
......@@ -18,12 +18,12 @@
*/
#include "gravatarupdatejob.h"
#include "kaddressbook_checkgravatarplugin_debug.h"
#include <gravatar/gravatarresolvurljob.h>
#include <KContacts/Addressee>
#include <AkonadiCore/ItemModifyJob>
#include <QDebug>
using namespace KABGravatar;
GravatarUpdateJob::GravatarUpdateJob(QObject *parent)
......@@ -111,7 +111,7 @@ void GravatarUpdateJob::updatePixmap(const QPixmap &pix)
void GravatarUpdateJob::slotUpdateGravatarDone(KJob *job)
{
if (job->error()) {
qDebug() << "Error during modify item :" << job->errorString();
qCDebug(KADDRESSBOOK_CHECKGRAVATAR_LOG) << "Error during modify item :" << job->errorString();
}
deleteLater();
}
set(gravatarupdatedialog_gui_SRCS gravatarupdatedialog_gui.cpp ../widgets/gravatarupdatedialog.cpp ../widgets/gravatarupdatewidget.cpp ../job/gravatarupdatejob.cpp)
set(kaddressbook_checkgravatarplugin_test_SRCS)
ecm_qt_declare_logging_category(kaddressbook_checkgravatarplugin_test_SRCS HEADER kaddressbook_checkgravatarplugin_debug.h IDENTIFIER KADDRESSBOOK_CHECKGRAVATAR_LOG CATEGORY_NAME log_kaddressbook_checkgravatar)
set(gravatarupdatedialog_gui_SRCS ${kaddressbook_checkgravatarplugin_test_SRCS} gravatarupdatedialog_gui.cpp ../widgets/gravatarupdatedialog.cpp ../widgets/gravatarupdatewidget.cpp ../job/gravatarupdatejob.cpp)
add_executable(gravatarupdatedialog_gui ${gravatarupdatedialog_gui_SRCS})
ecm_mark_as_test(gravatarupdatedialog_gui)
target_link_libraries(gravatarupdatedialog_gui
......
......@@ -23,7 +23,6 @@
#include <KActionCollection>
#include <QAction>
#include <QPointer>
#include <QDebug>
#include "manualmerge/mergecontactsdialog.h"
......
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