autotest for crashing in KArchiveDirectory::addEntry
ClosedPublic

Authored by sandsmark on Feb 15 2018, 6:10 PM.

Diff Detail

Repository
R243 KArchive
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sandsmark created this revision.Feb 15 2018, 6:10 PM
Restricted Application added a subscriber: Frameworks. · View Herald TranscriptFeb 15 2018, 6:10 PM
sandsmark requested review of this revision.Feb 15 2018, 6:10 PM
dfaure added inline comments.Feb 16 2018, 8:27 AM
autotests/karchivetest.cpp
1169

Maybe do a directory listing too, to check if the duplicate name appears twice?

sandsmark updated this revision to Diff 27666.Feb 21 2018, 10:59 AM

fix comment from dfaure

dfaure requested changes to this revision.Feb 28 2018, 5:43 PM

Thanks - almost there.

autotests/karchivetest.cpp
1172

This detaches the list, put it in a const local variable.

(standard range-for trap with Qt containers)

This revision now requires changes to proceed.Feb 28 2018, 5:43 PM
sandsmark updated this revision to Diff 28314.Mar 1 2018, 9:49 AM

use a local const copy of entries

sandsmark marked an inline comment as done.EditedMar 1 2018, 9:51 AM
This comment has been deleted.
autotests/karchivetest.cpp
1172

the performance impact here was negligible so I preferred to keep the code simpler, but changed it now

dfaure accepted this revision.Mar 1 2018, 2:58 PM

Yeah but good practice is better applied everywhere, to avoid showing bad examples to others ;)

Thanks.

This revision is now accepted and ready to land.Mar 1 2018, 2:58 PM
This revision was automatically updated to reflect the committed changes.
sandsmark marked an inline comment as done.