HTML_Lectures/Virtualization_Lecture/vbox/src/VBox/Frontends/VirtualBox/src/main.cpp
/** Qt5 message handler, function that prints out
  * debug, warning, critical, fatal and system error messages.
  * @param  type        Holds the type of the message.
  * @param  context     Holds the message context.
  * @param  strMessage  Holds the message body. */
Qt5 message handler, function that prints out
debug, warning, critical, fatal and system error messages.
@param  type        Holds the type of the message.
@param  context     Holds the message context.
@param  strMessage  Holds the message body.
Qt5 message handler function that prints out debug warning critical fatal and system error messages . @param type Holds the type of the message . @param context Holds the message context . @param strMessage Holds the message body .
static void QtMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &strMessage)
{
    NOREF(context);
# ifndef VBOX_WS_X11
    NOREF(strMessage);
# endif
    switch (type)
    {
        case QtDebugMsg:
            Log(("Qt DEBUG: %s\n", strMessage.toUtf8().constData()));
            break;
        case QtWarningMsg:
            Log(("Qt WARNING: %s\n", strMessage.toUtf8().constData()));
# ifdef VBOX_WS_X11
            RTStrmPrintf(g_pStdErr, "Qt WARNING: %s\n", strMessage.toUtf8().constData());
# endif
            break;
        case QtCriticalMsg:
            Log(("Qt CRITICAL: %s\n", strMessage.toUtf8().constData()));
# ifdef VBOX_WS_X11
            RTStrmPrintf(g_pStdErr, "Qt CRITICAL: %s\n", strMessage.toUtf8().constData());
# endif
            break;
        case QtFatalMsg:
            Log(("Qt FATAL: %s\n", strMessage.toUtf8().constData()));
# ifdef VBOX_WS_X11
            RTStrmPrintf(g_pStdErr, "Qt FATAL: %s\n", strMessage.toUtf8().constData());
# endif
# if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
        case QtInfoMsg:
            break;
# endif
    }
}
static void QtMessageOutput ( QtMsgType type , const QMessageLogContext & context , const QString & strMessage ) { NOREF ( context ) ; # ifndef VBOX_WS_X11 NOREF ( strMessage ) ; # endif switch ( type ) { case QtDebugMsg : Log ( ( " \n " , strMessage . toUtf8 ( ) . constData ( ) ) ) ; break ; case QtWarningMsg : Log ( ( " \n " , strMessage . toUtf8 ( ) . constData ( ) ) ) ; # ifdef VBOX_WS_X11 RTStrmPrintf ( g_pStdErr , " \n " , strMessage . toUtf8 ( ) . constData ( ) ) ; # endif break ; case QtCriticalMsg : Log ( ( " \n " , strMessage . toUtf8 ( ) . constData ( ) ) ) ; # ifdef VBOX_WS_X11 RTStrmPrintf ( g_pStdErr , " \n " , strMessage . toUtf8 ( ) . constData ( ) ) ; # endif break ; case QtFatalMsg : Log ( ( " \n " , strMessage . toUtf8 ( ) . constData ( ) ) ) ; # ifdef VBOX_WS_X11 RTStrmPrintf ( g_pStdErr , " \n " , strMessage . toUtf8 ( ) . constData ( ) ) ; # endif # if QT_VERSION >= QT_VERSION_CHECK ( 5 , 5 , 0 ) case QtInfoMsg : break ; # endif } }
Qt5 message handler, function that prints out
 debug, warning, critical, fatal and system error messages.
Qt5 message handler function that prints out debug warning critical fatal and system error messages .
/* Needed for instance for the message ``cannot connect to X server'': */ /* Needed for instance for the message ``cannot connect to X server'': */ /* Needed for instance for the message ``cannot connect to X server'': */ /** @todo ignore? */