diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2021-04-01 23:59:55 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2021-04-07 08:36:03 -0700 |
commit | 89a0ed100977a86f12ce0837b4d7787b88f09922 (patch) | |
tree | 1930deadf5d081a0e84cb982c49b59cce4f9de3d /src/corelib/global/qrandom_p.h | |
parent | 30d5e13768d970e538737d1740898f59157e6017 (diff) |
Allow qrandom_p.h to be included by more than one .cpp in QtCore
I thought we could use C++17 inline variables, but those can't be used
across DLL boundaries:
qrandom_p.h:75:48: error: definition of 'QBasicAtomicInteger<unsigned int> qt_randomdevice_control' is marked 'dllimport'
Change-Id: Id2983978ad544ff79911fffd1671f857587ef2fb
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib/global/qrandom_p.h')
-rw-r--r-- | src/corelib/global/qrandom_p.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/corelib/global/qrandom_p.h b/src/corelib/global/qrandom_p.h index 052aef262e..7e228b3fde 100644 --- a/src/corelib/global/qrandom_p.h +++ b/src/corelib/global/qrandom_p.h @@ -71,9 +71,7 @@ enum RNGType { MersenneTwister = 1 }; -#if defined(QT_BUILD_INTERNAL) && defined(QT_BUILD_CORE_LIB) -Q_CORE_EXPORT QBasicAtomicInteger<uint> qt_randomdevice_control = Q_BASIC_ATOMIC_INITIALIZER(0U); -#elif defined(QT_BUILD_INTERNAL) +#if defined(QT_BUILD_INTERNAL) extern Q_CORE_EXPORT QBasicAtomicInteger<uint> qt_randomdevice_control; #else static const struct |