summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-07-11 10:00:43 -0700
committerThiago Macieira <thiago.macieira@intel.com>2022-02-03 19:58:36 -0800
commit4a93285b166ceceaea2e10c8fc6a254d2f7093b9 (patch)
treecf2d9993e72ff06189183841e60c57a08f809ea4 /src/corelib/global
parentde6ced66920600e659dbaa2509526a3bcb0b3360 (diff)
QtCore: use C++11 thread_local instead of QThreadStorage
It's more efficient than our QThreadStorage and definitely much better than the Q_GLOBAL_STATIC+QThreadStorage solution. We can do this because the last compiler not to have thread_local support was MSVC 2013, which is no longer supported since Qt 5.11. QThreadStorage also managed the lifetimes of pointers for us, so the equivalent thread_local requires std::unique_ptr. Change-Id: Id59bdd8f1a804b809e22fffd15405f1b394c48d8 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qrandom.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp
index 34df85133b..eb7eca6388 100644
--- a/src/corelib/global/qrandom.cpp
+++ b/src/corelib/global/qrandom.cpp
@@ -46,7 +46,6 @@
#include <qendian.h>
#include <qmutex.h>
#include <qobjectdefs.h>
-#include <qthreadstorage.h>
#include <errno.h>