From 498efdf9b747e2a8b0db939fe8468dac02d28216 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Sun, 3 Apr 2022 09:45:09 +0800 Subject: [PATCH] gddebug minor changes --- gddebug.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gddebug.cc b/gddebug.cc index df57aa5d..157ff5c4 100644 --- a/gddebug.cc +++ b/gddebug.cc @@ -3,6 +3,7 @@ #include #include "gddebug.hh" +#include #if(QT_VERSION >= QT_VERSION_CHECK(6,0,0)) #include #else @@ -27,7 +28,7 @@ QTextCodec *localeCodec = 0; QTextCodec::setCodecForLocale( utf8Codec ); } - qWarning( "%s", QString().vasprintf( msg, ap ).toUtf8().data() ); + qWarning() << QString().vasprintf( msg, ap ); if( logFilePtr && logFilePtr->isOpen() ) { @@ -52,7 +53,7 @@ QTextCodec *localeCodec = 0; QTextCodec::setCodecForLocale( utf8Codec ); } - qDebug( "%s", QString().vasprintf( msg, ap ).toUtf8().data() ); + qDebug()<< QString().vasprintf( msg, ap ); if( logFilePtr && logFilePtr->isOpen() ) {