Update the ACBF library.
ClosedPublic

Authored by woltherav on Sep 6 2018, 11:47 AM.

Details

Reviewers
leinir
Summary

This was detailed in T9628

This updates the ACBF library to handle references, stylesheets, frames, jumps, reading direction and some extra keys, meaning that all current ACBF features can be fully written and read.

Stylesheet parsing can be done a little better, but I suspect we'll first need to look at how we want to use it.

Test Plan

Open ACBF documents, check the output.

Diff Detail

Repository
R157 Peruse
Lint
Lint Skipped
Unit
Unit Tests Skipped
woltherav requested review of this revision.Sep 6 2018, 11:47 AM
woltherav created this revision.
leinir requested changes to this revision.Sep 6 2018, 12:43 PM

Looking really good! Mostly some nitpicking going on, and primarily documentation inconsistencies, to be fair, but still, good to get them fixed :)

src/acbf/AcbfDocument.cpp
89

A bit of context would be handy (like Q_FUNC_INFO or something more descriptive...)

src/acbf/AcbfFrame.h
56

This is also not a textarea :)

src/acbf/AcbfJump.cpp
73

"for a jump", debug says frame :)

81

wouldn't usually, but as there's another thing above, missing whitespaces around the << bit at the end :)

src/acbf/AcbfJump.h
46

Need a quick little description of what Jumps are in ACBF terms

55

Not a textarea

src/acbf/AcbfReference.h
50

Not a textarea... :)

src/acbf/AcbfReferences.h
37

Missing a description of what References are

46

this isn't a textarea, though... ;) (same in fromXml below)

src/acbf/AcbfStyleSheet.cpp
51

Might make sense to use the fast string concatenation operator % in place of the + here :)

src/acbf/AcbfStyleSheet.h
38

Missing a description of what StyleSheets are in ACBF

47

Also not a textarea :)

src/acbf/CMakeLists.txt
20

If you could pop these in in alphabetical order, that'd be lovely :) (it's not really code style so much as that's what the rest of them are, so would likely make me go "...why?" once i've forgotten there was no reason ;) )

src/creator/qml/BookMetainfoPage.qml
146

A touch hacky, but sure, it's a fair bit of effort to get that whole thing working with list-friendly input and such, so why not :)

This revision now requires changes to proceed.Sep 6 2018, 12:43 PM
woltherav marked 14 inline comments as done.Sep 6 2018, 1:33 PM

Good to know it's only trouble in the docs and debugs :p

src/acbf/AcbfDocument.cpp
89

Ack, this was just leftover debug O_O

src/creator/qml/BookMetainfoPage.qml
146

Yeah, I figured that we should first get the library parsing done and then treat creator separately.

woltherav updated this revision to Diff 41106.Sep 6 2018, 1:34 PM
woltherav marked 2 inline comments as done.

Added fixes to the docs and used concatenation for the stylesheet.

leinir accepted this revision.Sep 6 2018, 1:39 PM

Great stuff, fire away! :)

This revision is now accepted and ready to land.Sep 6 2018, 1:39 PM
woltherav closed this revision.Sep 6 2018, 1:43 PM

Okay, just merged!

(Added a gitignore file and attached that last commit to this)