mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
Extract TO_LOG_MESSAGE()
This commit is contained in:
parent
be22bb9ffd
commit
a61b203de7
|
@ -7,6 +7,8 @@
|
|||
#include <QString>
|
||||
#include "gddebug.hh"
|
||||
|
||||
#define TO_LOG_MESSAGE( msg, ap ) QString().vsprintf( msg, ap ).toUtf8().constData()
|
||||
|
||||
QFile * logFilePtr;
|
||||
|
||||
namespace {
|
||||
|
@ -65,7 +67,7 @@ void gdWarning(const char *msg, ...)
|
|||
va_start(ap, msg);
|
||||
{
|
||||
Utf8CodecForLocaleReplacer codecReplacer;
|
||||
qWarning( "%s", QString().vsprintf( msg, ap ).toUtf8().constData() );
|
||||
qWarning( "%s", TO_LOG_MESSAGE( msg, ap ) );
|
||||
}
|
||||
va_end(ap);
|
||||
}
|
||||
|
@ -76,7 +78,7 @@ void gdDebug(const char *msg, ...)
|
|||
va_start(ap, msg);
|
||||
{
|
||||
Utf8CodecForLocaleReplacer codecReplacer;
|
||||
qDebug( "%s", QString().vsprintf( msg, ap ).toUtf8().constData() );
|
||||
qDebug( "%s", TO_LOG_MESSAGE( msg, ap ) );
|
||||
}
|
||||
va_end(ap);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue