diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-09-19 11:59:42 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-09-19 12:41:00 +0200 |
commit | 3f1156ee5f6c49e4f8d7881e73760b936975e1b2 (patch) | |
tree | 6d902a1a50683fa940eeaf78425a8c5ad28b6887 /tools | |
parent | ca9668694b5430ab73dfd2b090760a7235ece3e3 (diff) |
qmlplugindump: Use _CrtSetReportMode() for MSVC only.
Fix warnings when using MinGW:
main.cpp: In function 'int main(int, char**)':
main.cpp:734:55: warning: statement has no effect [-Wunused-value]
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
^
main.cpp:735:53: warning: statement has no effect [-Wunused-value]
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG);
^
main.cpp:736:54: warning: statement has no effect [-Wunused-value]
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
where _CrtSetReportMode() is an empty macro.
Change-Id: I644bc207b5a3df62d6390811f53b2c0948979d58
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmlplugindump/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 3f38a66da4..b387e4ff6e 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -728,13 +728,13 @@ void printDebugMessage(QtMsgType, const QMessageLogContext &, const QString &msg int main(int argc, char *argv[]) { -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_CC_MINGW) // we do not want windows popping up if the module loaded triggers an assert SetErrorMode(SEM_NOGPFAULTERRORBOX); _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG); _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG); _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG); -#endif +#endif // Q_OS_WIN && !Q_CC_MINGW // The default message handler might not print to console on some systems. Enforce this. qInstallMessageHandler(printDebugMessage); #ifdef Q_OS_UNIX |