gui: IPCPreviewWorker(): Don't allocate mapfunctor on heap

Cette révision appartient à :
Albert S. 2022-05-29 10:40:46 +02:00
Parent 69c2956a1f
révision 86cc16d15d

Voir le fichier

@ -10,13 +10,11 @@ IPCPreviewWorker::IPCPreviewWorker()
void IPCPreviewWorker::start(RenderConfig config, const QVector<RenderTarget> &targets, QLocalSocket *peer)
{
stop();
/* TODO: memleak */
auto mapFunctor = new PreviewGeneratorMapFunctor();
mapFunctor->setRenderConfig(config);
auto mapFunctor = PreviewGeneratorMapFunctor();
mapFunctor.setRenderConfig(config);
previewWorkerWatcher.setFuture(QtConcurrent::mapped(targets, *mapFunctor));
previewWorkerWatcher.setFuture(QtConcurrent::mapped(targets, mapFunctor));
}
void IPCPreviewWorker::stop()