diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-20 10:52:58 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-20 10:52:58 (GMT) |
commit | 40a2129c60f21ea6f146d405ebcadb25628db273 (patch) | |
tree | 1a61e8ab7cc90c698c4def62439a2acc0cec6bad /tests/auto/qfile/tst_qfile.cpp | |
parent | 8485052e3991aebf7c823b3e80fc06ccf9f08991 (diff) | |
parent | 7a9ed6a1983e318bfb14f0b2db41b3a4e1415529 (diff) | |
download | Qt-40a2129c60f21ea6f146d405ebcadb25628db273.zip Qt-40a2129c60f21ea6f146d405ebcadb25628db273.tar.gz Qt-40a2129c60f21ea6f146d405ebcadb25628db273.tar.bz2 |
Merge remote-tracking branch 'earth-team/master' into earth-staging-master
Diffstat (limited to 'tests/auto/qfile/tst_qfile.cpp')
-rw-r--r-- | tests/auto/qfile/tst_qfile.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/qfile/tst_qfile.cpp b/tests/auto/qfile/tst_qfile.cpp index 79539c9..688a92d 100644 --- a/tests/auto/qfile/tst_qfile.cpp +++ b/tests/auto/qfile/tst_qfile.cpp @@ -3294,13 +3294,18 @@ public: static void ignore_invalid_parameter(const wchar_t*, const wchar_t*, const wchar_t*, unsigned int, uintptr_t) {} AutoIgnoreInvalidParameter() { - old = _set_invalid_parameter_handler(ignore_invalid_parameter); + oldHandler = _set_invalid_parameter_handler(ignore_invalid_parameter); + //also disable the abort/retry/ignore popup + oldReportMode = _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG); } ~AutoIgnoreInvalidParameter() { - _set_invalid_parameter_handler(old); + //restore previous settings + _set_invalid_parameter_handler(oldHandler); + _CrtSetReportMode(_CRT_ASSERT, oldReportMode); } - _invalid_parameter_handler old; + _invalid_parameter_handler oldHandler; + int oldReportMode; #endif }; |