[WIP]Create context menu entry to rotate individual pages
Needs RevisionPublic

Authored by shubham on Feb 4 2019, 11:21 AM.

Details

Reviewers
aacid
ngraham
Summary

BUG: 307224

Test Plan
  1. Open any document
  2. Right click and choose to either rotate right or left the selected page

Diff Detail

Repository
R223 Okular
Branch
page
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8078
Build 8096: arc lint + arc unit
shubham created this revision.Feb 4 2019, 11:21 AM
Restricted Application added a project: Okular. · View Herald TranscriptFeb 4 2019, 11:21 AM
Restricted Application added a subscriber: okular-devel. · View Herald Transcript
shubham requested review of this revision.Feb 4 2019, 11:21 AM
shubham added inline comments.Feb 4 2019, 11:25 AM
part.cpp
2453

This gives error, any help how could I access rotateAt() function of private API without actually making PagePrivate *d in Page as public (Though it is a wrong way to do so)?

shubham edited the test plan for this revision. (Show Details)Feb 4 2019, 11:29 AM
shubham updated this revision to Diff 50833.Feb 4 2019, 11:44 AM

Set WhatsThis text for the actions

If your patch doesn't work yet and you need help with it, it's customary to put [RFC] or [WIP] at the beginning of the title.

+1 on the feature though. People ask for this quite a bit.

shubham retitled this revision from Create context menu entry to rotate individual pages to [RFC]Create context menu entry to rotate individual pages.Feb 4 2019, 2:27 PM

Any piece of help would be appreciated, I m stuck.

aacid added a comment.Feb 9 2019, 10:11 AM

Stuck with what?

@aacid stuck with what my inline message says.

shubham marked an inline comment as done.Feb 9 2019, 4:26 PM
shubham updated this revision to Diff 51269.Feb 9 2019, 4:28 PM

Remove unneeded include

shubham retitled this revision from [RFC]Create context menu entry to rotate individual pages to [WIP]Create context menu entry to rotate individual pages.Feb 9 2019, 4:29 PM
shubham added inline comments.
part.cpp
2452

This is valid statement, but why does this produce error?

This comment was removed by shubham.
shubham updated this revision to Diff 51520.Feb 12 2019, 3:27 PM

use rotateAt()

aacid added a comment.Feb 17 2019, 6:48 PM

The code doesn't link.

How do I resolve this?

aacid added a comment.Feb 17 2019, 7:05 PM

How do I resolve this?

Don't use the private class, what made you think you can use the private class? it's *private* so obviously it's non usable (unless you know what you're doing and you have reasons for it).

I already told you on IRC how to fix it a long time ago, if you need the functionality, just make it accessible in Page.

By the way does this mean you haven't tested this code at all to see if it actually does anything at all?

core/page.h
397

This change is totally unacceptable.

aacid requested changes to this revision.Jun 22 2019, 2:46 PM
This revision now requires changes to proceed.Jun 22 2019, 2:46 PM

Sometimes I think it makes sense to move the context menu to the widget it belongs to. That widget would accept the context menu event, and create a context menu. Basically the same context menu that is currently created by Part.

Because PageView will create the context menu then, it should be possible to access Page correctly.

Just a thought...