Fix default-constructed QFileSystemEntry
authorJoão Abecasis <joao.abecasis@nokia.com>
Mon, 20 Aug 2012 11:09:55 +0000 (13:09 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 24 Sep 2012 22:08:16 +0000 (00:08 +0200)
commit0c2b7b1020384c095500599a687a88306f98c0f6
tree873360826de12a7d559e8eeb4f4fd28f269ace3c
parentba2c485c55eb2d0bf4c2478f604f51840908d30a
Fix default-constructed QFileSystemEntry

Member variables for lastSeparator, first and lastDotInFileName are now
initialized to -1 (non-existing), where the previous value of zero would
mean a separator/dot at that position and resulted in path() returning
'/', instead of '.'.

Tests were expanded for better coverage of empty state and
default-constructed instances.

Change-Id: Ie27547886b52224d38b5be0b4f920c9927fd440f
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
src/corelib/io/qfilesystementry.cpp
tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp