Commit Graph

9659 Commits

Author SHA1 Message Date
Albert Astals Cid
a2e1043149 slots -> Q_SLOTS
A future ECM update is going to force that on us, so do it now anyway
2022-03-19 10:58:47 +00:00
Albert Astals Cid
ba35bbd9e6 emit -> Q_EMIT
A future ECM is going to force that on us, so do it early
2022-03-19 10:58:47 +00:00
Albert Astals Cid
0a0687be99 Merge remote-tracking branch 'origin/release/22.04' 2022-03-18 23:06:20 +01:00
Albert Astals Cid
ad6426be52 GIT_SILENT Upgrade release service version to 22.07.70. 2022-03-12 13:03:14 +01:00
Albert Astals Cid
ec1ed42dca Make clang-format happier 2022-03-12 10:59:53 +01:00
Thiago Simão
af91d33070 Create empty inline note and then open dialog to get user's input. 2022-03-12 00:57:36 +01:00
Jonathan Marten
1489c9aacb Fix clang-format brace layout introduced in adc7a758 2022-03-11 10:06:13 +00:00
Jonathan Marten
adc7a75803 Fix a missing brace if HAVE_SPEECH is not defined
Possibly introduced by commit 50d0703a.

part/pageview.cpp: In member function 'virtual void PageView::mouseReleaseEvent(QMouseEvent*)':
part/pageview.cpp:3077: error: expected '}' before 'else'
part/pageview.cpp:3069: note: to match this '{'
2022-03-11 09:49:26 +00:00
Nicolas Fella
bd838008a3 Add windows installer to appstream artifacts
This way it gets listed on apps.kde.org
2022-03-10 14:43:05 +01:00
Albert Astals Cid
df68aa0112 Remove extra bunch of {} added by clang-tidy ^_^ 2022-03-10 12:07:06 +01:00
Albert Astals Cid
9d3842c796 Move to clang-format 13 2022-03-10 00:23:22 +01:00
Albert Astals Cid
46d132a21d Add the readability-braces-around-statements hash to .git-blame-ignore-revs 2022-03-10 00:09:09 +01:00
snooxx 💤
2ad9e6f0b3
Simplify QPainter::drawRoundedRect usage
After fixing the porting mistake done in 78d983ee, `drawRoundedRect` can
be further simplified to not use any relative sizes anymore.

We can also assume that the code in `dviRenderer::epsf_special` was
supposed to use a constant corner radius and therefore was wrong
initially. By dropping `Qt::RelativeSize` the code might become closer
to its originally intended behavior.

Test Plan:
  - No change in behavior for rounded corners of "Welcome" popup message
    and "No Annotations" message in sidebar.
  - Could not test DVI code path.
2022-03-09 22:38:55 +00:00
Volker Krause
50d0703ae0 Enable readability-braces-around-statements 2022-03-09 23:29:56 +01:00
snooxx 💤
1d30b03e39
Bring corner radius of popup messages in line with widget style
In 0070baaf `PageViewMessage` to display on-canvas notifications was
introduced, featuring rounded corners. Over the years, overall
preferences in the industry regarding the corner radius have changed
multiple times, with recent efforts trying to ensure a more consistent
usage in the entire UI of KDE's products.

Let's use a corner radius better matching the radius commonly used in
the current widget style, i.e. a bit less rounded, to make the message
fit in better with surrounding buttons and frames. Note that this is not
specific to Breeze, since most widget styles nowadays use a similar
corner radius. The radius is compatible with `KTextEditor::Message` too,
which is used in a similar context.

Test Plan:
  - Start Okular: The "Welcome" message and the "Document Loaded"
    message have a more professional look to them.
  - Open the annotations sidebar: The "No Annotations" message better
    fits in with the sidebar's frame.
2022-03-08 16:38:19 +00:00
Volker Krause
f28764e59c Attempt to fix the MSVC build 2022-03-08 14:22:43 +01:00
Jiří Wolker
f24aa63a97 Create welcome screen
This screen is similar to the one in Ark, but also shows you a list of
recently-opened documents.
2022-03-08 04:24:45 +00:00
Andreas Naumann
293337d994 Set QT_PLUGIN_PATH
The MR
  1. adds a note, that the tests in the build tree depend on the install tree.
  2. extends the QT_PLUGIN_PATH with KDE_INSTALL_FULL_QTPLUGINDIR in cmake before creating the tests. That removes the need to source prefix.sh before calling cmake.
2022-03-07 23:09:02 +00:00
Nicolas Fella
d1ecad897c Implement keystroke commit events
When a form field loses focus a special keystroke event with
willCommit=true is sent.

This is based on work by Joao Netto <joaonetto901@gmail.com>
2022-03-07 22:14:26 +00:00
snooxx 💤
667e73325a
Restore properly rounded corners of popup messages
78d983ee led to some rounded corners in the UI not being perfectly
circular anymore: Popup messages would stretch the rounding depending on
message length, and the rounded corner of the message in the annotation
bar would get distorted while changing the sidebar's width.

That commit tried to fix the following `warning: ‘void
QPainter::drawRoundRect(int, int, int, int, int, int)’ is deprecated:
Use drawRoundedRect(..., Qt::RelativeSize)` by changing to
`drawRoundedRect`, but missed to also add `Qt::RelativeSize`.

Adding the missing flag fixes both issues. The change is also
implemented in `dviRenderer::epsf_special` (introduced in be544056,
changed in 55dc43bf) for correctness.

Test Plan:
  - Start Okular. The "Welcome" message and the "Document Loaded"
    message have perfectly rounded corners again, not depending
    on message length.
  - Change width of the annotations sidebar: The "No Annotations"
    message does not change its rounded corners anymore.
  - Running in HiDPI mode retains the correct behavior.
  - Note: There does not seem to be a trivial/convenient way to trigger
    the DVI code path.
2022-03-07 14:01:53 +00:00
Albert Astals Cid
541b045021 GIT_SILENT Upgrade release service version to 22.03.80. 2022-03-12 12:25:50 +01:00
Albert Astals Cid
1aa175cf3f Support SaveAs action
If a new enough (unreleases as of now) poppler is available

BUGS: 451010
2022-03-06 19:16:27 +00:00
Nicolas Fella
1d64fea660 Port away from KToolInvokation 2022-03-03 21:54:28 +01:00
Nicolas Fella
5e8beb532a Set correct textfield value on keystroke
event.value is the old value, we need to set the new value here

Modifying event.value is not supported when not committing
2022-03-02 23:20:14 +01:00
Albert Astals Cid
2c2acbb8e0 Increase Okular5Core soversion for the 22.04 release
We have changed lots of ABI things since 21.12
2022-03-01 16:21:29 +01:00
snooxx 💤
0ce3887a3c Add missing clang-format commit to .git-blame-ignore-revs
After 19d98d6a reformatted Okular's codebase with `clang-format`, that
commit was marked to be ignored by `git blame` by adding it to
`.git-blame-ignore-revs` in 4fb45522.

Later, !296 was merged but still needed reformatting, which was done in
b09e23f6. However, the latter commit was still missing from
`.git-blame-ignore-revs`, so let's add it.

Test Plan:
All commits mentioning `clang-format` which reformatted the codebase are
now included in `.git-blame-ignore-revs`.
2022-02-27 18:14:45 +00:00
Heiko Becker
fe5847155c GIT_SILENT Update Appstream for new release
(cherry picked from commit b2d872c79f)
2022-02-27 19:11:13 +01:00
Albert Astals Cid
27c8919a42 Merge remote-tracking branch 'origin/release/21.12' 2022-02-27 12:09:58 +01:00
l10n daemon script
dcebd0756e GIT_SILENT made messages (after extraction) 2022-02-27 00:43:22 +00:00
Nicolas Fella
fd1c312d57 Fix keystroke events
event.value is the value before editing, not after
2022-02-24 23:39:28 +00:00
Nicolas Fella
03d83eb22d Don't create keystroke event when cursor moves
Currently we send a keystroke when the cursor moves but the text doesn't change.

Acrobat doesn't do it so let's do the same
2022-02-24 22:12:13 +01:00
Nicolas Fella
6c8cafbb1c Simplify keystroke event handling
Make it more similar to how we handle the format event.

We pass the new value to processKeystrokeAction, that calls the script
and sets the new value for the form object according to the result. If
needed the widget is refreshed to reflect the new text
2022-02-24 16:10:22 +01:00
Nicolas Fella
ae8251a145 Don't clear focus when setting formwidget visible
Otherwise setVisibility(true) removes the focus
2022-02-24 15:36:43 +01:00
Albert Astals Cid
f234bdf494 Put the Android extra linking cmake code behind a variable
The env variable check doesn't work on binary-factory for some reason so
use an actual variable that will be given by Craft
2022-02-24 14:12:34 +01:00
Albert Astals Cid
d6b1524987 Android: More tweaks to make sure plugins are shipped 2022-02-23 17:43:02 +01:00
Huu-Tinh Pham
57829d1d81 added fallback icon for thumbnail sync context menu
The sync icon was missing when using the Breeze Icon pack.
Now a sync icon and a refresh icon is used for this thumbnail sync action.
2022-02-23 15:31:12 +00:00
snooxx 💤
9432565ede Fix broken page MiniBar
The `MiniBar` normally used to display page numbers and to provide
navigation buttons regressed since 01557c16c4 to only show an empty
non-functional button called "Page Number", along with multiple
warnings:
`QObject::connect(MiniBar, QAction): invalid nullptr parameter`

This is caused by moving `setupViewerActions()` to a place where
`m_miniBar` is not initialized yet, even though it has a runtime
`connect`-dependency on it.

By moving `setupViewerActions()` back, the `MiniBar` starts working
again. Now the `m_addBookmark` action, which is created in that
function, is not available anymore to be passed to the constructor of
`BookmarkList`. To avoid moving the setup of the latter away from the
rest of the sidebar code, only assigning the action to the bookmark
button contained in the `BookmarkList` is deferred to
`setupViewerActions()`.

As requested, any accidental future `nullptr`-access will be handled by
crashing, even in Release builds, by omitting any checks.

BUG: 450347

Test Plan:

Page numbers show up again in toolbar, no more `connect` warnings.
2022-02-22 23:16:34 +00:00
Albert Astals Cid
818b714252 Fix wrong default font string for annotation tools 2022-02-22 14:38:44 +01:00
Albert Astals Cid
0197a78fb5 Part::queryClose: Don't ask the user if he wants to save file types we can't save
BUGS: 449976
2022-02-22 13:20:37 +00:00
Yuri Chornoivan
a2cb0c3844 Add TTS voice selection option to the docs 2022-02-20 21:23:52 +02:00
Yuri Chornoivan
8ea9f482ce Add editor-cmd option to the docs 2022-02-19 23:08:02 +02:00
Andreas Naumann
147a638619 Adds option editor-cmd to the commandline
Adds the option "editor-cmd" for the [feature request](https://bugs.kde.org/show_bug.cgi?id=263732) .

BUG: 263732
2022-02-18 13:33:28 +00:00
Huu-Tinh Pham
a3fde02232 Onetime sync thumbnail
Added context menu entry to quick sync thumbnails with the current page. This is handy in case the user is not using "Link the thumbnails with the page" and wants quick sync thumbnails without changing settings or search for the page in the thumbnails view.

Before
![image](/uploads/389216ce4720f1891ddc4f2bf8ee14ea/image.png)

After
![image](/uploads/b4804d11992695d3a6be6642c9d7ac16/image.png)
2022-02-18 12:12:41 +00:00
Albert Astals Cid
4cd6bfd30e mobile: Add Signature Viewing UI
Move a few files from part/ to gui/ since they are also used by the
mobile/ frontend
2022-02-18 08:32:13 +00:00
Yuri Chornoivan
28e362b6a1 Simplify the string for the 'Search for...' action
BUG: 450334
2022-02-17 15:09:42 +02:00
Jeremy Whiting
1be2290358 Allow user to select tts voice in addition to engine.
To make tts more user friendly allow user to select which
voice is used for tts playback.
2022-02-14 08:20:14 -07:00
l10n daemon script
b461c459d1 GIT_SILENT made messages (after extraction) 2022-02-14 02:08:21 +00:00
l10n daemon script
3102761c51 GIT_SILENT made messages (after extraction) 2022-02-14 00:42:06 +00:00
l10n daemon script
b7eb345562 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"
2022-02-11 02:51:27 +00:00
l10n daemon script
848e344301 GIT_SILENT made messages (after extraction) 2022-02-11 02:11:44 +00:00