D10792: Raise annotation window when clicking on annotation

2018-05-18 Thread Albert Astals Cid
This revision was automatically updated to reflect the committed changes. Closed by commit R223:48b9ca66a6fd: Raise annotation window when clicking on annotation (authored by simgunz, committed by aacid). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D10792?vs=33907=34434#toc REPOSITORY

D10792: Raise annotation window when clicking on annotation

2018-05-18 Thread Albert Astals Cid
aacid accepted this revision. aacid added a comment. This revision is now accepted and ready to land. Nice! REPOSITORY R223 Okular BRANCH raise-annotation-window REVISION DETAIL https://phabricator.kde.org/D10792 To: simgunz, #okular, aacid Cc: okular-devel, ngraham, #okular, aacid

D10792: Raise annotation window when clicking on annotation

2018-05-09 Thread Simone Gaiarin
simgunz updated this revision to Diff 33907. simgunz added a comment. Restricted Application added a subscriber: okular-devel. - Focus text edit of annotation when double-clicking on annotation icon REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE

D10792: Raise annotation window when clicking on annotation

2018-04-24 Thread Simone Gaiarin
simgunz added a comment. I'll have a look at it. I think that focusing it makes sense also to locate which popup note is associated with the annotation clicked (especially if they are not overlapped). REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D10792 To:

D10792: Raise annotation window when clicking on annotation

2018-04-24 Thread Albert Astals Cid
aacid added a comment. When double clicking an already open annotation, we bring it to front, but it doesn't get keyboard focus (the text cursos doesn't blink), which is a different behaviour from when the annocation is closed. Do you think that is something worth trying to fix here or

D10792: Raise annotation window when clicking on annotation

2018-04-18 Thread Simone Gaiarin
simgunz updated this revision to Diff 32442. simgunz added a comment. - Propagate the event REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10792?vs=31564=32442 BRANCH raise-annotation-window REVISION DETAIL https://phabricator.kde.org/D10792 AFFECTED

D10792: Raise annotation window when clicking on annotation

2018-04-16 Thread Albert Astals Cid
aacid added inline comments. INLINE COMMENTS > annotwindow.cpp:316 > +raise(); > +return true; > +} I think this should be return false; otherwise i don't get the blinking cursor when clicking on the text field of an already open annotation. Can you double check?

D10792: Raise annotation window when clicking on annotation

2018-04-07 Thread Simone Gaiarin
simgunz added a comment. In D10792#241504 , @aacid wrote: > In D10792#241405 , @simgunz wrote: > > > Thanks to your suggestions I made some progresses. > > > > My current autotest looks as in

D10792: Raise annotation window when clicking on annotation

2018-04-07 Thread Simone Gaiarin
simgunz updated this revision to Diff 31564. simgunz added a comment. - Set object name in AnnotWindow (for autotest) - Add basic autotest for AnnotWindow - Test AnnotWindow raised when clicking on its annotation - Test click on AnnotWindow raises it - Remove trailing spaces

D10792: Raise annotation window when clicking on annotation

2018-04-06 Thread Albert Astals Cid
aacid added a comment. In D10792#241405 , @simgunz wrote: > Thanks to your suggestions I made some progresses. > > My current autotest looks as in the block below. > > Problems: > > 1. If I do not export `AnnotWindow` and call

D10792: Raise annotation window when clicking on annotation

2018-04-06 Thread Simone Gaiarin
simgunz added a comment. Thanks to your suggestions I made some progresses. My current autotest looks as in the block below. Problems: 1. If I do not export `AnnotWindow` and call `QVERIFY( part.m_pageView->findChildren().size() == 1 )` it fails, while calling `QVERIFY(

D10792: Raise annotation window when clicking on annotation

2018-03-31 Thread Albert Astals Cid
aacid added a comment. In D10792#237792 , @simgunz wrote: > I have few questions regarding the internal structure of okular and how to write autotests: > > 1. To click on an annotation to open the annotation window I though to do the

D10792: Raise annotation window when clicking on annotation

2018-03-31 Thread Albert Astals Cid
aacid added a comment. In D10792#237224 , @simgunz wrote: > Ok. I figured it out myself. > > I need to export `AnnotWindow` (add `OKULARCORE_EXPORT` to the class `AnnotWindow`) if I want to use `findChild` to retrieve it. I am not sure if

D10792: Raise annotation window when clicking on annotation

2018-03-31 Thread Simone Gaiarin
simgunz added a comment. I have few questions regarding the internal structure of okular and how to write autotests: 1. To click on an annotation to open the annotation window I though to do the following (partially copied from other tests): const int width =

D10792: Raise annotation window when clicking on annotation

2018-03-30 Thread Simone Gaiarin
simgunz added a comment. Ok. I figured it out myself. I need to export `AnnotWindow` (add `OKULARCORE_EXPORT` to the class `AnnotWindow`) if I want to use `findChild` to retrieve it. I am not sure if this should be exported just for the autotest. Maybe there is an alternative method

D10792: Raise annotation window when clicking on annotation

2018-03-29 Thread Simone Gaiarin
simgunz added a comment. I've progressed a bit on this, but now I get the following error: /usr/include/qt/QtCore/qobject.h:179: undefined reference to `AnnotWindow::staticMetaObject' executing this line: AnnotWindow *wdw = part.m_pageView->findChild(); I have added

D10792: Raise annotation window when clicking on annotation

2018-03-15 Thread Albert Astals Cid
aacid added a comment. In D10792#226357 , @simgunz wrote: > I'm adding a new test to `parttest.cpp` because is the only test where there is the `part` component that allows me to access the `m_pageView`. > > I'm trying to call the public

D10792: Raise annotation window when clicking on annotation

2018-03-14 Thread Albert Astals Cid
aacid added a comment. In D10792#225334 , @simgunz wrote: > I've never written an autotest, so I need to figure out how to do it, but I can try. It's gonna take some time, because I'm busy in the next 1-2 weeks. We have lots of them in

D10792: Raise annotation window when clicking on annotation

2018-03-14 Thread Simone Gaiarin
simgunz added a comment. I've never written an autotest, so I need to figure out how to do it, but I can try. It's gonna take some time, because I'm busy in the next 1-2 weeks. REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D10792 To: simgunz, #okular, aacid Cc:

D10792: Raise annotation window when clicking on annotation

2018-03-14 Thread Simone Gaiarin
simgunz updated this revision to Diff 29462. simgunz added a comment. - Avoid cast, use parentWidget() REPOSITORY R223 Okular CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10792?vs=27914=29462 BRANCH raise-annotation-window REVISION DETAIL

D10792: Raise annotation window when clicking on annotation

2018-03-13 Thread Albert Astals Cid
aacid added a comment. ping? REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D10792 To: simgunz, #okular, aacid Cc: ngraham, #okular, michaelweghorn, aacid

D10792: Raise annotation window when clicking on annotation

2018-02-26 Thread Albert Astals Cid
aacid added a comment. Do you feel like you can try adding an autotest for this? INLINE COMMENTS > annotwindow.cpp:144 > mousePressPos = me->pos(); > +((QFrame*)parent())->raise(); > break; can you use parentWidget() here and avoid the nasty

D10792: Raise annotation window when clicking on annotation

2018-02-24 Thread Nathaniel Graham
ngraham added a reviewer: aacid. ngraham added a comment. Can confirm, this definitely improves things with overlapping notes. REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D10792 To: simgunz, #okular, aacid Cc: ngraham, #okular, michaelweghorn, aacid

D10792: Raise annotation window when clicking on annotation

2018-02-24 Thread Simone Gaiarin
simgunz added a comment. This patch mostly solves the problem reported in BUG: 388532. Though, the popup note is not raised when clicking on the border of the annotation window, or in the latex rederer message. REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D10792

D10792: Raise annotation window when clicking on annotation

2018-02-24 Thread Nathaniel Graham
ngraham added a reviewer: Okular. REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D10792 To: simgunz, #okular Cc: ngraham, #okular, michaelweghorn, aacid

D10792: Raise annotation window when clicking on annotation

2018-02-24 Thread Simone Gaiarin
simgunz created this revision. Restricted Application added a subscriber: Okular. Restricted Application added a project: Okular. simgunz requested review of this revision. REVISION SUMMARY Raise annotation window when clicking on the window title, window text edit, or the associated