summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qarraydata.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-07-06 22:21:04 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-07-08 12:31:15 +0000
commit712d605c4343f33390ddfe92e504cb35f478a542 (patch)
tree15bb1973b3b0cf8f02b1c5bb0e48ce4b156e4d90 /src/corelib/tools/qarraydata.cpp
parent521ad6048fd91357270816fd304a6a0d0d7bde80 (diff)
Compile with !QT_SUPPORTS(UNSHARABLE_CONTAINERS)
'Unsharable' isn't available, then. Change-Id: Ifab3b2306379c651bfcd8381836a8f7eadbdc6d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qarraydata.cpp')
-rw-r--r--src/corelib/tools/qarraydata.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp
index ef15fae83a..d9519745b0 100644
--- a/src/corelib/tools/qarraydata.cpp
+++ b/src/corelib/tools/qarraydata.cpp
@@ -103,7 +103,11 @@ QArrayData *QArrayData::allocate(size_t objectSize, size_t alignment,
quintptr data = (quintptr(header) + sizeof(QArrayData) + alignment - 1)
& ~(alignment - 1);
+#if QT_SUPPORTS(UNSHARABLE_CONTAINERS)
header->ref.atomic.store(bool(!(options & Unsharable)));
+#else
+ header->ref.atomic.store(1);
+#endif
header->size = 0;
header->alloc = capacity;
header->capacityReserved = bool(options & CapacityReserved);