summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qfuture_impl.h5
-rw-r--r--src/corelib/thread/qpromise.h9
2 files changed, 9 insertions, 5 deletions
diff --git a/src/corelib/thread/qfuture_impl.h b/src/corelib/thread/qfuture_impl.h
index b09d84a6d3..2924408333 100644
--- a/src/corelib/thread/qfuture_impl.h
+++ b/src/corelib/thread/qfuture_impl.h
@@ -51,6 +51,7 @@
#include <QtCore/qthreadpool.h>
#include <QtCore/qexception.h>
#include <QtCore/qpointer.h>
+#include <QtCore/qpromise.h>
QT_BEGIN_NAMESPACE
@@ -82,10 +83,6 @@ WhenAnyResult(qsizetype, const QFuture<T> &) -> WhenAnyResult<T>;
namespace QtPrivate {
-template<class T, class U>
-using EnableIfSameOrConvertible = std::enable_if_t<std::is_same_v<T, U>
- || std::is_convertible_v<T, U>>;
-
template<class T>
using EnableForVoid = std::enable_if_t<std::is_same_v<T, void>>;
diff --git a/src/corelib/thread/qpromise.h b/src/corelib/thread/qpromise.h
index f62a2a54e3..f7abf8babc 100644
--- a/src/corelib/thread/qpromise.h
+++ b/src/corelib/thread/qpromise.h
@@ -41,7 +41,7 @@
#define QPROMISE_H
#include <QtCore/qglobal.h>
-#include <QtCore/qfuture.h>
+#include <QtCore/qfutureinterface.h>
#include <utility>
@@ -49,6 +49,13 @@ QT_REQUIRE_CONFIG(future);
QT_BEGIN_NAMESPACE
+namespace QtPrivate {
+
+template<class T, class U>
+using EnableIfSameOrConvertible = std::enable_if_t<std::is_convertible_v<T, U>>;
+
+} // namespace QtPrivate
+
template<typename T>
class QPromise
{