I think oa_client could be created inside the lambda?
Also, please make the lambda return std::vector<scopes::OnlineAccountClient::ServiceStatus>, then the future will be of QFuture<std::vector<...>> type and you can get the result by future's T result() getter instead of modifying the vector by reference (the lambda needs no outer variables then I think).
+ QFuture<void> future = QtConcurrent: :run([& ]{ service_statuses = oa_client. get_service_ statuses( ); });
I think oa_client could be created inside the lambda?
Also, please make the lambda return std::vector< scopes: :OnlineAccountC lient:: ServiceStatus> , then the future will be of QFuture< std::vector< ...>> type and you can get the result by future's T result() getter instead of modifying the vector by reference (the lambda needs no outer variables then I think).