Get columns to show from first file entry
ClosedPublic

Authored by rthomsen on Apr 19 2019, 10:25 AM.

Details

Summary

Currently, we use the first entry in an archive to determine which columns to show. If the first entry happens to be a directory, then all relevant columns might not be shown. See bug 406135.

This diff makes sure we always check the first file entry for columns to show.

Test Plan

Open archive test_3.zip in the bug and verify that the CRC column is shown.

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rthomsen created this revision.Apr 19 2019, 10:25 AM
Restricted Application added subscribers: Ark, kde-utils-devel. · View Herald TranscriptApr 19 2019, 10:25 AM
rthomsen requested review of this revision.Apr 19 2019, 10:25 AM
elvisangelaccio requested changes to this revision.Apr 22 2019, 4:12 PM
elvisangelaccio added inline comments.
part/archivemodel.cpp
543

qSort() is deprecated, please use std::sort() instead.

545

Please move this debug line within the if block below. If the archive fails to open, there are no columns to show.

This revision now requires changes to proceed.Apr 22 2019, 4:12 PM
rthomsen updated this revision to Diff 57890.May 11 2019, 7:25 AM

Implement Elvis' suggestions.

elvisangelaccio accepted this revision.May 11 2019, 9:53 AM
This revision is now accepted and ready to land.May 11 2019, 9:53 AM
This revision was automatically updated to reflect the committed changes.