summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qfutureinterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qfutureinterface.cpp')
-rw-r--r--src/corelib/thread/qfutureinterface.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/corelib/thread/qfutureinterface.cpp b/src/corelib/thread/qfutureinterface.cpp
index 3a1aae19c33..dd959f16d6e 100644
--- a/src/corelib/thread/qfutureinterface.cpp
+++ b/src/corelib/thread/qfutureinterface.cpp
@@ -7,6 +7,7 @@
#include <QtCore/qatomic.h>
#include <QtCore/qcoreapplication.h>
+#include <QtCore/qloggingcategory.h>
#include <QtCore/qthread.h>
#include <QtCore/qvarlengtharray.h>
#include <private/qthreadpool_p.h>
@@ -21,6 +22,8 @@ QT_WARNING_DISABLE_GCC("-Wstringop-overflow")
QT_BEGIN_NAMESPACE
+Q_STATIC_LOGGING_CATEGORY(lcQFutureContinuations, "qt.core.qfuture.continuations")
+
enum {
MaxProgressEmitsPerSecond = 25
};
@@ -42,6 +45,20 @@ const auto suspendingOrSuspended =
} // unnamed namespace
+namespace QtPrivate {
+
+void qfutureWarnIfUnusedResults(qsizetype numResults)
+{
+ if (numResults > 1) {
+ qCWarning(lcQFutureContinuations,
+ "Parent future has %" PRIdQSIZETYPE " result(s), but only the first result "
+ "will be handled in the continuation.",
+ numResults);
+ }
+}
+
+} // namespace QtPrivate
+
class QObjectContinuationWrapper : public QObject
{
Q_OBJECT