KIO code change to return list of available archive protocols
ClosedPublic

Authored by martinkostolny on May 2 2016, 5:02 PM.

Details

Summary

If this is accepted by Krusader Krew, I'll propose it to KIO developers.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
martinkostolny retitled this revision from to KIO code change to return list of available archive protocols.
martinkostolny updated this object.
martinkostolny edited the test plan for this revision. (Show Details)
martinkostolny added a reviewer: Krusader.
martinkostolny added a project: Krusader.
asensi accepted this revision.May 3 2016, 9:00 PM
asensi added a reviewer: asensi.
asensi added a subscriber: asensi.

If this is accepted by Krusader Krew, I'll propose it to KIO developers.

It's a good idea, and KIO developers can tell later what they think.

Note: Probably KIO developers will like that for example value.at(0) is used (instead of using value(0)) because in https://doc.qt.io/qt-5/qlist.html it's written that "at() can be faster than operator[](), because it never causes a deep copy to occur".

This revision is now accepted and ready to land.May 3 2016, 9:00 PM

Thanks for review and the at() suggestion! I've chosen value(0) because when the list is empty, it creates empty string automatically. But I didn't know that it is always making a copy of the value. So I'll adjust the code so that there is a list size condition and at(0) call.

gengisdave accepted this revision.May 7 2016, 12:00 PM
gengisdave added a reviewer: gengisdave.
martinkostolny closed this revision.Jul 7 2016, 8:43 AM

David Faure created a useful method KProtocolInfo::archiveMimetypes("krarc") which we've used in D1528.