X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Flogging.cpp;h=49b7d5828359962dcc0f4fbdc274865c783c826d;hb=b51310723cafcb7ab805ed528eb29fb4402d6d43;hp=ea0798286e6135dc8a57ab0b2b46669d06f28b93;hpb=bcb4c327ee9b8d2172d126429ba017884d079d4c;p=pulseview.git
diff --git a/pv/logging.cpp b/pv/logging.cpp
index ea07982..49b7d58 100644
--- a/pv/logging.cpp
+++ b/pv/logging.cpp
@@ -36,7 +36,7 @@ const int Logging::MAX_BUFFER_SIZE = 50000;
Logging::~Logging()
{
- qInstallMessageHandler(0);
+ qInstallMessageHandler(nullptr);
sr_log_callback_set_default();
#ifdef ENABLE_DECODE
srd_log_callback_set_default();
@@ -55,9 +55,9 @@ void Logging::init()
buffer_.reserve(buffer_size_);
qInstallMessageHandler(log_pv);
- sr_log_callback_set(log_libsigrok, nullptr);
+ sr_log_callback_set(log_sr, nullptr);
#ifdef ENABLE_DECODE
- srd_log_callback_set(log_libsrd, nullptr);
+ srd_log_callback_set(log_srd, nullptr);
#endif
GlobalSettings::add_change_handler(this);
@@ -72,7 +72,9 @@ int Logging::get_log_level() const
void Logging::set_log_level(int level)
{
sr_log_loglevel_set(level);
+#ifdef ENABLE_DECODE
srd_log_loglevel_set(level);
+#endif
}
QString Logging::get_log() const
@@ -105,7 +107,7 @@ void Logging::log(const QString &text, int source)
s = QString("sr: %1").arg(text);
break;
case LogSource_srd:
- s = QString("srd: %1").arg(text);
+ s = QString("srd: %1").arg(text);
break;
default:
s = text;
@@ -129,7 +131,7 @@ void Logging::log_pv(QtMsgType type, const QMessageLogContext &context, const QS
logging.log(msg, LogSource_pv);
}
-int Logging::log_libsigrok(void *cb_data, int loglevel, const char *format, va_list args)
+int Logging::log_sr(void *cb_data, int loglevel, const char *format, va_list args)
{
(void)cb_data;
(void)loglevel;
@@ -142,7 +144,7 @@ int Logging::log_libsigrok(void *cb_data, int loglevel, const char *format, va_l
}
#ifdef ENABLE_DECODE
-int Logging::log_libsrd(void *cb_data, int loglevel, const char *format, va_list args)
+int Logging::log_srd(void *cb_data, int loglevel, const char *format, va_list args)
{
(void)cb_data;
(void)loglevel;