summaryrefslogtreecommitdiffstats
path: root/src/scripttools
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-14 14:35:44 +0200
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-14 14:35:44 +0200
commit05145be7e502d4330ced88d3e55207a99c0a841b (patch)
tree41a76a506b286cc1c0a6bbf317c89879be7a5079 /src/scripttools
parentb770651f19741907cd415ea9ad6e087cb32cc948 (diff)
Fixed coverity warnings
Some dead code removed Some member not initialized missing
Diffstat (limited to 'src/scripttools')
-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 bed04ecadb..5fb2db906b 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);
}