summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbcursor.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-01-22 11:13:44 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-23 18:36:33 +0100
commit614589d844921e351e5422ba4a9b55aac22566c5 (patch)
treee8fed4feee59a8b4e43838621be8d12bd28cc522 /src/plugins/platforms/xcb/qxcbcursor.cpp
parentc695543f76715f1f7acef32102c325399d0953cf (diff)
Work around a binary incompatibility in MSVC
The fix in b8fe5e1bbc7f341d03d2704a6110d6e3240589bb (for bug QTBUG-27277) created two sets of begin() and end() functions for QVector. That was required because QTypedArrayData::iterator and QTypedArrayData::const_iterator have non-implicit copy constructors, which means the variants returning a strict iterator need to pass the storage pointer as an implicit first parameter. With the fix, the compiler would emit functions with two different names for each variant, which couldn't be merged. If we remove those copy constructors, the compiler might be able to generate the same code (no implicit first parameter) for both functions. Now, enter MSVC. Due to QPolygon, QVector<QPoint> and QVector<QPointF> are "extern templates". That is, the compiler is not allowed to inline anything, it must generate calls into QtCore (which we must fix for Qt 6, if we can). That means QtCore would only have one set of begin() / end() functions. If an application tried to use the other set by defining QT_STRICT_ITERATORS, you'd get a linker error for: ?begin@?$QVector@VQPoint@@@@QEAA?AViterator@?$QTypedArrayData@VQPoint@@@@V23@@Z (class QTypedArrayData<class QPoint>::iterator QGenericArray<class QPoint>::begin(class QTypedArrayData<class QPoint>::iterator)) Change-Id: I5c10a7d0a4855f4ba84056d313c6a800ecdcfe37 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbcursor.cpp')
0 files changed, 0 insertions, 0 deletions