1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

LP-2 fixed compilation warnings about missing QtInfoMsg in switch/case

This commit is contained in:
Philippe Renon 2015-10-04 22:41:23 +02:00
parent 067261ed3f
commit d0d3a56292
3 changed files with 11 additions and 0 deletions

View File

@ -285,6 +285,9 @@ void mainMessageOutput(QtMsgType type, const QMessageLogContext &context, const
case QtDebugMsg: case QtDebugMsg:
out << "DBG: "; out << "DBG: ";
break; break;
case QtInfoMsg:
out << "INF: ";
break;
case QtWarningMsg: case QtWarningMsg:
out << "WRN: "; out << "WRN: ";
break; break;

View File

@ -52,6 +52,10 @@ void DebugGadgetWidget::customMessageHandler(QtMsgType type, const QMessageLogCo
txt = QString("Debug: %1").arg(msg); txt = QString("Debug: %1").arg(msg);
color = Qt::black; color = Qt::black;
break; break;
case QtInfoMsg:
txt = QString("Info: %1").arg(msg);
color = Qt::blue;
break;
case QtWarningMsg: case QtWarningMsg:
txt = QString("Warning: %1").arg(msg); txt = QString("Warning: %1").arg(msg);
color = Qt::red; color = Qt::red;

View File

@ -29,6 +29,7 @@
void myQDebugHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) void myQDebugHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{ {
Q_UNUSED(context);
static bool firstRun = true; static bool firstRun = true;
QString txt; QString txt;
@ -36,6 +37,9 @@ void myQDebugHandler(QtMsgType type, const QMessageLogContext &context, const QS
case QtDebugMsg: case QtDebugMsg:
txt = QString("Debug: %1").arg(msg); txt = QString("Debug: %1").arg(msg);
break; break;
case QtInfoMsg:
txt = QString("Info: %1").arg(msg);
break;
case QtWarningMsg: case QtWarningMsg:
txt = QString("Warning: %1").arg(msg); txt = QString("Warning: %1").arg(msg);
break; break;