Go to file
João Abecasis 796f85b611 Don't operate on bogus data, assert on preconditions instead
QVector::erase shouldn't try to make sense of iterators it doesn't own,
so the validation being done here is bogus and dangerous. Instead, it's
preferrable to assert, the user needs to ensure proper ownership.

The case of erasing an empty sequence is not checked for preconditions
to allow

    QVector v;
    v.erase(v.begin(), v.end());

, while being stricter on other uses.

Autotests were using ill-formed calls to the single argument erase()
function on an empty vector and were fixed. This function erases exactly
one element, the one pointed to by abegin and require the element exist
and be valid.

Change-Id: I5f1a6d0d8da072eae0c73a3012620c4ce1065cf0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-23 14:16:33 +02:00
bin let default_pre add modules to the qmake path 2012-06-19 16:46:03 +02:00
config.tests clang: Do not use libstdc++ when C++11 is enabled 2012-06-19 00:39:28 +02:00
dist Record if a metatype is a smart pointer to a QObject derived. 2012-06-20 15:45:07 +02:00
doc Remove the MacMainWindow example. 2012-05-30 01:54:45 +02:00
examples Update calendarwidget example 2012-06-20 12:38:32 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Add a variable for the private includes for modules. 2012-06-23 14:16:24 +02:00
qmake Fixed Wince Makefile environment 2012-06-19 16:46:09 +02:00
src Don't operate on bogus data, assert on preconditions instead 2012-06-23 14:16:33 +02:00
tests Don't operate on bogus data, assert on preconditions instead 2012-06-23 14:16:33 +02:00
tools New command line switches for configure.exe 2012-06-21 02:52:16 +02:00
util QUnicodeTables: some internal API renamings 2012-06-22 09:47:59 +02:00
.gitattributes Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
.gitignore Add imports directory to ignore list 2012-04-11 01:42:12 +02:00
.tag Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
configure purge QMAKE_INCDIR_QT and QMAKE_LIBDIR_QT 2012-06-19 16:39:59 +02:00
configure.bat Remove Q_BYTE_ORDER and -*-endian arguments from configures 2012-03-02 14:48:00 +01:00
header.BSD Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.FDL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL-ONLY Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
INSTALL Remove Symbian specific code from qtbase. 2012-01-31 07:08:31 +01:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +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 contact information in license headers. 2012-01-23 04:04:33 +01:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtbase.pro Restore building of examples, tests. 2012-06-22 05:21:52 +02:00
sync.profile don't refer to removed headers 2012-06-19 16:46:04 +02:00