16 #include <QMessageBox>
20 void MessageHandler(QtMsgType type,
const QMessageLogContext&,
const QString& msg)
26 std::cerr <<
"DEBUG: " << msg.toStdString() << std::endl;
29 std::cerr <<
"INFO: " << msg.toStdString() << std::endl;
33 if (msg.left(4) ==
"QXcb")
35 std::cerr <<
"WARNING: " << msg.toStdString() << std::endl;
39 std::cerr <<
"FATAL: " << msg.toStdString() << std::endl;
40 qApp->restoreOverrideCursor();
41 QMessageBox::critical(QApplication::activeWindow(), qAppName(),
42 "Sorry, you encountered a fatal bug.\n"
43 "The application will terminate.\n"
44 "Please note the following and inform the maintainers.\n\n"
void MessageHandler(QtMsgType type, const QMessageLogContext &, const QString &msg)
This is set by main to be the message handler of our GUI.
Declares function MessageHandler.