Commit 523ef71c authored by Méven Car's avatar Méven Car Committed by Méven Car
Browse files

[dataengine/geolocation] Add logging category

Reviewers: apol, #plasma, crossi, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26056
parent 09cca0f2
......@@ -67,6 +67,7 @@ set_package_properties(libgps PROPERTIES DESCRIPTION "GPS support for geolocatio
if(LIBGPS_FOUND)
include_directories(${LIBGPS_INCLUDES} ${LIBGPS_INCLUDE_DIR})
set(plasma_geolocation_gps_SRCS location_gps.cpp)
ecm_qt_declare_logging_category(plasma_geolocation_gps_SRCS HEADER geolocdebug.h IDENTIFIER DATAENGINE_GEOLOCATION CATEGORY_NAME org.kde.plasma.dataengine.geolocation)
add_library(plasma-geolocation-gps MODULE ${plasma_geolocation_gps_SRCS})
target_link_libraries(plasma-geolocation-gps plasma-geolocation-interface ${LIBGPS_LIBRARIES})
install(FILES plasma-geolocation-gps.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
......
......@@ -16,7 +16,7 @@
*/
#include "location_gps.h"
#include <QDebug>
#include "geolocdebug.h"
Gpsd::Gpsd(gps_data_t* gpsdata)
: m_gpsdata(gpsdata)
......@@ -90,12 +90,12 @@ Gps::Gps(QObject* parent, const QVariantList& args)
gps_data_t* m_gpsdata = gps_open("localhost", DEFAULT_GPSD_PORT);
if (m_gpsdata) {
#endif
qDebug() << "gpsd found.";
qCDebug(DATAENGINE_GEOLOCATION)<< "gpsd found.";
m_gpsd = new Gpsd(m_gpsdata);
connect(m_gpsd, SIGNAL(dataReady(Plasma::DataEngine::Data)),
this, SLOT(setData(Plasma::DataEngine::Data)));
} else {
qDebug() << "gpsd not found";
qCWarning(DATAENGINE_GEOLOCATION) << "gpsd not found";
}
setIsAvailable(m_gpsd);
......
......@@ -2,3 +2,4 @@ org.kde.kf5.ksmserver ksmserver (ksmserver) IDENTIFIER [KSMSERVER]
org.kde.plasma.runner.services Plasma Runner Services DEFAULT_SEVERITY [WARNING] IDENTIFIER [RUNNER_SERVICES]
org.kde.plasma.runner.appstream Plasma Runner Appstream DEFAULT_SEVERITY [WARNING] IDENTIFIER [RUNNER_APPSTREAM]
org.kde.plasma.runner.bookmarks Plasma Runner Bookmarks DEFAULT_SEVERITY [WARNING] IDENTIFIER [RUNNER_BOOKMARKS]
org.kde.plasma.dataengine.geolocation Plasma Data engine Geolocation DEFAULT_SEVERITY [WARNING] IDENTIFIER [DATAENGINE_GEOLOCATION]
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