diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-02-07 11:28:44 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-02-22 02:52:44 +0100 |
commit | 962a3d8a988cb695b08d79900fb25d2c41a2225c (patch) | |
tree | 3e8d45a010ca03a1520b0f52b4022f62f322d719 /src/widgets/widgets/qmenu.cpp | |
parent | 1ce3585305febbd2fed6899cad0c58729991ec43 (diff) |
Stabilize QFileSystemModel::dirsBeforeFiles test
Make the test operate in its own temporary directory, so that entries
left behind by other test functions don't impact this test.
Also, call QFileSystemModel::sort explicitly; it would otherwise only
be done once through a single-shot timer, and the test processes events
until the model is populated, which might not process that delayed
sorting. Since dirsBeforeFiles tests the sorting algorithm and not
the sorting logic, best to do this explicitly.
In case of sort failure, print diagnostics.
Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io>
Fixes: QTBUG-75452
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 4e796e0b0dcf4c0848044471021db3afce16ee5d)
Change-Id: I144b68a17280a38cc7d6daf7ec343eea4453623d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmenu.cpp')
0 files changed, 0 insertions, 0 deletions