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_unix.cpp | 5 |
5 files changed, 23 insertions, 5 deletions
diff --git a/src/corelib/thread/qfuturewatcher.cpp b/src/corelib/thread/qfuturewatcher.cpp index faeb6b3a28..4ee7693ace 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_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 329caa02ba..a13f8ca215 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -100,6 +100,9 @@ #include <sys/neutrino.h> #endif +#if defined(Q_OS_WASM) +#include <emscripten/val.h> +#endif QT_BEGIN_NAMESPACE @@ -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 = emscripten::val::global("navigator")["hardwareConcurrency"].as<int>(); #else // the rest: Linux, Solaris, AIX, Tru64 cores = (int)sysconf(_SC_NPROCESSORS_ONLN); |