diff options
author | Liang Qi <liang.qi@qt.io> | 2019-06-11 10:30:48 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-06-11 10:30:48 +0200 |
commit | 3c662bf13cdc509c1f40c59ad30711c909006b06 (patch) | |
tree | 8d20ff8e1aaf0f15c768e1f289bcabeed449a4cb /src/corelib/kernel/qcoreapplication.cpp | |
parent | 17790dd030cf05951c6bc886362e5645bb4eb686 (diff) | |
parent | 2ea3e133c369deefeae0605ad2f32aaea52c9e97 (diff) |
Merge remote-tracking branch 'origin/5.13.0' into 5.13
Conflicts:
src/plugins/platforms/wasm/qwasmintegration.cpp
src/plugins/platforms/wasm/qwasmintegration.h
Change-Id: Idf4c7936513fb1f21daa8f6105b8545f13447bb8
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 ddd8fa9cdb..84d4111418 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 @@ -801,6 +802,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) |