goldendict-ng/gddebug.cc

34 lines
612 B
C++
Raw Normal View History

/* This file is (c) 2013 Abs62
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
#include <QString>
#include "gddebug.hh"
2022-04-03 01:45:09 +00:00
#include <QDebug>
#if( QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) )
2022-02-28 16:26:59 +00:00
#include <QtCore5Compat/QTextCodec>
#else
#include <QTextCodec>
#endif
QFile * logFilePtr;
void gdWarning( const char * msg, ... )
{
va_list ap;
va_start( ap, msg );
2022-04-03 01:45:09 +00:00
qWarning() << QString().vasprintf( msg, ap );
va_end( ap );
}
void gdDebug( const char * msg, ... )
{
va_list ap;
va_start( ap, msg );
qDebug().noquote() << QString().vasprintf( msg, ap );
va_end( ap );
}