#include "kis_async_action_feedback.h"
#include <QApplication>
#include <QEventLoop>
#include <QFutureWatcher>
#include <QtConcurrentRun>
#include <QProgressDialog>
Go to the source code of this file.
◆ runActionImpl()
template<typename T >
| T runActionImpl |
( |
std::function< T()> | func | ) |
|
Definition at line 39 of file kis_async_action_feedback.cpp.
40{
42 QFutureWatcher<T> watcher;
43 watcher.setFuture(result);
44
45 while (watcher.isRunning()) {
46 qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
47 }
48
49 watcher.waitForFinished();
50 return watcher.result();
51}