forked from qt-creator/qt-creator
AsyncTask: Get rid of setAsyncCallData()
Replaced by setConcurrentCallData(), potentially with QPromise. Change-Id: I7eddb407d7df161d440c92cdce6be59dce3609da Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "futuresynchronizer.h"
|
#include "futuresynchronizer.h"
|
||||||
#include "qtcassert.h"
|
#include "qtcassert.h"
|
||||||
#include "runextensions.h"
|
|
||||||
#include "tasktree.h"
|
#include "tasktree.h"
|
||||||
|
|
||||||
#include <QFutureWatcher>
|
#include <QFutureWatcher>
|
||||||
@@ -81,13 +80,6 @@ public:
|
|||||||
return wrapConcurrent(std::forward<Function>(function), std::forward<Args>(args)...);
|
return wrapConcurrent(std::forward<Function>(function), std::forward<Args>(args)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Function, typename ...Args>
|
|
||||||
void setAsyncCallData(const Function &function, const Args &...args)
|
|
||||||
{
|
|
||||||
m_startHandler = [=] {
|
|
||||||
return Utils::runAsync(m_threadPool, m_priority, function, args...);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
void setFutureSynchronizer(FutureSynchronizer *synchorizer) { m_synchronizer = synchorizer; }
|
void setFutureSynchronizer(FutureSynchronizer *synchorizer) { m_synchronizer = synchorizer; }
|
||||||
void setThreadPool(QThreadPool *pool) { m_threadPool = pool; }
|
void setThreadPool(QThreadPool *pool) { m_threadPool = pool; }
|
||||||
void setPriority(QThread::Priority priority) { m_priority = priority; }
|
void setPriority(QThread::Priority priority) { m_priority = priority; }
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include <utils/asynctask.h>
|
#include <utils/asynctask.h>
|
||||||
#include <utils/fileinprojectfinder.h>
|
#include <utils/fileinprojectfinder.h>
|
||||||
|
#include <utils/runextensions.h>
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|||||||
Reference in New Issue
Block a user