Commits

Anonymous committed 2586f5d

fix a 3AM-grade line of code (i.e. the quality which one writes at 3AM)

  • Participants
  • Parent commits 2c87593

Comments (0)

Files changed (1)

File palapeli/src/file-io/puzzle.cpp

 {
 	QFuture<const Palapeli::PuzzleComponent*> future;
 	future = QtConcurrent::run(d, &Palapeli::Puzzle::Private::get, type);
-	//m_allFutures is used to wait for all running casts to be finished
-	//in the dtor
-	d->m_allFutures.waitForFinished();
+	//m_allFutures is used to wait for all running casts to be finished in dtor
+	d->m_allFutures.addFuture(future);
 	return future;
 }