Commit graph

9066 commits

Author SHA1 Message Date
David Hurka 19d5dd8ec7 New part/ directory for okularpart sources from /, ui/, conf/
Source files are no longer separated by UI and non-UI and similar,
but only by their build target.

* ui/ -> part/
* Move all source files from conf/ to part/
* Keep config skeleton definitions in conf/, needed for the mobile target too
* Move editdrawingtooldialogtest.h from conf/autotests/ to autotests/
* ui/data/icons/ -> icons/
* Move /part.cpp, /part.rc and similar files to part/
* Adapt include paths in source files
* Adapt CMakeLists.txt files (in / and in subdirectories)
* Adapt /Messages.sh
2020-11-18 19:32:56 +00:00
Albert Astals Cid 1327fdd830 GIT_SILENT Upgrade release service version to 20.11.80. 2020-11-08 17:53:23 +01:00
David Hurka 055d5709c1 Merge branch 'release/20.08' into master 2020-11-08 02:05:10 +01:00
Kezi Olio 585340cef5 Fix back/forward navigation after clicking on a link
The condition was incorrect; we were ignoring history when not in the
middle of scrolling when we wanted to do the reverse.

BUG: 414701
FIXED-IN: 20.12
2020-11-02 19:58:08 -07:00
Nicolas Alvarez d23422d04a gitlab-ci: use eatmydata in apt-get
apt-get uses several fsync() calls on each package it installs, and that's
very slow, especially on non-SSD. eatmydata turns fsync into no-op, which
makes package installation much faster (it can cause corruption if there's
power loss or similar, but that doesn't matter in CI where we throw away
the whole container anyway).

Currently the build_ubuntu_20_04 job in GitLab CI takes 8-9 minutes to
install dependencies. Using eatmydata it went down to 2 minutes.
2020-11-01 13:46:14 -03:00
David Hurka 08c4d4f712 Do not disable flick if cursor has been wrapped
BUG: 420556
FIXED-IN: 1.11.3
2020-11-01 12:05:31 +00:00
Christoph Feck 02c3bd691a GIT_SILENT Update Appstream for new release 2020-10-31 18:08:36 +01:00
Christoph Feck 0d416fb48e GIT_SILENT Upgrade release service version to 20.08.3. 2020-10-31 17:31:50 +01:00
Albert Astals Cid eb548b006d Fix 3 small memory leaks 2020-10-29 07:49:47 +00:00
Albert Astals Cid 681f405390 Merge remote-tracking branch 'origin/release/20.08' 2020-10-29 00:47:39 +01:00
Albert Astals Cid 82590da11a Fix wrong memory access that may cause crash
When editing the quick annotations
2020-10-28 19:35:33 +01:00
Simone Gaiarin 5c3b67cad1 Save builtin and quick annotation tools separately
This should reduce the number of configuration reparses
2020-10-28 05:32:07 +00:00
Simone Gaiarin 580cbce837 Selectively reparse builtin and quick annotation tool configuration 2020-10-28 05:32:07 +00:00
Albert Astals Cid 91dbaa1f5b Set focus to the next current tab when closing the current tab
And by that it means giving the focus to the pageview which is most of
the fimes what we want. One could argue that if i had the focus on the
searchbar we should restore the focus there, but that makes not much
sense to me, since each tab is it's own world, at most one could say,
let's remember where the focus was in that tab the last time it was
focused and restore it there, but it seems a bit convoluted.

To be able of setting the focus to the pageview from the shell we need
to set up some focus proxies, so that part->widget (which is the sidebar)
ends up giving the focus to the pageview, which is what makes sense if
someone says "you part, set yourself the focus"

BUGS: 428257
2020-10-27 23:37:54 +01:00
Albert Astals Cid a66a18b82b Merge remote-tracking branch 'origin/release/20.08' 2020-10-27 12:47:14 +01:00
Albert Astals Cid 924a5fb9fc Fix middle click on sidebar tab bar unloads the document.
Filter the exact widget we care about for middle mouse buttons

BUGS: 426613
2020-10-27 00:36:12 +01:00
Nate Graham bd089ce093 Merge branch 'release/20.08' into master 2020-10-25 10:50:08 -06:00
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