7#include <QtCore/qcoreevent.h>
8#include <QtCore/qcoreapplication.h>
9#include <QtCore/qmetaobject.h>
10#include <QtCore/qthread.h>
100#if QT_DEPRECATED_SINCE(6, 0)
122void QFutureWatcherBase::setPaused(
bool paused)
137void QFutureWatcherBase::pause()
196#if QT_DEPRECATED_SINCE(6, 0)
208void QFutureWatcherBase::togglePaused()
320#if QT_DEPRECATED_SINCE(6, 0)
336bool QFutureWatcherBase::isPaused()
const
392 d->sendCallOutEvent(callOutEvent);
409 d->maximumPendingResultsReady =
limit;
416 if (
signal == resultReadyAtSignal)
417 d->resultAtConnected.ref();
420 if (
signal == finishedSignal) {
424 qWarning(
"QFutureWatcher::connect: connecting after calling setFuture() is likely to produce race");
434 if (
signal == resultReadyAtSignal)
435 d->resultAtConnected.deref();
442 : maximumPendingResultsReady(
QThread::idealThreadCount() * 2),
459 if (pendingAssignment) {
461 d->pendingResultsReady.storeRelaxed(0);
473 q->futureInterface().d->internal_setThrottled(
true);
488 switch (
event->callOutType) {
500 if (
q->futureInterface().isCanceled())
502 emit q->suspending();
503#if QT_DEPRECATED_SINCE(6, 0)
511 if (
q->futureInterface().isCanceled())
516 if (
q->futureInterface().isCanceled())
521 if (
q->futureInterface().isCanceled())
525 q->futureInterface().setThrottled(
false);
527 const int beginIndex =
event->index1;
528 const int endIndex =
event->index2;
530 emit q->resultsReadyAt(beginIndex, endIndex);
535 for (
int i = beginIndex;
i < endIndex; ++
i)
540 if (
q->futureInterface().isCanceled())
544 if (!
event->text.isNull())
628#if QT_DEPRECATED_SINCE(6, 0)
704#include "moc_qfuturewatcher.cpp"
void storeRelaxed(T newValue) noexcept
T fetchAndAddRelaxed(T valueToAdd) noexcept
T loadRelaxed() const noexcept
static void removePostedEvents(QObject *receiver, int eventType=0)
static void postEvent(QObject *receiver, QEvent *event, int priority=Qt::NormalEventPriority)
virtual QEvent * clone() const
Creates and returns an identical copy of this event.
void disconnectOutputInterface(QFutureCallOutInterface *iface)
void connectOutputInterface(QFutureCallOutInterface *iface)
int progressMaximum() const
bool queryState(State state) const
void setSuspended(bool suspend)
bool isSuspending() const
int progressValue() const
int progressMinimum() const
QString progressText() const
void postCallOutEvent(const QFutureCallOutEvent &callOutEvent) override
QAtomicInt resultAtConnected
QAtomicInt pendingResultsReady
void sendCallOutEvent(QFutureCallOutEvent *event)
void callOutInterfaceDisconnected() override
QFutureWatcherBasePrivate()
int maximumPendingResultsReady
bool isSuspending() const
virtual const QFutureInterfaceBase & futureInterface() const =0
void setPendingResultsLimit(int limit)
int progressMaximum() const
void setSuspended(bool suspend)
QFutureWatcherBase(QObject *parent=nullptr)
bool event(QEvent *event) override
This virtual function receives events to an object and should return true if the event e was recogniz...
void connectOutputInterface()
void connectNotify(const QMetaMethod &signal) override
void disconnectOutputInterface(bool pendingAssignment=false)
int progressMinimum() const
void disconnectNotify(const QMetaMethod &signal) override
QString progressText() const
void resultReadyAt(int resultIndex)
int progressValue() const
virtual bool event(QEvent *event)
This virtual function receives events to an object and should return true if the event e was recogniz...
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
#define QT_WARNING_DISABLE_DEPRECATED
GLdouble GLdouble GLdouble GLdouble q
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent