summaryrefslogtreecommitdiffstats
path: root/src/scripttools/debugging/qscriptstdmessagehandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripttools/debugging/qscriptstdmessagehandler.cpp')
-rw-r--r--src/scripttools/debugging/qscriptstdmessagehandler.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/scripttools/debugging/qscriptstdmessagehandler.cpp b/src/scripttools/debugging/qscriptstdmessagehandler.cpp
index bed04ec..5fb2db9 100644
--- a/src/scripttools/debugging/qscriptstdmessagehandler.cpp
+++ b/src/scripttools/debugging/qscriptstdmessagehandler.cpp
@@ -92,18 +92,7 @@ void QScriptStdMessageHandler::message(QtMsgType type, const QString &text,
}
msg.append(text);
- FILE *fp = 0;
- switch (type) {
- case QtDebugMsg:
- fp = stdout;
- break;
- case QtWarningMsg:
- case QtCriticalMsg:
- case QtFatalMsg:
- fp = stderr;
- break;
- }
-
+ FILE *fp = (type == QtDebugMsg) ? stdout : stderr;
fprintf(fp, "%s\n", msg.toLatin1().constData());
fflush(fp);
}