Commit 60a90980 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Autogenerate debug category file

parent 1618da19
......@@ -2,7 +2,6 @@ set(KLIPPER_VERSION_STRING ${PROJECT_VERSION})
add_definitions(-DTRANSLATION_DOMAIN=\"klipper\")
set(libklipper_common_SRCS
klipper_debug.cpp
klipper.cpp
urlgrabber.cpp
configdialog.cpp
......@@ -19,6 +18,8 @@ set(libklipper_common_SRCS
clipcommandprocess.cpp
)
ecm_qt_declare_logging_category(libklipper_common_SRCS HEADER klipper_debug.h IDENTIFIER KLIPPER_LOG CATEGORY_NAME org.kde.klipper)
find_package(KF5Prison ${KF5_MIN_VERSION})
set_package_properties(KF5Prison PROPERTIES DESCRIPTION "Prison library"
URL "http://projects.kde.org/prison"
......@@ -104,3 +105,5 @@ if(BUILD_TESTING)
add_subdirectory(autotests)
endif()
install( FILES klipper.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
......@@ -3,7 +3,11 @@ include(ECMMarkAsTest)
########################################################
# Test History
########################################################
set(libklipper_test_SRCS)
ecm_qt_declare_logging_category(libklipper_test_SRCS HEADER klipper_debug.h IDENTIFIER KLIPPER_LOG CATEGORY_NAME org.kde.klipper)
set(testHistory_SRCS
${libklipper_test_SRCS}
historytest.cpp
../history.cpp
../historyimageitem.cpp
......@@ -11,7 +15,6 @@ set(testHistory_SRCS
../historystringitem.cpp
../historyurlitem.cpp
../historymodel.cpp
../klipper_debug.cpp
)
add_executable(testHistory ${testHistory_SRCS})
target_link_libraries(testHistory
......@@ -33,7 +36,7 @@ set(testHistoryModel_SRCS
../historyitem.cpp
../historystringitem.cpp
../historyurlitem.cpp
../klipper_debug.cpp
${libklipper_test_SRCS}
)
add_executable(testHistoryModel ${testHistoryModel_SRCS})
target_link_libraries(testHistoryModel
......
org.kde.klipper klipper
/* This file is part of the KDE project
Copyright (C) 2015 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "klipper_debug.h"
Q_LOGGING_CATEGORY(KLIPPER_LOG, "log_klipper", QtInfoMsg)
/* This file is part of the KDE project
Copyright (C) 2015 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KLIPPER_DEBUG_H
#define KLIPPER_DEBUG_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KLIPPER_LOG)
#endif
Supports Markdown
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