QFileSystemModel: fix permission mangling
authorMarc Mutz <marc.mutz@kdab.com>
Wed, 8 Aug 2012 10:42:06 +0000 (12:42 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 26 Sep 2012 02:03:41 +0000 (04:03 +0200)
commit0842d32441a585026336d616b051915865d51d6a
tree3b1e13fec574a356e1d6f3f190c0b2bff64a17b9
parent6b6fefad48abed28df69d0fa830accbb0c8dcb4d
QFileSystemModel: fix permission mangling

The old code masked out write flags before returning permissions
from permissions() or data(FilePermissions) in order to force
QFileDialog to disable the rename and delete actions. This was to
fix Task 143519, but introduced QTBUG-20503.

Instead, revert to the pre-143519-bugfix code and do the necessary
check in QFileDialog directly.

Also add a testcase for 143519.

Reported-by: Gilles Pascual
Task-number: QTBUG-20503
Task-number: 143519

Change-Id: I140109341c0ed40722e3aac4327c2a740fb014c2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
dist/changes-5.0.0
src/widgets/dialogs/qfiledialog.cpp
src/widgets/dialogs/qfilesystemmodel.cpp
tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp