X-Git-Url: https://vaikene.ee/gitweb/pswgen11.html?a=blobdiff_plain;f=src%2Flibs%2FCommon%2Flogger.cpp;h=01d56876f9caa0e4bbedc53d33be751a7b0a6956;hb=b280102618ec2ced838a092ba7673964ab272569;hp=98d37708cc4f4630a15c8a5c6d86a92d4a268c05;hpb=720224734cb4f6ea2708c6b5ecf93cc666aad378;p=evaf
diff --git a/src/libs/Common/logger.cpp b/src/libs/Common/logger.cpp
index 98d3770..01d5687 100644
--- a/src/libs/Common/logger.cpp
+++ b/src/libs/Common/logger.cpp
@@ -19,7 +19,7 @@
#include "logger.h"
#include "iregistry.h"
-#include "ienv.h"
+#include "iapp.h"
#include "version.h"
#include
@@ -160,7 +160,7 @@ Logger::Logger()
Logger::~Logger()
{
// Disconnect any potential receivers from this object
- disconnect(this, SIGNAL(loggerEvent(eVaf::Common::iLogger::Severity,QString,QString,QString)), 0, 0);
+ disconnect(this, SIGNAL(loggerEvent(Common::iLogger::Severity,QString,QString,QString)), 0, 0);
// Destroy the worker thread
if (mWorker) {
@@ -382,13 +382,15 @@ QString Logger::printf(char const * const fmt, ...) const
#endif
va_list ap;
- ::va_start(ap, fmt);
#ifdef Q_OS_WIN32
+ va_start(ap, fmt);
_vsnprintf_s(str, sizeof(str), _TRUNCATE, fmt, ap);
+ va_end(ap);
#else
+ ::va_start(ap, fmt);
if (::vasprintf(&str, fmt, ap)); // IF is needed to avoid the compiler warning
-#endif
::va_end(ap);
+#endif
QString rval(str);
@@ -443,7 +445,7 @@ LoggerSource * Logger::getSource(QString const & source)
mSources.insert(source, src);
// Initialize the new source
- src->init(source.isEmpty() ? mDefaultSource : source, iEnv::instance()->logDir(), iEnv::instance()->etcDir());
+ src->init(source.isEmpty() ? mDefaultSource : source, iApp::instance()->logDir(), iApp::instance()->etcDir());
return src.data();
}