diff --git a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp index c469575c23a..8b6939483a6 100644 --- a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp +++ b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp @@ -545,7 +545,7 @@ void tst_QPointer::raceCondition() for (int i = 0; i < NUM_THREADS; ++i) { QThread *thread = - QThread::create([&startSemaphore, &targetObject] { + QThread::create([&] { startSemaphore.acquire(); for (int j = 0; j < ITERATIONS_PER_THREAD; ++j) {