archivemodel: drop static QMap
ClosedPublic

Authored by elvisangelaccio on Nov 5 2016, 3:45 PM.

Details

Summary

Static global objects should be avoided if possible. The only reason we needed this QMap as global static was because of its usage in ArchiveModelSorter, but this class is gone as of D3271. So we can just make the QMap a member of the model.

While at it, make it a QMap<int, QByteArray> instead of QMap<int, QString>. This avoids the need of converting back (using QString::toUtf8()).

Test Plan

Works

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.
elvisangelaccio retitled this revision from to archivemodel: drop static QMap.
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
elvisangelaccio set the repository for this revision to R36 Ark.
Restricted Application added a project: Ark. · View Herald TranscriptNov 5 2016, 3:45 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
elvisangelaccio updated this object.
rthomsen accepted this revision.Nov 7 2016, 7:51 PM
rthomsen edited edge metadata.

Ship it! :)

This revision is now accepted and ready to land.Nov 7 2016, 7:51 PM
This revision was automatically updated to reflect the committed changes.