Go to file
Marc Mutz 373a7277db QDBusMetaTypeId: don't cache the result of qMetaTypeId<>() in static ints
There's not much point in caching the result of qMetaTypeId<>,
because it's already internally memoised.

In addition, the code that initialised the static int caches wasn't
protected against concurrent access under the assumption that the
operations performed were thread-safe.

That is true for most of them, but not for the stores to the static ints,
which race against each other:

   // Thread A               // Thread B
   r1 = initialized /*=false*/
                             r1 = initialized /*=false*/
   r2 = qMetaTypeId<...>();
                             r2 = qMetaTypeId<...>();
   message = r2;             message = r2; // race, ditto for all other ints

To fix, turn the ints into inline functions that just call the respective
qMetaTypeId<>() function.

Change-Id: I5aa80c624872c3867232abc26ffdcde70cd54022
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-22 19:19:37 +02:00
bin move the module validation below the loading of sync.profile 2012-09-19 19:54:44 +02:00
config.tests config.tests/arch: make distclean on the test, not qt 2012-09-14 00:06:41 +02:00
dist SIC: QtPrintSupport - Remove QAbstractPageSetupDialog 2012-09-17 22:08:16 +02:00
doc Move examples to proper location. 2012-09-21 19:59:16 +02:00
examples Move examples to proper location. 2012-09-21 19:59:16 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs announce the android platform in the respective specs 2012-09-21 02:44:22 +02:00
qmake Use QStringList::join(QChar) overload where applicable [qmake] 2012-09-21 02:44:22 +02:00
src QDBusMetaTypeId: don't cache the result of qMetaTypeId<>() in static ints 2012-09-22 19:19:37 +02:00
tests A step out from Harfbuzz (reduce dependency) 2012-09-22 00:47:40 +02:00
tools don't require a fake qconfig.h for the configure bootstrap 2012-09-19 19:54:44 +02:00
util Make plugintest util work on Windows. 2012-08-30 13:51:22 +02:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Updated .gitignore 2012-08-18 13:59:11 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure configure: remove CONFIG features while getting PKG_CONFIG 2012-09-22 19:02:01 +02:00
configure.bat don't skip the configure.exe build even when it already exists 2012-09-21 02:44:22 +02:00
header.BSD Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.FDL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL-ONLY Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
INSTALL Remove Symbian specific code from qtbase. 2012-01-31 07:08:31 +01:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update contact information in license headers. 2012-01-23 04:04:33 +01:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtbase.pro Install right version of tools when x-compiling. 2012-07-17 12:52:48 +02:00
sync.profile Revert "Move QWindowSystemInterface out of qpa." 2012-08-03 00:38:09 +02:00