From cabc33a689dd30ad6ac6413992b11f683d64987c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 9 Feb 2022 17:08:09 -0800 Subject: [PATCH] Qt6: deal with changed QtConcurrent::run API Signed-off-by: Dirk Hohndel --- qt-models/diveplannermodel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 74b3eac3f..98a2c1168 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -1086,7 +1086,11 @@ void DivePlannerPointsModel::updateDiveProfile() // Since we're calling computeVariations asynchronously and plan_deco_state is allocated // on the stack, it must be copied and freed by the worker-thread. struct deco_state *plan_deco_state_copy = new deco_state(plan_deco_state); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QtConcurrent::run(&DivePlannerPointsModel::computeVariationsFreeDeco, this, plan_copy, plan_deco_state_copy); +#else QtConcurrent::run(this, &DivePlannerPointsModel::computeVariationsFreeDeco, plan_copy, plan_deco_state_copy); +#endif #else computeVariations(plan_copy, &plan_deco_state); #endif