Vuo  2.0.2
VuoRendererCommon.cc
Go to the documentation of this file.
1 
10 #include "VuoRendererCommon.hh"
11 
15 void VuoRendererCommon::messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message)
16 {
17  const char *func = context.function;
18  if (!func)
19  {
20  if (type == QtDebugMsg)
21  func = "QMessageLogger::debug";
22  else if (type == QtInfoMsg)
23  func = "QMessageLogger::info";
24  else if (type == QtWarningMsg)
25  func = "QMessageLogger::warning";
26  else if (type == QtCriticalMsg)
27  func = "QMessageLogger::critical";
28  else if (type == QtFatalMsg)
29  func = "QMessageLogger::fatal";
30  else
31  func = "?";
32  }
33 
34  VuoLog(context.file ? context.file : (context.category ? context.category : "?"),
35  context.line,
36  func,
37  "%s", message.toUtf8().constData());
38 }