Add DocumentRevision to Okular
AbandonedPublic

Authored by chinmoyr on May 25 2018, 3:35 PM.

Details

Reviewers
aacid
Summary

This patch adds DocumentRevision class to Okular which stores information that can
be made use by generators to create a revision of the document.

Diff Detail

Repository
R223 Okular
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
chinmoyr created this revision.May 25 2018, 3:35 PM
Restricted Application added a project: Okular. · View Herald TranscriptMay 25 2018, 3:35 PM
Restricted Application added a subscriber: okular-devel. · View Herald Transcript
chinmoyr requested review of this revision.May 25 2018, 3:35 PM
aacid added a comment.May 27 2018, 7:55 PM

Can you explain what's the use case for this?

I thought we had agreed that using qvariantmaps for passing structures was a bad idea.
If i have to implement this for my AwesomeGenerator, how do i know what comes in revData?

Also the API is weird, you have

QString generateDocumentRevision( int revNum );

but which revNums are you going to use.

I would really appreciate if you could talk to me on IRC because I'm lost at what you're trying to accomplish.

Can you explain what's the use case for this?

Adobe reader allows user to view different signed revisions of a PDF. This patch intends to implement
that feature.

I thought we had agreed that using qvariantmaps for passing structures was a bad idea.
If i have to implement this for my AwesomeGenerator, how do i know what comes in revData?

My bad, I thought you were talking about returning a QVariantMap. I will correct it in next update.

Also the API is weird, you have

QString generateDocumentRevision( int revNum );

but which revNums are you going to use.

The revision number starts from 1 and goes till the total number of signature form fields. The idea here is to
include the total number of signature fields in generator's metadata which can then be used by okular gui
to request generation of a revision using the field number i.e. revNum. After generating a temporary PDF
from the byte range specified in signature the generator will return its path.

I would really appreciate if you could talk to me on IRC because I'm lost at what you're trying to accomplish.

Sorry if that caused you inconvenience. This whole month I am keeping myself away from using internet
except for like 15 minutes for replying to emails and phabricator reviews. I think this week will be no different.
However, starting next week I will be active on IRC. I hope it is okay with you (?)

aacid added a comment.May 31 2018, 1:12 PM

Can you explain what's the use case for this?

Adobe reader allows user to view different signed revisions of a PDF. This patch intends to implement
that feature.

I thought we had agreed that using qvariantmaps for passing structures was a bad idea.
If i have to implement this for my AwesomeGenerator, how do i know what comes in revData?

My bad, I thought you were talking about returning a QVariantMap. I will correct it in next update.

Also the API is weird, you have

QString generateDocumentRevision( int revNum );

but which revNums are you going to use.

The revision number starts from 1 and goes till the total number of signature form fields. The idea here is to
include the total number of signature fields in generator's metadata

another thing you want to pass through a qvariant? if you need a getter, add a getter :)

aacid added a comment.Jun 26 2018, 2:23 PM

The revision number starts from 1 and goes till the total number of signature form fields.

This looks like a bit of implementation detail the UI developer has to know, in this case it's you, but maybe makes sense to have a getter of some sorts?

Also why start at 1?

aacid added a comment.Jan 16 2019, 9:40 PM

@chinmoyr What is this for? I didn't see it in your final branch, should it be discarded? Or it has some purpose?

chinmoyr abandoned this revision.Jan 19 2019, 12:59 PM

@aacid Sorry for late reply. This got lost in my inbox.

This diff is not required. The relevant code for generating revision is already in poppler_generator.