Commit bb533b2d authored by Stefan Brüns's avatar Stefan Brüns

Add categorized logging for baloo-widgets

Summary: Add logging category "org.kde.baloo.widgets".

Reviewers: #baloo, astippich, ngraham

Reviewed By: #baloo, astippich, ngraham

Tags: #baloo

Differential Revision: https://phabricator.kde.org/D25247
parent c20dc3cb
......@@ -26,6 +26,7 @@ include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMGenerateHeaders)
include(ECMAddTests)
include(ECMQtDeclareLoggingCategory)
include(CMakePackageConfigHelpers)
add_definitions(-DQT_NO_FOREACH)
......@@ -72,6 +73,7 @@ install(EXPORT KF5BalooWidgetsTargets
FILE KF5BalooWidgetsTargets.cmake
)
install(FILES baloo-widgets.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
feature_summary(WHAT ALL
INCLUDE_QUIET_PACKAGES
......
org.kde.baloo.widgets Baloo Widgets DEFAULT_SEVERITY [WARNING] IDENTIFIER [Baloo::WIDGETS]
......@@ -20,6 +20,14 @@ set(widgets_SRCS
filefetchjob.cpp
)
ecm_qt_declare_logging_category(
widgets_SRCS
HEADER "widgetsdebug.h"
IDENTIFIER "Baloo::WIDGETS"
DEFAULT_SEVERITY Warning
CATEGORY_NAME "org.kde.baloo.widgets"
)
add_library(KF5BalooWidgets ${widgets_SRCS})
add_library(KF5::BalooWidgets ALIAS KF5BalooWidgets)
......
......@@ -20,13 +20,13 @@
#include "indexeddataretriever.h"
#include "filemetadatautil_p.h"
#include "widgetsdebug.h"
#include "extractorutil_p.h"
#include <QDataStream>
#include <QProcess>
#include <QFileInfo>
#include <QStandardPaths>
#include <QDebug>
using namespace Baloo;
......@@ -53,7 +53,7 @@ void IndexedDataRetriever::start()
void IndexedDataRetriever::slotIndexedFile(int exitCode, QProcess::ExitStatus exitStatus)
{
if (exitStatus == QProcess::CrashExit) {
qWarning() << "Extractor crashed when processing" << m_url;
qCWarning(WIDGETS) << "Extractor crashed when processing" << m_url;
}
QByteArray data = m_process->readAllStandardOutput();
QDataStream in(&data, QIODevice::ReadOnly);
......
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