summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qlockfile/qlockfiletesthelper
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2015-01-21 11:14:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-01-21 11:14:34 +0100
commit112342b32650f56e289c7dcd181d5897b0b77a78 (patch)
tree76e9a37bcaa70097d009628bb2b116ea782c72cb /tests/auto/corelib/io/qlockfile/qlockfiletesthelper
parent3bbc1bf53bac7648637d92abecadc568acfffb2d (diff)
parentb6191b16d41459ed73cea738dfaf8e25e81ae22b (diff)
Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/corelib/io/qlockfile/qlockfiletesthelper')
-rw-r--r--tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
index e4b5d9ab8f..5d1a743dd9 100644
--- a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
+++ b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
@@ -50,10 +50,10 @@ int main(int argc, char *argv[])
option = QString::fromLocal8Bit(argv[2]);
if (option == "-crash") {
- QLockFile *lockFile = new QLockFile(lockName);
- lockFile->lock();
- // leak the lockFile on purpose, so that the lock remains!
- return 0;
+ QLockFile lockFile(lockName);
+ lockFile.lock();
+ // exit on purpose, so that the lock remains!
+ exit(0);
} else if (option == "-busy") {
QLockFile lockFile(lockName);
lockFile.lock();