From d8cf7606ea629db13ea09271ddd811c5f3093e86 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sat, 14 Mar 2015 10:01:54 -0700 Subject: [PATCH] Register categories --- src/QGCLoggingCategory.cc | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/QGCLoggingCategory.cc diff --git a/src/QGCLoggingCategory.cc b/src/QGCLoggingCategory.cc new file mode 100644 index 000000000..7a7c3cdae --- /dev/null +++ b/src/QGCLoggingCategory.cc @@ -0,0 +1,42 @@ +/*===================================================================== + + QGroundControl Open Source Ground Control Station + + (c) 2009 - 2015 QGROUNDCONTROL PROJECT + + This file is part of the QGROUNDCONTROL project + + QGROUNDCONTROL 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 3 of the License, or + (at your option) any later version. + + QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see . + + ======================================================================*/ + +/// @file +/// @author Don Gagne + +#include "QGCLoggingCategory.h" + +// Add Global logging categories (not class specific) here using QGC_LOGGING_CATEGORY + // There currently are no global categories + +QGCLoggingCategoryRegister* _instance = NULL; + +QGCLoggingCategoryRegister* QGCLoggingCategoryRegister::instance(void) +{ + if (!_instance) { + _instance = new QGCLoggingCategoryRegister(); + Q_CHECK_PTR(_instance); + } + + return _instance; +} -- 2.22.0