Commit graph

9149 commits

Author SHA1 Message Date
Albert Astals Cid
af52681993 Support more than latin1 chars on --find command line option
BUGS: 427596
2020-10-25 01:11:57 +02:00
Albert Astals Cid
b9c40d709d Fix formatting after Laurent's commit
Please Laurent try to use MR when you do changes that may break our CI
like this one

CCMAIL: montel@kde.org
2020-10-23 22:48:44 +02:00
Laurent Montel
486e05b270 If include is define in .h remove it if it's defined in .cpp too (scripted) 2020-10-23 07:32:28 +02:00
Nate Graham
12cb9d4e3e Merge branch 'release/20.08' into master 2020-10-21 12:31:28 -06:00
Nate Graham
777ac37ea2 Fix fast scrolling with Shift+Scroll
When holding down the shift key, multiply wheel and touchpad scroll
distances by 10 to re-implement the fast scrolling feature that
broke when we added animated/smooth scrolling.

BUG: 420889
FIXED-IN: 1.11.3
2020-10-21 11:52:00 -06:00
David Hurka
843c43cc6b Fix cursor not updated after clicking internal link
updateCursor() was called by wheelEvent(), which made sense,
because after the wheel event the page will have moved under the cursor.

With smooth scrolling, it makes less sense in wheelEvent(),
because at that point scrolling is still in the future.

scrollContentsBy() appears to be called on every scroll step.
(It is documented to be called at scrollbar value changes, so makes sense.)

This patch removes updateCursor() from wheelEvent(), but adds it to scrollContentsBy().

I did not check anything out with d->visibleItems, as was indicated it graphics/okular!176.

BUG: 421437
2020-10-20 18:52:00 -06:00
David Hurka
8b008b02fc Fix cursor not updated after clicking internal link
updateCursor() was called by wheelEvent(), which made sense,
because after the wheel event the page will have moved under the cursor.

With smooth scrolling, it makes less sense in wheelEvent(),
because at that point scrolling is still in the future.

scrollContentsBy() appears to be called on every scroll step.
(It is documented to be called at scrollbar value changes, so makes sense.)

This patch removes updateCursor() from wheelEvent(), but adds it to scrollContentsBy().

I did not check anything out with d->visibleItems, as was indicated it graphics/okular!176.

BUG: 421437
2020-10-21 00:40:01 +00:00
l10n daemon script
dc74ffa68c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-10-17 06:04:22 +02:00
l10n daemon script
6abe9fcdfd GIT_SILENT made messages (after extraction) 2020-10-17 02:16:46 +02:00
Albert Astals Cid
f1c9314b24 Make https://kde.org/applications/okular link to proper places 2020-10-16 11:11:56 +02:00
Oliver Sander
da934a0a0a Make cursor open hand again after clicking on internal link
CCBUG: 421437
2020-10-13 18:35:02 +00:00
Nate Graham
c69e8a5b13 Merge branch 'release/20.08' into master 2020-10-13 10:09:36 -06:00
David Hurka
17c266993d Fix scrolling with scrollbar when the slider is not clicked
This fixes scrolling with the scrollbar,
so it is not reset when scrolling on the viewport afterwards.

PageView’s QSroller was not correctly updated by update_scroller,
because it was connected to QAbstractSlider::sliderMoved and sliderReleased,
which are only emitted while the “slider is down”,
i. e. not when the user scrolls the scrollbar other than dragging the slider.
Now update_scroller is connected to actionTriggered(),
which is emitted for all user interactions.

Note that scrolling using the scrollbar calls QAbstractScrollArea::scrollContentsBy(),
and so bypasses smooth scrolling of the QScroller. This could be considered a feature,
otherwise it is more a bug in Qt than in Okular, because we can not ignore scrollContentsBy().

Steps to reproduce:
1. Open a long document
2. Click on the vertical scrollbar below the slider
3. Okular scrolls one page down
4. Scroll in the viewport
5. Okular starts scrolling from the position from step 1.

Test plan:
* Scroll using scrollbar
  + Click on the vertical scrollbar below the slider
  + Middle-click on the vertical scrollbar below the slider
  + Click on the little arrow of the vertical scrollbar
  + Scroll using a scrolling device (e. g. `xdotool click 4`) on the vertical scrollbar
  + Drag the slider of the scrollbar
* “cross-product” verify QScroller state
  + Scroll using a scrolling device on the viewport
  + Scroll using Browse tool dragging
  + Scroll the viewport by clicking a point in the thumbnails view
  + Scroll the viewport using arrow keys and Page Up/Down keys

BUG: 421159
2020-10-12 13:16:34 +02:00
Tobias Deiminger
b5b3bd0ca6 Merge remote-tracking branch 'origin/release/20.08' into master 2020-10-11 13:04:32 +02:00
Tobias Deiminger
c8cf651335 Complete TextSelectorEngine if nothing selected
Selecting highlight tool, pressing left mouse button while over text, and
immediately releasing without dragging a selection caused inconsistent state.

It left TextSelectorEnigne in the state m_creationCompleted == false and
m_lockedItem == something. Then in continuous mode all events kept on being
propagated to TextSelectorEngine::event, even if the user started unrelated
interactions in the meantime. This caused various side effects.

It notably happened when you double clicked a finished highlight annotation,
as described in bug 426658.

We can go to m_creationComplete after release even without a selection,
because TextSelectorEngine::end and PageViewAnnotator::performRouteMouseOrTabletEvent
handle the case just fine, i.e. don't create an annotation but reset the state machine.

Fixes bug 426658 at least partially. I couldn't reproduce the described crash,
so no idea if that's also fixed.

BUG: 446658
2020-10-11 11:58:56 +02:00
Albert Astals Cid
62d7a6938a Remove the ooo plugin
As mentioned on the Akademy meeting, just use the calligra okular plugins if you want to open an odt/odp in Okular
2020-10-07 22:01:22 +00:00
l10n daemon script
844363aa0e GIT_SILENT made messages (after extraction) 2020-10-05 08:26:20 +02:00
l10n daemon script
493e06101e GIT_SILENT made messages (after extraction) 2020-10-05 02:16:10 +02:00
Christoph Feck
6a31bfc7e3 GIT_SILENT Update Appstream for new release
(cherry picked from commit 0abdab924d)
2020-10-03 14:20:24 +02:00
Christoph Feck
0abdab924d GIT_SILENT Update Appstream for new release 2020-10-03 14:20:23 +02:00
Christoph Feck
bef0ae2d82 GIT_SILENT Upgrade release service version to 20.08.2. 2020-10-03 12:49:57 +02:00
Albert Astals Cid
45702f2291 Port deprecated QFontMetrics::width -> horizontalAdvance 2020-09-30 16:09:57 +00:00
Albert Astals Cid
78d983eeed drawRoundRect -> drawRoundedRect 2020-09-30 16:09:57 +00:00
Albert Astals Cid
5eef3e50f5 Port away from IconSize
Using Desktop size didn't make much sense anyway, okular is not a desktop, so use Large size now, which makes a bit more sense
2020-09-30 16:09:56 +00:00
Albert Astals Cid
ddf691fbc9 Port away from deprecated QDesktopWidget::numScreens 2020-09-30 16:09:56 +00:00
Albert Astals Cid
265b85fd6e Remove unneded deprecated KConfigDialogManager::changedMap calls
Both WidgetDrawingTools and WidgetAnnotTools have a NOTIFY changed USER true property so that's what is used anyway
2020-09-30 16:09:56 +00:00
Albert Astals Cid
de78c666ad Port away from deprecated KAboutData::fromPluginMetaData 2020-09-30 16:09:56 +00:00
Albert Astals Cid
8ab379e178 Part away from deprecated QProcess::finished(int) 2020-09-30 16:09:56 +00:00
Albert Astals Cid
e2ece3793e Port use of deprecated QModelIndex::child 2020-09-30 16:09:56 +00:00
Simone Gaiarin
837a9c1f52 Use the term "Annotations" everywhere in place of "Reviews"
BUG: 186797
FIXED-IN: 20.12.0
2020-09-30 08:24:57 +02:00
l10n daemon script
5c0e72d779 GIT_SILENT made messages (after extraction) 2020-09-30 08:18:59 +02:00
l10n daemon script
421f20e669 GIT_SILENT made messages (after extraction) 2020-09-30 02:14:44 +02:00
Nate Graham
d78e2ff9e7 Merge branch 'release/20.08' into master 2020-09-29 09:36:56 -06:00
Kishore Gopalakrishnan
740318df90 Re-add support for pageup/pagedown overlap. 2020-09-29 11:03:48 +05:30
Luigi Toscano
2186324681 Improve the error message when export a certificate
Do not use the exclamation mark as suggested by the HIG
(https://hig.kde.org/style/writing/wording.html), and
reword the whole message as suggested by Albert.
2020-09-26 23:06:31 +02:00
Antoni Bella Pérez
a62666cfad [doc] Applied changes for:
URL changed from http to https
Use more entities
Remove 'latex' entity from header, already included to general.entities
2020-09-25 20:56:10 +02:00
Kezi Olio
bdb2df773d Fix forms when inertially scrolling
`setViewport` automatically adds an item to the history if it finds that it
moved for more than a page, which we don't want to do when automatically
scrolling, as with inertial scrolling.

This commit adds a new function `setViewportWithHistory()` which takes an
argument to optionally avoid preserving history. This avoids breaking ABI.
The new history-less functionality is used when inertially scrolling.

BUG: 421354
FIXED-IN: 1.11.2
2020-09-25 15:41:23 +00:00
l10n daemon script
601e96037c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-25 09:54:54 +02:00
l10n daemon script
21647201c2 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-25 06:16:02 +02:00
Albert Astals Cid
1f187211bc Remove CI workaround 2020-09-24 19:35:36 +02:00
Nate Graham
122528d3fe Add option to disable smooth scrolling
Even though the animated smooth scrolling transitions are now affected
by the global animation speed setting in Plasma, this is not totally
satisfactory for the full pool of people who hate smooth scrolling, as
it does not address the cases of people using Okular outside of Plasma
or people who generally want animations but just not in Okular's
scrolling implementation.

Accordingly, there is now a GUI option to disable smooth scrolling in
Okular's settings window.

BUG: 420755
FIXED-IN: 20.12
2020-09-24 13:43:54 +00:00
Albert Astals Cid
ceb8cf629d poppler: Convert Stamp annotations via C++
Instead of via the magic XML cycle of Poppler::AnnotationUtils::storeAnnotation + Okular::AnnotationUtils::createAnnotation
2020-09-24 07:42:52 +00:00
Albert Astals Cid
d13b18af32 poppler: Convert Caret annotations via C++
Instead of via the magic XML cycle of Poppler::AnnotationUtils::storeAnnotation + Okular::AnnotationUtils::createAnnotation
2020-09-24 07:42:52 +00:00
Albert Astals Cid
bfdd033bfb poppler: Convert Ink annotations via C++
Instead of via the magic XML cycle of Poppler::AnnotationUtils::storeAnnotation + Okular::AnnotationUtils::createAnnotation
2020-09-24 07:42:52 +00:00
Albert Astals Cid
a39708e71d Remove setTextIcon call that we already do at createAnnotationFromPopplerAnnotation 2020-09-24 07:42:52 +00:00
Albert Astals Cid
eed89aaef6 poppler: Convert Highlight annotations via C++
Instead of via the magic XML cycle of Poppler::AnnotationUtils::storeAnnotation + Okular::AnnotationUtils::createAnnotation
2020-09-24 07:42:52 +00:00
Albert Astals Cid
f533788637 poppler: Convert Geom annotations via C++
Instead of via the magic XML cycle of Poppler::AnnotationUtils::storeAnnotation + Okular::AnnotationUtils::createAnnotation
2020-09-24 07:42:51 +00:00
Rafael Sadowski
49c680fd0e Fix RTTI with clang
Clang's RTTI support don't work here, use qobject_cast<> to avoid
runtime crashes.
2020-09-23 18:43:43 +02:00
Albert Astals Cid
aabff9dbee Merge remote-tracking branch 'origin/release/20.08' into master 2020-09-22 09:08:53 +02:00
Albert Astals Cid
3f89246317 Show "Follow link" if right clicking over link and annotation
Unite handling of right click in mouse release event

Before we had handling on press -> show annot menu if annot
and in release -> show link menu if link or show the genericmenu if nothing

Now we do everything on release and do
show link and annot menu if both
show link menu if link
show annot menu if annot
show generic menu if nothing

It helps with the fact that you can't click on links if there's an
annotation on top, which is a bit of a pain but it makes sense since
annotations usually have more interaction than links, you can select,
move, etc. them

BUGS: 425291
2020-09-22 01:30:40 +02:00