diff options
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qfuturewatcher.cpp | 2 | ||||
-rw-r--r-- | src/corelib/thread/qresultstore.cpp | 15 | ||||
-rw-r--r-- | src/corelib/thread/qresultstore.h | 2 | ||||
-rw-r--r-- | src/corelib/thread/qsemaphore.cpp | 4 | ||||
-rw-r--r-- | src/corelib/thread/qthread_p.h | 3 | ||||
-rw-r--r-- | src/corelib/thread/qthread_unix.cpp | 7 |
6 files changed, 27 insertions, 6 deletions
diff --git a/src/corelib/thread/qfuturewatcher.cpp b/src/corelib/thread/qfuturewatcher.cpp index 8e90d043ef..cf220bbd48 100644 --- a/src/corelib/thread/qfuturewatcher.cpp +++ b/src/corelib/thread/qfuturewatcher.cpp @@ -479,7 +479,7 @@ void QFutureWatcherBasePrivate::sendCallOutEvent(QFutureCallOutEvent *event) emit q->progressValueChanged(event->index1); if (!event->text.isNull()) // ### - q->progressTextChanged(event->text); + emit q->progressTextChanged(event->text); break; case QFutureCallOutEvent::ProgressRange: emit q->progressRangeChanged(event->index1, event->index2); diff --git a/src/corelib/thread/qresultstore.cpp b/src/corelib/thread/qresultstore.cpp index e0ce1b4b78..1b3bc20eca 100644 --- a/src/corelib/thread/qresultstore.cpp +++ b/src/corelib/thread/qresultstore.cpp @@ -43,6 +43,21 @@ QT_BEGIN_NAMESPACE namespace QtPrivate { +/*! + \class QtPrivate::ResultItem + \internal + */ + +/*! + \class QtPrivate::ResultIteratorBase + \internal + */ + +/*! + \class QtPrivate::ResultStoreBase + \internal + */ + ResultIteratorBase::ResultIteratorBase() : mapIterator(QMap<int, ResultItem>::const_iterator()), m_vectorIndex(0) { } ResultIteratorBase::ResultIteratorBase(QMap<int, ResultItem>::const_iterator _mapIterator, int _vectorIndex) diff --git a/src/corelib/thread/qresultstore.h b/src/corelib/thread/qresultstore.h index 39f0a6d1bb..1f29e8d187 100644 --- a/src/corelib/thread/qresultstore.h +++ b/src/corelib/thread/qresultstore.h @@ -56,7 +56,6 @@ QT_BEGIN_NAMESPACE either individually or in batches. */ -#ifndef Q_QDOC namespace QtPrivate { @@ -196,7 +195,6 @@ public: Q_DECLARE_TYPEINFO(QtPrivate::ResultItem, Q_PRIMITIVE_TYPE); -#endif //Q_QDOC QT_END_NAMESPACE diff --git a/src/corelib/thread/qsemaphore.cpp b/src/corelib/thread/qsemaphore.cpp index aa04fb10ff..2e0b6f2bc0 100644 --- a/src/corelib/thread/qsemaphore.cpp +++ b/src/corelib/thread/qsemaphore.cpp @@ -606,7 +606,7 @@ bool QSemaphore::tryAcquire(int n, int timeout) \fn QSemaphoreReleaser::semaphore() const Returns a pointer to the QSemaphore object provided to the constructor, - or by the last move assignment, if any. Otherwise, returns \c nullptr. + or by the last move assignment, if any. Otherwise, returns \nullptr. */ /*! @@ -614,7 +614,7 @@ bool QSemaphore::tryAcquire(int n, int timeout) Cancels this QSemaphoreReleaser such that the destructor will no longer call \c{semaphore()->release()}. Returns the value of semaphore() - before this call. After this call, semaphore() will return \c nullptr. + before this call. After this call, semaphore() will return \nullptr. To enable again, assign a new QSemaphoreReleaser: diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h index 7d9442ab79..57e6c995c5 100644 --- a/src/corelib/thread/qthread_p.h +++ b/src/corelib/thread/qthread_p.h @@ -195,6 +195,9 @@ public: int waiters; bool terminationEnabled, terminatePending; #endif // Q_OS_WIN +#ifdef Q_OS_WASM + static int idealThreadCount; +#endif QThreadData *data; static QAbstractEventDispatcher *createEventDispatcher(QThreadData *data); diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 695d45d8e7..710528ea41 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -100,7 +100,6 @@ #include <sys/neutrino.h> #endif - QT_BEGIN_NAMESPACE #if QT_CONFIG(thread) @@ -451,6 +450,10 @@ Qt::HANDLE QThread::currentThreadId() Q_DECL_NOTHROW # define _SC_NPROCESSORS_ONLN 84 #endif +#ifdef Q_OS_WASM +int QThreadPrivate::idealThreadCount = 1; +#endif + int QThread::idealThreadCount() Q_DECL_NOTHROW { int cores = 1; @@ -499,6 +502,8 @@ int QThread::idealThreadCount() Q_DECL_NOTHROW // as of aug 2008 VxWorks < 6.6 only supports one single core CPU cores = 1; # endif +#elif defined(Q_OS_WASM) + cores = QThreadPrivate::idealThreadCount; #else // the rest: Linux, Solaris, AIX, Tru64 cores = (int)sysconf(_SC_NPROCESSORS_ONLN); |