summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-10-11 07:59:28 +0200
committerMontel Laurent <[email protected]>2015-10-11 07:59:28 +0200
commit0257df4d5e3a9d4c08585a72de1f491f7bc531cf (patch)
treef90e8d9724cb95ed1c0d5060688dbc27c45b0df0
parent928bc3e052fecbe7d6dcd2118ddeb333143db598 (diff)
Add debug categories
-rw-r--r--kdepim.categories4
-rw-r--r--messageviewer/src/viewerplugins/autotests/CMakeLists.txt12
-rw-r--r--messageviewer/src/viewerplugins/createeventplugin/CMakeLists.txt2
-rw-r--r--messageviewer/src/viewerplugins/createeventplugin/eventedit.cpp8
-rw-r--r--messageviewer/src/viewerplugins/createnoteplugin/CMakeLists.txt2
-rw-r--r--messageviewer/src/viewerplugins/createnoteplugin/noteedit.cpp6
-rw-r--r--messageviewer/src/viewerplugins/createnoteplugin/viewerplugincreatenoteinterface.cpp3
-rw-r--r--messageviewer/src/viewerplugins/createtodoplugin/CMakeLists.txt2
-rw-r--r--messageviewer/src/viewerplugins/createtodoplugin/todoedit.cpp5
9 files changed, 29 insertions, 15 deletions
diff --git a/kdepim.categories b/kdepim.categories
index 2bc8875..40ff764 100644
--- a/kdepim.categories
+++ b/kdepim.categories
@@ -64,3 +64,7 @@ log_libkleopatraclientcore libkleopatraclient (kleopatra)
log_grantleethemeeditor kdepim (grantleethemeeditor)
log_korganizer_kontactplugins_specialdates kdepim (kontactplugins korganizer special dates)
log_gravatar kdepim (libgravatar)
+log_createeventplugin kdepim (create event plugin)
+log_createnoteplugin kdepim (create note plugin)
+log_createtodoplugin kdepim (create todo plugin)
+
diff --git a/messageviewer/src/viewerplugins/autotests/CMakeLists.txt b/messageviewer/src/viewerplugins/autotests/CMakeLists.txt
index e989ecb..77843fa 100644
--- a/messageviewer/src/viewerplugins/autotests/CMakeLists.txt
+++ b/messageviewer/src/viewerplugins/autotests/CMakeLists.txt
@@ -1,6 +1,10 @@
+set(common_SRCS)
+ecm_qt_declare_logging_category(common_SRCS HEADER createeventplugin_debug.h IDENTIFIER CREATEEVENTPLUGIN_LOG CATEGORY_NAME log_createeventplugin)
+ecm_qt_declare_logging_category(common_SRCS HEADER createnoteplugin_debug.h IDENTIFIER CREATENOTEPLUGIN_LOG CATEGORY_NAME log_createnoteplugin)
+ecm_qt_declare_logging_category(common_SRCS HEADER createtodoplugin_debug.h IDENTIFIER CREATETODOPLUGIN_LOG CATEGORY_NAME log_createtodoplugin)
macro(add_messageviewer_viewerplugin_unittest _source _additional _jsonfile)
- set( _test ${_source} ${_additional})
+ set( _test ${_source} ${_additional} ${common_SRCS})
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${_test} )
kcoreaddons_desktop_to_json(${_name} ${_jsonfile})
@@ -11,8 +15,9 @@ macro(add_messageviewer_viewerplugin_unittest _source _additional _jsonfile)
endmacro ()
+
macro(add_messageviewer_viewerplugin_class_unittest _source )
- set( _test ${_source})
+ set( _test ${_source} ${common_SRCS})
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${_test} )
add_test( ${_name} ${_name} )
@@ -21,8 +26,9 @@ macro(add_messageviewer_viewerplugin_class_unittest _source )
target_link_libraries( ${_name} KF5::MessageViewer KF5::Libkleo KF5::QGpgme Qt5::Test Qt5::WebKitWidgets KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::AkonadiNotes KF5::CalendarCore KF5::GrantleeTheme)
endmacro ()
+
macro(add_messageviewer_viewerplugin_widget_unittest _source _additional )
- set( _test ${_source} ${_additional})
+ set( _test ${_source} ${_additional} ${common_SRCS})
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${_test} )
add_test( ${_name} ${_name} )
diff --git a/messageviewer/src/viewerplugins/createeventplugin/CMakeLists.txt b/messageviewer/src/viewerplugins/createeventplugin/CMakeLists.txt
index 75aa6aa..0873a76 100644
--- a/messageviewer/src/viewerplugins/createeventplugin/CMakeLists.txt
+++ b/messageviewer/src/viewerplugins/createeventplugin/CMakeLists.txt
@@ -5,6 +5,8 @@ set(messageviewer_createeventplugin_SRCS
eventdatetimewidget.cpp
)
+ecm_qt_declare_logging_category(messageviewer_createeventplugin_SRCS HEADER createeventplugin_debug.h IDENTIFIER CREATEEVENTPLUGIN_LOG CATEGORY_NAME log_createeventplugin)
+
add_library(messageviewer_createeventplugin MODULE ${messageviewer_createeventplugin_SRCS})
target_link_libraries(messageviewer_createeventplugin
diff --git a/messageviewer/src/viewerplugins/createeventplugin/eventedit.cpp b/messageviewer/src/viewerplugins/createeventplugin/eventedit.cpp
index 0b74b11..a4fe4f6 100644
--- a/messageviewer/src/viewerplugins/createeventplugin/eventedit.cpp
+++ b/messageviewer/src/viewerplugins/createeventplugin/eventedit.cpp
@@ -16,7 +16,7 @@
*/
#include "eventedit.h"
-#include "messageviewer_debug.h"
+#include "createeventplugin_debug.h"
#include "globalsettings_messageviewer.h"
#include "eventdatetimewidget.h"
@@ -253,19 +253,19 @@ void EventEdit::slotCloseWidget()
void EventEdit::slotReturnPressed()
{
if (!mMessage) {
- //qCDebug(MESSAGEVIEWER_LOG) << " Message is null";
+ qCDebug(CREATEEVENTPLUGIN_LOG) << " Message is null";
return;
}
const Akonadi::Collection collection = mCollectionCombobox->currentCollection();
if (!collection.isValid()) {
- //qCDebug(MESSAGEVIEWER_LOG) << " Collection is not valid";
+ qCDebug(CREATEEVENTPLUGIN_LOG) << " Collection is not valid";
return;
}
const QDateTime dtstart = mStartDateTimeEdit->dateTime();
const QDateTime dtend = mEndDateTimeEdit->dateTime();
if (!dtstart.isValid() || !dtend.isValid()) {
- //qCDebug(MESSAGEVIEWER_LOG) << " date is not valid !";
+ qCDebug(CREATEEVENTPLUGIN_LOG) << " date is not valid !";
return;
}
diff --git a/messageviewer/src/viewerplugins/createnoteplugin/CMakeLists.txt b/messageviewer/src/viewerplugins/createnoteplugin/CMakeLists.txt
index 2e4c4cb..4fb0c09 100644
--- a/messageviewer/src/viewerplugins/createnoteplugin/CMakeLists.txt
+++ b/messageviewer/src/viewerplugins/createnoteplugin/CMakeLists.txt
@@ -3,7 +3,7 @@ set(messageviewer_createnoteplugin_SRCS
viewerplugincreatenoteinterface.cpp
noteedit.cpp
)
-
+ecm_qt_declare_logging_category(messageviewer_createnoteplugin_SRCS HEADER createnoteplugin_debug.h IDENTIFIER CREATENOTEPLUGIN_LOG CATEGORY_NAME log_createnoteplugin)
add_library(messageviewer_createnoteplugin MODULE ${messageviewer_createnoteplugin_SRCS})
target_link_libraries(messageviewer_createnoteplugin
diff --git a/messageviewer/src/viewerplugins/createnoteplugin/noteedit.cpp b/messageviewer/src/viewerplugins/createnoteplugin/noteedit.cpp
index 7551127..dae0195 100644
--- a/messageviewer/src/viewerplugins/createnoteplugin/noteedit.cpp
+++ b/messageviewer/src/viewerplugins/createnoteplugin/noteedit.cpp
@@ -17,7 +17,7 @@
#include "noteedit.h"
#include "globalsettings_messageviewer.h"
-
+#include "createnoteplugin_debug.h"
#include <IncidenceEditorsng/IncidenceDialogFactory>
#include <IncidenceEditorsng/IncidenceDialog>
@@ -203,12 +203,12 @@ void NoteEdit::slotCloseWidget()
void NoteEdit::slotReturnPressed()
{
if (!mMessage) {
- //qCDebug(MESSAGEVIEWER_LOG) << " Message is null";
+ qCDebug(CREATENOTEPLUGIN_LOG) << " Message is null";
return;
}
const Akonadi::Collection collection = mCollectionCombobox->currentCollection();
if (!collection.isValid()) {
- //qCDebug(MESSAGEVIEWER_LOG) << " Collection is not valid";
+ qCDebug(CREATENOTEPLUGIN_LOG) << " Collection is not valid";
return;
}
diff --git a/messageviewer/src/viewerplugins/createnoteplugin/viewerplugincreatenoteinterface.cpp b/messageviewer/src/viewerplugins/createnoteplugin/viewerplugincreatenoteinterface.cpp
index fefa2ee..8484d1c 100644
--- a/messageviewer/src/viewerplugins/createnoteplugin/viewerplugincreatenoteinterface.cpp
+++ b/messageviewer/src/viewerplugins/createnoteplugin/viewerplugincreatenoteinterface.cpp
@@ -17,6 +17,7 @@
#include "viewerplugincreatenoteinterface.h"
#include "noteedit.h"
+#include "createnoteplugin_debug.h"
#include <KLocalizedString>
#include <KActionCollection>
@@ -103,7 +104,7 @@ void ViewerPluginCreatenoteInterface::showCreateNewNoteWidget()
void ViewerPluginCreatenoteInterface::slotNoteItemFetched(KJob *job)
{
if (job->error()) {
- //qCDebug(MESSAGEVIEWER_LOG) << "There is not valid note:" << job->errorString();
+ qCDebug(CREATENOTEPLUGIN_LOG) << "There is not valid note:" << job->errorString();
showCreateNewNoteWidget();
} else {
Akonadi::ItemFetchJob *fetch = qobject_cast<Akonadi::ItemFetchJob *>(job);
diff --git a/messageviewer/src/viewerplugins/createtodoplugin/CMakeLists.txt b/messageviewer/src/viewerplugins/createtodoplugin/CMakeLists.txt
index 60f7058..9ec74f7 100644
--- a/messageviewer/src/viewerplugins/createtodoplugin/CMakeLists.txt
+++ b/messageviewer/src/viewerplugins/createtodoplugin/CMakeLists.txt
@@ -3,7 +3,7 @@ set(messageviewer_createtodoplugin_SRCS
viewerplugincreatetodointerface.cpp
todoedit.cpp
)
-
+ecm_qt_declare_logging_category(messageviewer_createtodoplugin_SRCS HEADER createtodoplugin_debug.h IDENTIFIER CREATETODOPLUGIN_LOG CATEGORY_NAME log_createtodoplugin)
add_library(messageviewer_createtodoplugin MODULE ${messageviewer_createtodoplugin_SRCS})
target_link_libraries(messageviewer_createtodoplugin
diff --git a/messageviewer/src/viewerplugins/createtodoplugin/todoedit.cpp b/messageviewer/src/viewerplugins/createtodoplugin/todoedit.cpp
index 491dc6f..d3498a7 100644
--- a/messageviewer/src/viewerplugins/createtodoplugin/todoedit.cpp
+++ b/messageviewer/src/viewerplugins/createtodoplugin/todoedit.cpp
@@ -17,6 +17,7 @@
#include "todoedit.h"
#include "globalsettings_messageviewer.h"
+#include "createtodoplugin_debug.h"
#include <KLocalizedString>
#include <QLineEdit>
#include <QIcon>
@@ -218,12 +219,12 @@ void TodoEdit::slotCloseWidget()
void TodoEdit::slotReturnPressed()
{
if (!mMessage) {
- //qCDebug(MESSAGEVIEWER_LOG) << " Message is null";
+ qCDebug(CREATETODOPLUGIN_LOG) << " Message is null";
return;
}
const Akonadi::Collection collection = mCollectionCombobox->currentCollection();
if (!collection.isValid()) {
- //qCDebug(MESSAGEVIEWER_LOG) << " Collection is not valid";
+ qCDebug(CREATETODOPLUGIN_LOG) << " Collection is not valid";
return;
}