diff options
author | Liang Qi <liang.qi@qt.io> | 2019-06-14 11:56:56 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-06-14 13:45:18 +0200 |
commit | b1a216649ec064412160638dd00195cd47c567aa (patch) | |
tree | a4134415a3849cfb857942e698514be9da18924f /src/corelib/kernel/qcoreapplication.cpp | |
parent | 2e20ae3c1b57169497f6f3904623be4f5e617e12 (diff) | |
parent | 1632786f00875d23c7d111cbb29dedaa35c1c8c2 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
qmake/generators/makefile.cpp
qmake/generators/unix/unixmake2.cpp
src/corelib/thread/qthread_unix.cpp
tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.cpp')
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index a48a7c80f2..d62188a49c 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -120,6 +120,7 @@ #ifdef Q_OS_WASM #include <emscripten.h> +#include <emscripten/val.h> #endif #ifdef QT_BOOTSTRAPPED @@ -799,6 +800,10 @@ void QCoreApplicationPrivate::init() Module.print(err); }); ); + +#if QT_CONFIG(thread) + QThreadPrivate::idealThreadCount = emscripten::val::global("navigator")["hardwareConcurrency"].as<int>(); +#endif #endif // Store app name/version (so they're still available after QCoreApplication is destroyed) |