Commit eacdb806 authored by Laurent Montel's avatar Laurent Montel 😁

Use new ECMQtDeclareLoggingCategory

parent a00e1d8f
......@@ -4,7 +4,7 @@ cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set(QT_MIN_VERSION "5.4.0")
set(KF5_VERSION "5.12.0")
find_package(ECM 5.12.0 REQUIRED CONFIG)
find_package(ECM 5.14.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
......@@ -29,7 +29,7 @@ include(KDEInstallDirs)
include(KDECompilerSettings)
include(KDECMakeSettings)
include(ECMAddTests)
include(ECMQtDeclareLoggingCategory)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DTRANSLATION_DOMAIN="kdebugsettings")
......
include_directories(${kdebugsettings_BINARY_DIR}/src)
set(full_source_file
../src/kdebugsettingsdialog.cpp
../src/customdebugsettingspage.cpp
......@@ -11,7 +13,7 @@ set(full_source_file
../src/categorytypecombobox.cpp
../src/kdeapplicationtreelistwidget.cpp
../src/categorywarning.cpp
../src/kdebugsettings_debug.cpp
${CMAKE_BINARY_DIR}/src/kdebugsettings_debug.cpp
)
# convenience macro to add qtest unit tests
......@@ -37,8 +39,8 @@ add_unittest( kdeapplicationdebugsettingpagetest.cpp "../src/kdebugsettings_debu
add_unittest( customdebugsettingspagetest.cpp "../src/kdebugsettings_debug.cpp;../src/categorytypecombobox.cpp;../src/customdebugsettingspage.cpp;../src/configurecustomsettingdialog.cpp;../src/configurecustomsettingwidget.cpp;../src/kdebugsettingsutil.cpp")
add_unittest( configurecustomsettingdialogtest.cpp "../src/kdebugsettings_debug.cpp;../src/categorytypecombobox.cpp;../src/configurecustomsettingdialog.cpp;../src/configurecustomsettingwidget.cpp;../src/kdebugsettingsutil.cpp")
add_unittest( configurecustomsettingwidgettest.cpp "../src/kdebugsettings_debug.cpp;../src/categorytypecombobox.cpp;../src/configurecustomsettingwidget.cpp;../src/kdebugsettingsutil.cpp")
add_unittest( kdebugsettingutiltest.cpp "../src/kdebugsettings_debug.cpp;../src/kdebugsettingsutil.cpp")
add_unittest( environmentsettingsrulespagetest.cpp "../src/environmentsettingsrulespage.cpp;../src/environmentplaintextedit.cpp")
add_unittest( kdebugsettingutiltest.cpp "../src/kdebugsettings_debug.cpp;../src/kdebugsettingsutil.cpp")
add_unittest( categorytypecomboboxtest.cpp "../src/categorytypecombobox.cpp")
add_unittest( kdeapplicationtreelistwidgettest.cpp "../src/kdeapplicationtreelistwidget.cpp;../src/categorytypecombobox.cpp")
add_unittest( categorywarningtest.cpp "../src/categorywarning.cpp")
......@@ -13,8 +13,9 @@ set(kdebugsettings_SRCS
categorytypecombobox.cpp
kdeapplicationtreelistwidget.cpp
categorywarning.cpp
kdebugsettings_debug.cpp
)
ecm_qt_declare_logging_category(kdebugsettings_SRCS HEADER kdebugsettings_debug.h IDENTIFIER KDEBUGSETTINGS_LOG CATEGORY_NAME log_kdebugsettings)
add_executable(kdebugsettings ${kdebugsettings_SRCS})
......
/* 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 "kdebugsettings_debug.h"
Q_LOGGING_CATEGORY(KDEBUGSETTINGS_LOG, "log_kdebugsettings")
/* 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 KDEBUGSETTINGS_DEBUG_H
#define KDEBUGSETTINGS_DEBUG_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KDEBUGSETTINGS_LOG)
#endif
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