mirror of https://github.com/nymea/nymea.git
Make it build with 0.23
parent
fdbdb02c16
commit
d4889b5b78
|
|
@ -3,10 +3,11 @@
|
||||||
|
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
|
||||||
#include "loggingcategories.h"
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
|
Q_DECLARE_LOGGING_CATEGORY(dcPythonIntegrations)
|
||||||
|
|
||||||
/* Returns a new reference to PyObject*. */
|
/* Returns a new reference to PyObject*. */
|
||||||
PyObject *QVariantToPyObject(const QVariant &value)
|
PyObject *QVariantToPyObject(const QVariant &value)
|
||||||
{
|
{
|
||||||
|
|
@ -76,7 +77,7 @@ PyObject* pyLog_write(PyObject* /*self*/, PyObject* args)
|
||||||
if (!PyArg_ParseTuple(args, "s", &what))
|
if (!PyArg_ParseTuple(args, "s", &what))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (!QByteArray(what).trimmed().isEmpty()) {
|
if (!QByteArray(what).trimmed().isEmpty()) {
|
||||||
qCDebug(dcThingManager()) << what;
|
qCDebug(dcPythonIntegrations()) << what;
|
||||||
}
|
}
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
@ -111,7 +112,7 @@ PyObject* pyWarn_write(PyObject* /*self*/, PyObject* args)
|
||||||
if (!PyArg_ParseTuple(args, "s", &what))
|
if (!PyArg_ParseTuple(args, "s", &what))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (!QByteArray(what).trimmed().isEmpty()) {
|
if (!QByteArray(what).trimmed().isEmpty()) {
|
||||||
qCWarning(dcThingManager()) << what;
|
qCWarning(dcPythonIntegrations()) << what;
|
||||||
}
|
}
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@
|
||||||
#include <QFuture>
|
#include <QFuture>
|
||||||
#include <QFutureWatcher>
|
#include <QFutureWatcher>
|
||||||
|
|
||||||
|
NYMEA_LOGGING_CATEGORY(dcPythonIntegrations, "PythonIntegrations")
|
||||||
|
|
||||||
PyThreadState* PythonIntegrationPlugin::s_mainThreadState = nullptr;
|
PyThreadState* PythonIntegrationPlugin::s_mainThreadState = nullptr;
|
||||||
QHash<PythonIntegrationPlugin*, PyObject*> PythonIntegrationPlugin::s_plugins;
|
QHash<PythonIntegrationPlugin*, PyObject*> PythonIntegrationPlugin::s_plugins;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ NYMEA_LOGGING_CATEGORY(dcBluetoothServerTraffic, "BluetoothServerTraffic")
|
||||||
NYMEA_LOGGING_CATEGORY(dcMqtt, "Mqtt")
|
NYMEA_LOGGING_CATEGORY(dcMqtt, "Mqtt")
|
||||||
NYMEA_LOGGING_CATEGORY(dcTranslations, "Translations")
|
NYMEA_LOGGING_CATEGORY(dcTranslations, "Translations")
|
||||||
NYMEA_LOGGING_CATEGORY(dcI2C, "I2C")
|
NYMEA_LOGGING_CATEGORY(dcI2C, "I2C")
|
||||||
NYMEA_LOGGING_CATEGORY(dcPythonIntegrations, "PythonIntegrations")
|
|
||||||
|
|
||||||
|
|
||||||
static QFile s_logFile;
|
static QFile s_logFile;
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,6 @@ Q_DECLARE_LOGGING_CATEGORY(dcCoap)
|
||||||
Q_DECLARE_LOGGING_CATEGORY(dcI2C)
|
Q_DECLARE_LOGGING_CATEGORY(dcI2C)
|
||||||
Q_DECLARE_LOGGING_CATEGORY(dcIntegrations)
|
Q_DECLARE_LOGGING_CATEGORY(dcIntegrations)
|
||||||
Q_DECLARE_LOGGING_CATEGORY(dcJsIntegrations)
|
Q_DECLARE_LOGGING_CATEGORY(dcJsIntegrations)
|
||||||
Q_DECLARE_LOGGING_CATEGORY(dcPythonIntegrations)
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue