Den 02-12-2011 08:21, Bo Thorsen skrev: > Den 01-12-2011 22:46, Charley Bay skrev: >> >> qLog(Type) << "string=" << str << ", int=" << i; >> >> That code is not re-entrant, > > Wrong. > > class LoggerHelper { > ... > ~LoggerHelper() { > doActualLogging(); > } > }; > > LoggerHelper& operator<<(LoggerHelper&, const T&) { > // Log T here > }
Forgot to write that qLog should of course return a LoggerHelper. Maybe obvious from the code, though. Bo Thorsen, Fionia Software. -- Expert Qt and C++ developer for hire Contact me if you need expert Qt help http://www.fioniasoftware.dk _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest