summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatype.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-02-09 15:22:03 +0100
committerUlf Hermann <ulf.hermann@qt.io>2018-03-21 14:00:29 +0000
commit6e8e9979d0786d7d730528c2888e0e1af4fb96ca (patch)
tree329bd13a96664cf3a238dde419d6335d55c1fc0f /src/corelib/kernel/qmetatype.cpp
parenta47cb146809e32f43449dcfe9932833c2f0ab987 (diff)
Make sure we can build with -no-feature-itemmodel
Various pieces of code have to be disabled in this case. Change-Id: I83b133f17e9f024016a79c9103293627185449d2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetatype.cpp')
-rw-r--r--src/corelib/kernel/qmetatype.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 518381712a..fc40668c9a 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -61,7 +61,6 @@
# include "qbitarray.h"
# include "qurl.h"
# include "qvariant.h"
-# include "qabstractitemmodel.h"
# include "qjsonvalue.h"
# include "qjsonobject.h"
# include "qjsonarray.h"
@@ -69,6 +68,10 @@
# include "qbytearraylist.h"
#endif
+#if QT_CONFIG(itemmodel)
+# include "qabstractitemmodel.h"
+#endif
+
#ifndef QT_NO_GEOM_VARIANT
# include "qsize.h"
# include "qpoint.h"
@@ -1349,8 +1352,10 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data)
case QMetaType::Void:
case QMetaType::VoidStar:
case QMetaType::QObjectStar:
+#if QT_CONFIG(itemmodel)
case QMetaType::QModelIndex:
case QMetaType::QPersistentModelIndex:
+#endif
case QMetaType::QJsonValue:
case QMetaType::QJsonObject:
case QMetaType::QJsonArray:
@@ -1573,8 +1578,10 @@ bool QMetaType::load(QDataStream &stream, int type, void *data)
case QMetaType::Void:
case QMetaType::VoidStar:
case QMetaType::QObjectStar:
+#if QT_CONFIG(itemmodel)
case QMetaType::QModelIndex:
case QMetaType::QPersistentModelIndex:
+#endif
case QMetaType::QJsonValue:
case QMetaType::QJsonObject:
case QMetaType::QJsonArray: