Simplify page size configuration
ClosedPublic

Authored by pino on Jun 25 2018, 4:54 AM.

Details

Summary

Insert the label -> key mappings directly as user data in the paper size
combo box, so there is no need to keep their map for lookups.

Also, make use of QPageSize for the labels, so there is no need for
translating them again in kbibtex.

Test Plan

Builds fine, and the configuration is read/saved correctly
as before.

Diff Detail

Repository
R462 KBibTeX
Branch
pagesizes (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3503
Build 3521: arc lint + arc unit
pino requested review of this revision.Jun 25 2018, 4:54 AM
pino created this revision.
thomasfischer requested changes to this revision.Oct 4 2018, 8:35 PM

Sorry for my late answer.
Yes, this patch can be accepted into KBibTeX.
One minor issue: I am quite certain it would be better to have the QMap both static and const. Please let me know if you disagree.

src/gui/preferences/settingsfileexporterpdfpswidget.cpp
96–103

This map can be made static.

This revision now requires changes to proceed.Oct 4 2018, 8:35 PM
pino updated this revision to Diff 42896.Oct 4 2018, 9:33 PM

Make the map static.

pino marked an inline comment as done.Oct 4 2018, 9:35 PM
thomasfischer accepted this revision.Oct 5 2018, 12:25 PM

Ok, ship it (commit it to master)

This revision is now accepted and ready to land.Oct 5 2018, 12:25 PM
pino closed this revision.Oct 6 2018, 9:06 AM