summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qpromise.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qpromise.h')
-rw-r--r--src/corelib/thread/qpromise.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/thread/qpromise.h b/src/corelib/thread/qpromise.h
index afe51e07d0..a1ac8eaf27 100644
--- a/src/corelib/thread/qpromise.h
+++ b/src/corelib/thread/qpromise.h
@@ -85,7 +85,11 @@ public:
}
#ifndef QT_NO_EXCEPTIONS
void setException(const QException &e) { d.reportException(e); }
+#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
void setException(std::exception_ptr e) { d.reportException(e); }
+#else
+ void setException(const std::exception_ptr &e) { d.reportException(e); }
+#endif
#endif
void start() { d.reportStarted(); }
void finish() { d.reportFinished(); }