Revert "Use ecm_qt_declare_logging_category"
It's missing stuff to work properly. Revert until I figured that out
This reverts commit 8a118a6fae
.
This commit is contained in:
parent
ecbe1acabe
commit
607b9a6566
7 changed files with 103 additions and 15 deletions
|
@ -12,7 +12,6 @@ include(ECMAddTests)
|
||||||
include(ECMSetupVersion)
|
include(ECMSetupVersion)
|
||||||
include(ECMInstallIcons)
|
include(ECMInstallIcons)
|
||||||
include(FeatureSummary)
|
include(FeatureSummary)
|
||||||
include(ECMQtDeclareLoggingCategory)
|
|
||||||
include(GenerateExportHeader)
|
include(GenerateExportHeader)
|
||||||
|
|
||||||
include(KDEConnectMacros.cmake)
|
include(KDEConnectMacros.cmake)
|
||||||
|
|
|
@ -37,16 +37,10 @@ set(kdeconnectcore_SRCS
|
||||||
compositefiletransferjob.cpp
|
compositefiletransferjob.cpp
|
||||||
daemon.cpp
|
daemon.cpp
|
||||||
device.cpp
|
device.cpp
|
||||||
|
core_debug.cpp
|
||||||
notificationserverinfo.cpp
|
notificationserverinfo.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(
|
|
||||||
kdeconnectcore_SRCS
|
|
||||||
HEADER core_debug.h
|
|
||||||
IDENTIFIER KDECONNECT_CORE
|
|
||||||
CATEGORY_NAME kdeconnect.core
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(kdeconnectcore ${kdeconnectcore_SRCS})
|
add_library(kdeconnectcore ${kdeconnectcore_SRCS})
|
||||||
|
|
||||||
target_include_directories(kdeconnectcore PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
target_include_directories(kdeconnectcore PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
||||||
|
|
40
core/core_debug.cpp
Normal file
40
core/core_debug.cpp
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* Copyright 2013 Albert Vaca <albertvaka@gmail.com>
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "core_debug.h"
|
||||||
|
|
||||||
|
Q_LOGGING_CATEGORY(KDECONNECT_CORE, "kdeconnect.core")
|
||||||
|
|
||||||
|
#if defined(__GNU_LIBRARY__)
|
||||||
|
#include <execinfo.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void logBacktrace()
|
||||||
|
{
|
||||||
|
#if defined(__GNU_LIBRARY__)
|
||||||
|
void* array[32];
|
||||||
|
size_t size = backtrace (array, 32);
|
||||||
|
char** strings = backtrace_symbols (array, size);
|
||||||
|
backtrace_symbols_fd(array, size, STDERR_FILENO);
|
||||||
|
free (strings);
|
||||||
|
#endif
|
||||||
|
}
|
32
core/core_debug.h
Normal file
32
core/core_debug.h
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
/**
|
||||||
|
* Copyright 2013 Albert Vaca <albertvaka@gmail.com>
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CORE_DEBUG_H
|
||||||
|
#define CORE_DEBUG_H
|
||||||
|
|
||||||
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
|
#include "kdeconnectcore_export.h"
|
||||||
|
|
||||||
|
KDECONNECTCORE_EXPORT Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_CORE)
|
||||||
|
|
||||||
|
void logBacktrace();
|
||||||
|
|
||||||
|
#endif //CORE_DEBUG_H
|
|
@ -20,13 +20,6 @@ set(libkdeconnect_SRC
|
||||||
# modeltest.cpp
|
# modeltest.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(
|
|
||||||
libkdeconnect_SRC
|
|
||||||
HEADER interfaces_debug.h
|
|
||||||
IDENTIFIER KDECONNECT_INTERFACES
|
|
||||||
CATEGORY_NAME kdeconnect.interfaces
|
|
||||||
)
|
|
||||||
|
|
||||||
geninterface(${CMAKE_SOURCE_DIR}/core/daemon.h daemoninterface)
|
geninterface(${CMAKE_SOURCE_DIR}/core/daemon.h daemoninterface)
|
||||||
geninterface(${CMAKE_SOURCE_DIR}/core/device.h deviceinterface)
|
geninterface(${CMAKE_SOURCE_DIR}/core/device.h deviceinterface)
|
||||||
geninterface(${CMAKE_SOURCE_DIR}/plugins/battery/batterydbusinterface.h devicebatteryinterface)
|
geninterface(${CMAKE_SOURCE_DIR}/plugins/battery/batterydbusinterface.h devicebatteryinterface)
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
#include <dbushelper.h>
|
#include <dbushelper.h>
|
||||||
// #include "modeltest.h"
|
// #include "modeltest.h"
|
||||||
|
|
||||||
|
Q_LOGGING_CATEGORY(KDECONNECT_INTERFACES, "kdeconnect.interfaces");
|
||||||
|
|
||||||
static QString createId() { return QCoreApplication::instance()->applicationName()+QString::number(QCoreApplication::applicationPid()); }
|
static QString createId() { return QCoreApplication::instance()->applicationName()+QString::number(QCoreApplication::applicationPid()); }
|
||||||
|
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(QString, s_keyId, (createId()));
|
Q_GLOBAL_STATIC_WITH_ARGS(QString, s_keyId, (createId()));
|
||||||
|
|
28
interfaces/interfaces_debug.h
Normal file
28
interfaces/interfaces_debug.h
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
/**
|
||||||
|
* Copyright 2014 Alejandro Fiestas Olivares <afiestas@kde.org>
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef KDECONNECT_INTERFACE_DEBUG_H
|
||||||
|
#define KDECONNECT_INTERFACE_DEBUG_H
|
||||||
|
|
||||||
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
|
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_INTERFACES)
|
||||||
|
|
||||||
|
#endif //KDECONNECT_INTERFACE_DEBUG_H
|
Loading…
Reference in a new issue