summaryrefslogtreecommitdiffstats
path: root/src/scripttools/debugging/qscriptstdmessagehandler.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-14 12:35:44 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-14 12:35:44 (GMT)
commit05145be7e502d4330ced88d3e55207a99c0a841b (patch)
tree41a76a506b286cc1c0a6bbf317c89879be7a5079 /src/scripttools/debugging/qscriptstdmessagehandler.cpp
parentb770651f19741907cd415ea9ad6e087cb32cc948 (diff)
downloadQt-05145be7e502d4330ced88d3e55207a99c0a841b.zip
Qt-05145be7e502d4330ced88d3e55207a99c0a841b.tar.gz
Qt-05145be7e502d4330ced88d3e55207a99c0a841b.tar.bz2
Fixed coverity warnings
Some dead code removed Some member not initialized missing
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);
}