Commit 33bd32b3 authored by Jeremy Whiting's avatar Jeremy Whiting

Use ecm to generate Qt Logging Category header and cpp files.

parent df260e7b
......@@ -29,6 +29,7 @@ find_package(KF5 REQUIRED COMPONENTS
find_package(KF5 COMPONENTS DocTools)
include(ECMSetupVersion)
include(ECMQtDeclareLoggingCategory)
include(KDEInstallDirs)
include(KDECompilerSettings)
include(KDECMakeSettings)
......@@ -106,7 +107,6 @@ add_definitions(-DBUILD_ZEROCONF)
set(krdc_SRCS
config/hostpreferenceslist.cpp
config/preferencesdialog.cpp
core/logging.cpp
floatingtoolbar.cpp
bookmarkmanager.cpp
connectiondelegate.cpp
......@@ -121,6 +121,8 @@ ki18n_wrap_ui(krdc_SRCS
config/general.ui
)
ecm_qt_declare_logging_category(krdc_SRCS HEADER krdc_debug.h IDENTIFIER KRDC CATEGORY_NAME KRDC)
add_executable(krdc ${krdc_SRCS})
target_link_libraries(krdc
......
......@@ -23,7 +23,7 @@
#include "bookmarkmanager.h"
#include "mainwindow.h"
#include "logging.h"
#include "krdc_debug.h"
#include <KBookmarks/KBookmarkOwner>
#include <KLocalizedString>
......
......@@ -23,7 +23,7 @@
#include "hostpreferenceslist.h"
#include "hostpreferences.h"
#include "logging.h"
#include "krdc_debug.h"
#include <QIcon>
#include <KLocalizedString>
......
......@@ -22,7 +22,7 @@
****************************************************************************/
#include "preferencesdialog.h"
#include "logging.h"
#include "krdc_debug.h"
#include "hostpreferenceslist.h"
#include "ui_general.h"
......
......@@ -4,12 +4,13 @@ include(GenerateExportHeader)
set(krdccore_SRCS
remoteviewfactory.cpp
remoteview.cpp
logging.cpp
hostpreferences.cpp
)
kconfig_add_kcfg_files(krdccore_SRCS settings.kcfgc)
ecm_qt_declare_logging_category(krdccore_SRCS HEADER krdc_debug.h IDENTIFIER KRDC CATEGORY_NAME KRDC)
add_library(krdccore SHARED ${krdccore_SRCS})
kcoreaddons_desktop_to_json(krdccore krdc_plugin.desktop)
......
......@@ -22,7 +22,7 @@
****************************************************************************/
#include "hostpreferences.h"
#include "logging.h"
#include "krdc_debug.h"
#include "settings.h"
#include <KLocalizedString>
......
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "logging.h"
Q_LOGGING_CATEGORY(KRDC, "KRDC")
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef KRDC_LOGGING_H
#define KRDC_LOGGING_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KRDC)
#endif
......@@ -23,7 +23,7 @@
****************************************************************************/
#include "remoteview.h"
#include "logging.h"
#include "krdc_debug.h"
#include <QUrl>
#include <QBitmap>
......
......@@ -24,7 +24,7 @@
****************************************************************************/
#include "floatingtoolbar.h"
#include "logging.h"
#include "krdc_debug.h"
#include <QApplication>
#include <QBitmap>
......
......@@ -23,7 +23,7 @@
****************************************************************************/
#include "mainwindow.h"
#include "logging.h"
#include "krdc_debug.h"
#include "krdc_version.h"
#include <KCoreAddons/KAboutData>
......
......@@ -23,7 +23,7 @@
****************************************************************************/
#include "mainwindow.h"
#include "logging.h"
#include "krdc_debug.h"
#include "remoteview.h"
#include "settings.h"
#include "config/preferencesdialog.h"
......
......@@ -23,7 +23,7 @@
****************************************************************************/
#include "remotedesktopsmodel.h"
#include "logging.h"
#include "krdc_debug.h"
#include <KLocalizedString>
#include<KCoreAddons/KFormat>
......
......@@ -22,7 +22,7 @@
****************************************************************************/
#include "tabbedviewwidget.h"
#include "logging.h"
#include "krdc_debug.h"
#include <QTabBar>
......
......@@ -10,10 +10,11 @@ if(LIBVNCSERVER_FOUND)
vnchostpreferences.cpp
vncclientthread.cpp
vncviewfactory.cpp
../core/logging.cpp
vncview.cpp
)
ecm_qt_declare_logging_category(vncplugin_SRCS HEADER krdc_debug.h IDENTIFIER KRDC CATEGORY_NAME KRDC)
ki18n_wrap_ui(vncplugin_SRCS
vncpreferences.ui
)
......
......@@ -7,5 +7,5 @@ DEFINES += QTONLY
QT += core gui widgets
HEADERS += remoteview.h vncclientthread.h vncview.h logging.h
SOURCES += main.cpp remoteview.cpp vncclientthread.cpp vncview.cpp logging.cpp
HEADERS += remoteview.h vncclientthread.h vncview.h krdc_debug.h
SOURCES += main.cpp remoteview.cpp vncclientthread.cpp vncview.cpp krdc_debug.cpp
......@@ -24,7 +24,7 @@
#include <QApplication>
#include "vncview.h"
#include "logging.h"
#include "krdc_debug.h"
int main(int argc, char *argv[])
{
......
......@@ -22,7 +22,7 @@
****************************************************************************/
#include "vncclientthread.h"
#include "logging.h"
#include "krdc_debug.h"
#include <cerrno>
#include <netinet/in.h>
......
......@@ -22,7 +22,7 @@
****************************************************************************/
#include "vncview.h"
#include "logging.h"
#include "krdc_debug.h"
#include <QApplication>
#include <QImage>
......
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