]> vaikene.ee Git - evaf/blobdiff - src/libs/Common/logger.cpp
Unified signal signatures so that the eVaf namespace is not included in the signature.
[evaf] / src / libs / Common / logger.cpp
index 98d37708cc4f4630a15c8a5c6d86a92d4a268c05..01d56876f9caa0e4bbedc53d33be751a7b0a6956 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "logger.h"
 #include "iregistry.h"
-#include "ienv.h"
+#include "iapp.h"
 #include "version.h"
 
 #include <QtCore>
@@ -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();
     }