summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qarraydata.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qarraydata.h')
-rw-r--r--src/corelib/tools/qarraydata.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h
index 534f310d36..5a8c46b582 100644
--- a/src/corelib/tools/qarraydata.h
+++ b/src/corelib/tools/qarraydata.h
@@ -80,7 +80,9 @@ struct Q_CORE_EXPORT QArrayData
enum AllocationOption {
CapacityReserved = 0x1,
+#if QT_SUPPORTS(UNSHARABLE_CONTAINERS)
Unsharable = 0x2,
+#endif
RawData = 0x4,
Grow = 0x8,
@@ -99,8 +101,10 @@ struct Q_CORE_EXPORT QArrayData
AllocationOptions detachFlags() const
{
AllocationOptions result;
+#if QT_SUPPORTS(UNSHARABLE_CONTAINERS)
if (!ref.isSharable())
result |= Unsharable;
+#endif
if (capacityReserved)
result |= CapacityReserved;
return result;