summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qfutureinterface.cpp
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2025-01-28 15:20:28 +0100
committerIvan Solovev <ivan.solovev@qt.io>2025-02-11 12:19:48 +0100
commit3164746eb09a34818cfa874ae248d01e0c4f5d74 (patch)
tree9f7c27733b9f2168f1e26157b0ec0209e8471550 /src/corelib/thread/qfutureinterface.cpp
parentb0e82f598193f7d2c331a7ff3da7e2d3114db714 (diff)
QFutureInterface: mark the unused setContinuation() overloads as removed
This is a cleanup after the previous patch that introduced the new setContinuation() overloads. The old API cannot be used correctly with the new approach that requires to always set a continuation type, so let's mark it as removed. Technically, this change is SiC. However, QFutureInterfaceBase was never documented as a public class, so users are not supposed to derive from it and should not use setContinuation() methods directly. Task-number: QTBUG-130662 Change-Id: Idf3d9f5de00a7c4ac34ee3dde1d58902e3a27904 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/thread/qfutureinterface.cpp')
-rw-r--r--src/corelib/thread/qfutureinterface.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/corelib/thread/qfutureinterface.cpp b/src/corelib/thread/qfutureinterface.cpp
index 3252a0def54..cc61752f28d 100644
--- a/src/corelib/thread/qfutureinterface.cpp
+++ b/src/corelib/thread/qfutureinterface.cpp
@@ -55,27 +55,6 @@ signals:
void run();
};
-void QtPrivate::watchContinuationImpl(const QObject *context, QSlotObjectBase *slotObj,
- QFutureInterfaceBase &fi)
-{
- Q_ASSERT(context);
- Q_ASSERT(slotObj);
-
- auto slot = SlotObjUniquePtr(slotObj);
-
- // That is now a double-inderection, because the setContinuation() overload
- // also uses QSlotObjectBase approach. But that's a solution for backwards
- // compatibility, so should be fine.
- // We pass a default-constructed QVariant() and an Unknown type, because
- // that's effectively the same as passing a nullptr continuationData, and
- // that's what the old code was doing.
- fi.setContinuation(context, ContinuationWrapper([slot = std::move(slot)]()
- {
- void *args[] = { nullptr }; // for `void` return value
- slot->call(nullptr, args);
- }), QVariant(), QFutureInterfaceBase::ContinuationType::Unknown);
-}
-
QFutureCallOutInterface::~QFutureCallOutInterface()
= default;
@@ -846,19 +825,6 @@ void QFutureInterfaceBasePrivate::setState(QFutureInterfaceBase::State newState)
state.storeRelaxed(newState);
}
-void QFutureInterfaceBase::setContinuation(std::function<void(const QFutureInterfaceBase &)> func)
-{
- setContinuation(std::move(func), nullptr);
-}
-
-void QFutureInterfaceBase::setContinuation(std::function<void(const QFutureInterfaceBase &)> func,
- QFutureInterfaceBasePrivate *continuationFutureData)
-{
- // Backwards compatibility - the continuation data was used for
- // then-continuations
- setContinuation(std::move(func), continuationFutureData, ContinuationType::Then);
-}
-
void QFutureInterfaceBase::setContinuation(std::function<void (const QFutureInterfaceBase &)> func,
void *continuationFutureData, ContinuationType type)
{