qt5base-lts/tests/auto
João Abecasis 75286739de Fix and simplify QString::mid
'position' was being used to initialize 'n' before being fully
validated. To compensate for this, the code attempted to fix 'n' once
'position' was found to be invalid (negative). This would, however, also
attempt to "fix" a perfectly valid value of 'n'.

By fully validating 'position' beforehand we avoid this trap and can
safely use it to validate and reset 'n', as needed.

Arithmetic for boundary conditions of 'n' was rearranged to avoid
triggering integer overflow.

Removed explicit check for shared_null, as the same behaviour can be
supported without it.

Change-Id: Ie9bff7b8137a74f55c7dcfe629bd569045e28f3c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-14 12:50:14 +01:00
..
bic Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
compilerwarnings/data Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
concurrent Move QtConcurrent into its own module 2012-02-05 17:49:16 +01:00
corelib Fix and simplify QString::mid 2012-02-14 12:50:14 +01:00
dbus Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
gui Un-guard a QRawFont autotest. 2012-02-03 01:40:22 +01:00
guiapplauncher Update the documentation after moving examples. 2011-07-05 21:19:08 +02:00
network Don't include config.tests/unix/openssl/openssl.pri (again) 2012-02-03 01:40:07 +01:00
opengl Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
other Allow function types to be registered without workarounds 2012-01-31 16:17:55 +01:00
sql Handle the 'real' datatype correctly in the SQLite driver 2012-02-03 15:09:03 +01:00
testlib Fixed selftests unittest on windows 2012-02-02 05:42:07 +01:00
tools Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
widgets Remove QInputContext 2012-02-03 11:01:34 +01:00
xml Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
auto.pro Move QtConcurrent into its own module 2012-02-05 17:49:16 +01:00
network-settings.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
platformquirks.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
test.pl Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00