ATBUpdateTool/UpdatePTUDevCtrl/message_handler.h

24 lines
733 B
C
Raw Normal View History

2023-04-05 14:43:27 +02:00
#ifndef MESSAGE_HANDLER_H_INCLUDED
#define MESSAGE_HANDLER_H_INCLUDED
#include <QtGlobal>
2023-08-06 07:34:17 +02:00
#ifdef __linux__
#include <syslog.h>
#endif
2023-04-05 14:43:27 +02:00
2023-08-06 07:34:17 +02:00
int getDebugLevel();
void setDebugLevel(int newDebugLevel);
2023-04-05 14:43:27 +02:00
bool messageHandlerInstalled();
QtMessageHandler atbInstallMessageHandler(QtMessageHandler handler);
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
// typedef void (*QtMessageHandler)(QtMsgType, const char *);
void atbDebugOutput(QtMsgType type, const char *msg);
#elif QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// typedef void (*QtMessageHandler)(QtMsgType, const QMessageLogContext &, const QString &);
void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg);
#endif
#endif // MESSAGE_HANDLER_H_INCLUDED