DEFINE_GLOBAL_DEBUG_VAR

QContactManagerEngine* ContactMaemo5Factory::engine(const QMap<QString, QString>& parameters, QContactManager::Error* error)
{
    Q_UNUSED(parameters);
    Q_UNUSED(error);

    initDebugLogger();
    return new QContactMaemo5Engine(); //FIXME Wonderfull memory leak :D
}
Beispiel #2
0
void DebugLogging::dbgPrintf(const char* format, ...)
{
	// initiate the log (if not already done so)
	if (!isInitialized) initDebugLogger();

	// debug log text buffer
	char debugBuffer[DEBUG_BUFFER_SIZE];
	int result = 0;

	// construct the output string
	va_list args;
	va_start(args, format);
#if defined(DEBUG) || defined(_DEBUG)
	NO_MSG_assert(vsprintf_s(debugBuffer, format, args) >= 0);
#else
	vsprintf_s(debugBuffer, format, args);
#endif
	va_end(args);

	// write it to the correct areas
	__DebugPrintToDebuggerArea__(debugBuffer);
	__DebugPrintToLogFile__(debugBuffer);
}