Commit 72e8d406 authored by Laurent Montel's avatar Laurent Montel 😁

Use QCDebug

parent 6e39d8c7
......@@ -24,7 +24,6 @@
#include <KLocalizedString>
#include <KActionCollection>
#include <QAction>
#include <QDebug>
#include <QPointer>
#include <ItemModifyJob>
......
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
set(kaddressbookmergelibprivate_common_SRCS)
ecm_qt_declare_logging_category(kaddressbookmergelibprivate_common_SRCS HEADER kaddressbookmergelibprivate_debug.h IDENTIFIER KADDRESSBOOKMERGELIBPRIVATE_LOG CATEGORY_NAME log_kaddressbookmergelibprivate)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../.. )
include_directories(${CMAKE_BINARY_DIR}/kaddressbook/)
......@@ -18,23 +21,23 @@ kaddressbook_merge(mergecontactstest.cpp "../job/mergecontacts.cpp;../kaddressbo
set(KDEPIMLIBS_RUN_ISOLATED_TESTS TRUE)
set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE)
add_akonadi_isolated_test_advanced( mergecontactinfowidgettest.cpp "../widgets/mergecontactinfowidget.cpp" "KF5::AkonadiContact;KF5::KaddressbookGrantlee")
add_akonadi_isolated_test_advanced( mergecontactwidgettest.cpp "../widgets/mergecontactinfowidget.cpp" "kaddressbookmergelibprivate;KF5::KaddressbookGrantlee;KF5::Contacts;KF5::AkonadiContact;KF5::WidgetsAddons")
add_akonadi_isolated_test_advanced( searchandmergecontactduplicatecontactdialogtest.cpp "" "kaddressbookmergelibprivate;KF5::Contacts")
add_akonadi_isolated_test_advanced( searchduplicateresultwidgettest.cpp "" "kaddressbookmergelibprivate;KF5::KaddressbookGrantlee;KF5::Contacts;KF5::WidgetsAddons;KF5::AkonadiWidgets;KF5::AkonadiContact")
add_akonadi_isolated_test_advanced( resultduplicatetreewidgettest.cpp "" "kaddressbookmergelibprivate;KF5::Contacts")
add_akonadi_isolated_test_advanced( searchpotentialduplicatecontactjobtest.cpp "../job/searchpotentialduplicatecontactjob.cpp" "KF5::Contacts")
add_akonadi_isolated_test_advanced( mergecontactselectinformationwidgettest.cpp "" "kaddressbookmergelibprivate;KF5::Contacts")
add_akonadi_isolated_test_advanced( mergecontactselectlistwidgettest.cpp "" "kaddressbookmergelibprivate;KF5::Contacts")
add_akonadi_isolated_test_advanced( mergecontactinfowidgettest.cpp "../widgets/mergecontactinfowidget.cpp;${kaddressbookmergelibprivate_common_SRCS}" "KF5::AkonadiContact;KF5::KaddressbookGrantlee")
add_akonadi_isolated_test_advanced( mergecontactwidgettest.cpp "../widgets/mergecontactinfowidget.cpp;${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF5::KaddressbookGrantlee;KF5::Contacts;KF5::AkonadiContact;KF5::WidgetsAddons")
add_akonadi_isolated_test_advanced( searchandmergecontactduplicatecontactdialogtest.cpp "${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF5::Contacts")
add_akonadi_isolated_test_advanced( searchduplicateresultwidgettest.cpp "${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF5::KaddressbookGrantlee;KF5::Contacts;KF5::WidgetsAddons;KF5::AkonadiWidgets;KF5::AkonadiContact")
add_akonadi_isolated_test_advanced( resultduplicatetreewidgettest.cpp "${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF5::Contacts")
add_akonadi_isolated_test_advanced( searchpotentialduplicatecontactjobtest.cpp "${kaddressbookmergelibprivate_common_SRCS};../job/searchpotentialduplicatecontactjob.cpp" "KF5::Contacts")
add_akonadi_isolated_test_advanced( mergecontactselectinformationwidgettest.cpp "${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF5::Contacts")
add_akonadi_isolated_test_advanced( mergecontactselectlistwidgettest.cpp "${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF5::Contacts")
add_akonadi_isolated_test_advanced( mergecontactselectinformationscrollareatest.cpp "../widgets/mergecontactinfowidget.cpp" "kaddressbookmergelibprivate;KF5::Contacts;KF5::AkonadiContact;KF5::KaddressbookGrantlee")
add_akonadi_isolated_test_advanced( mergecontactselectinformationscrollareatest.cpp "${kaddressbookmergelibprivate_common_SRCS};../widgets/mergecontactinfowidget.cpp" "kaddressbookmergelibprivate;KF5::Contacts;KF5::AkonadiContact;KF5::KaddressbookGrantlee")
add_akonadi_isolated_test_advanced( mergecontactselectinformationtabwidgettest.cpp "" "kaddressbookmergelibprivate;KF5::Contacts")
add_akonadi_isolated_test_advanced( mergecontactselectinformationtabwidgettest.cpp "${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF5::Contacts")
add_akonadi_isolated_test_advanced(mergecontactsdialogtest.cpp "../manualmerge/mergecontactsdialog.cpp;../widgets/mergecontacterrorlabel.cpp;../widgets/mergecontactinfowidget.cpp" "kaddressbookmergelibprivate;KF5::Contacts;KF5::AkonadiContact;KF5::KaddressbookGrantlee;KF5::I18n;KF5::WidgetsAddons")
add_akonadi_isolated_test_advanced(mergecontactwidgetlisttest.cpp "../manualmerge/mergecontactwidgetlist.cpp;" "kaddressbookmergelibprivate;KF5::Contacts;KF5::AkonadiContact")
add_akonadi_isolated_test_advanced(mergecontactsdialogtest.cpp "${kaddressbookmergelibprivate_common_SRCS};../manualmerge/mergecontactsdialog.cpp;../widgets/mergecontacterrorlabel.cpp;../widgets/mergecontactinfowidget.cpp" "kaddressbookmergelibprivate;KF5::Contacts;KF5::AkonadiContact;KF5::KaddressbookGrantlee;KF5::I18n;KF5::WidgetsAddons")
add_akonadi_isolated_test_advanced(mergecontactwidgetlisttest.cpp "${kaddressbookmergelibprivate_common_SRCS};../manualmerge/mergecontactwidgetlist.cpp;" "kaddressbookmergelibprivate;KF5::Contacts;KF5::AkonadiContact")
set( kaddressbook_merge_mergecontactloseinformationwarning_source mergecontactloseinformationwarningtest.cpp ../widgets/mergecontactloseinformationwarning.cpp )
set( kaddressbook_merge_mergecontactloseinformationwarning_source mergecontactloseinformationwarningtest.cpp ../widgets/mergecontactloseinformationwarning.cpp ${kaddressbookmergelibprivate_common_SRCS})
add_executable( mergecontactloseinformationwarningtest ${kaddressbook_merge_mergecontactloseinformationwarning_source})
add_test(mergecontactloseinformationwarningtest mergecontactloseinformationwarningtest)
ecm_mark_as_test(mergecontactloseinformationwarningtest)
......
......@@ -18,7 +18,7 @@
*/
#include "searchpotentialduplicatecontactjob.h"
#include <QDebug>
#include "kaddressbookmergelibprivate_debug.h"
#include <KContacts/Addressee>
using namespace KABMergeContacts;
......@@ -69,7 +69,7 @@ Akonadi::Item::List SearchPotentialDuplicateContactJob::checkList(const Akonadi:
lst.append(firstItem);
mListDuplicate.append(lst);
}
qDebug() << " duplicate number " << lst.count();
qCDebug(KADDRESSBOOKMERGELIBPRIVATE_LOG) << " duplicate number " << lst.count();
}
return notDuplicate;
}
......@@ -84,9 +84,9 @@ bool SearchPotentialDuplicateContactJob::isDuplicate(const Akonadi::Item &itemA,
const KContacts::Addressee addressB = itemB.payload<KContacts::Addressee>();
//
if (!addressA.name().isEmpty() && !addressB.name().isEmpty()) {
qDebug() << " addressB" << addressB.name() << " addressA.name()" << addressA.name();
qCDebug(KADDRESSBOOKMERGELIBPRIVATE_LOG) << " addressB" << addressB.name() << " addressA.name()" << addressA.name();
if (addressA.name() == addressB.name()) {
qDebug() << " return true;";
qCDebug(KADDRESSBOOKMERGELIBPRIVATE_LOG) << " return true;";
return true;
}
}
......
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