summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-01-26 14:40:55 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-01-27 13:39:35 (GMT)
commit97f7c9afb295140a7d979203f41d91082ee73cd9 (patch)
treea67bb47adb0ab3443a0c0dfacf64d92d8e0446de
parentabeeac820a1da1e1d32768904fa70e048a836c3f (diff)
downloadQt-97f7c9afb295140a7d979203f41d91082ee73cd9.zip
Qt-97f7c9afb295140a7d979203f41d91082ee73cd9.tar.gz
Qt-97f7c9afb295140a7d979203f41d91082ee73cd9.tar.bz2
Fix crash handler regression introduced by c7739f7dd.
The crash handler is removed when the FatalSignalHandler object goes out of scope, which it did right inside that if. Reviewed-By: Harald Fernengel
-rw-r--r--src/testlib/qtestcase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 98e9787..40daecb 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -1671,8 +1671,9 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
#endif
{
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
+ QScopedPointer<FatalSignalHandler> handler;
if (!noCrashHandler)
- FatalSignalHandler handler;
+ handler.reset(new FatalSignalHandler);
#endif
qInvokeTestMethods(testObject);
}