summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-01-14 21:58:02 +0100
committerLiang Qi <liang.qi@qt.io>2017-01-14 22:02:55 +0100
commit00935bf8c29d54fcd794ce5673cb5f973808cbf9 (patch)
tree52b470f84397b023edeb67e8ec42c01337825980 /src/corelib/itemmodels
parent6292ecdf6da6c13942dd3f39c9cd164c29c7ab37 (diff)
parentcfd069181c01bbade16c173a96100819aa719613 (diff)
Merge remote-tracking branch 'origin/5.8.0' into 5.8
Conflicts: src/gui/painting/qcoregraphics.mm Change-Id: I4d49535cd75f2cdf0151c1dbff312cce5e159760
Diffstat (limited to 'src/corelib/itemmodels')
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/corelib/itemmodels/qitemselectionmodel.h b/src/corelib/itemmodels/qitemselectionmodel.h
index 3d3cb00750..c22ac6dbe5 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.h
+++ b/src/corelib/itemmodels/qitemselectionmodel.h
@@ -251,6 +251,24 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QItemSelectionModel::SelectionFlags)
// dummy implentation of qHash() necessary for instantiating QList<QItemSelectionRange>::toSet() with MSVC
inline uint qHash(const QItemSelectionRange &) { return 0; }
+#ifdef Q_CC_MSVC
+
+/*
+ ### Qt 6:
+ ### This needs to be removed for next releases of Qt. It is a workaround for vc++ because
+ ### Qt exports QItemSelection that inherits QList<QItemSelectionRange>.
+*/
+
+# ifndef Q_TEMPLATE_EXTERN
+# if defined(QT_BUILD_CORE_LIB)
+# define Q_TEMPLATE_EXTERN
+# else
+# define Q_TEMPLATE_EXTERN extern
+# endif
+# endif
+Q_TEMPLATE_EXTERN template class Q_CORE_EXPORT QList<QItemSelectionRange>;
+#endif // Q_CC_MSVC
+
class Q_CORE_EXPORT QItemSelection : public QList<QItemSelectionRange>
{
public: