Go to file
Thiago Macieira 614589d844 Work around a binary incompatibility in MSVC
The fix in b8fe5e1bbc (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>
2014-01-23 18:36:33 +01:00
bin Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-15 22:39:25 +02:00
config.tests Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2014-01-21 17:57:54 +01:00
dist Merge remote-tracking branch 'origin/stable' into dev 2013-12-24 00:56:59 +01:00
doc Ask qdoc not to parse Q_DECL_UNUSED 2014-01-14 18:52:14 +01:00
examples Merge remote-tracking branch 'origin/stable' into dev 2014-01-20 18:18:59 +01:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Add freebsd-clang mkspec 2014-01-22 12:46:14 +01:00
qmake Merge remote-tracking branch 'origin/stable' into dev 2014-01-20 18:18:59 +01:00
src Work around a binary incompatibility in MSVC 2014-01-23 18:36:33 +01:00
tests Ref qualified version of QImage::convertToFormat 2014-01-23 18:20:49 +01:00
tools Replace win32-g++ with mingw scope 2014-01-17 12:08:24 +01:00
util move and build qlalr 2014-01-20 09:26:47 +01:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore GitIgnore updates 2013-12-09 17:28:18 +01:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure iOS: Enable building of basic tests 2014-01-22 12:35:17 +01:00
configure.bat get rid of syncqt wrapper scripts 2013-05-13 21:54:48 +02:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL INSTALL: Fix URL of Installing Qt documentation 2013-04-11 16:09:07 +02:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
LICENSE.PREVIEW.COMMERCIAL Update LICENSE.PREVIEW.COMMERCIAL license 2013-06-03 20:04:26 +02:00
qtbase.pro Merge remote-tracking branch 'origin/release' into stable 2013-12-05 17:42:33 +01:00
sync.profile generate qfeatures.h at build time 2013-10-29 15:37:58 +01:00