Commit Graph

419 Commits

Author SHA1 Message Date
Nicolas Fella
80afe26873 Implement event.change
This represents the newly entered data for each keystroke. This is often a single added character, but for cases like pasting text it can be more complex.

The PDF API reference doesn't specify any algorithm to use.

The algorithm used here works by iterating through both strings from the start until the first different character is encountered. Then the rest of the new text is considered the difference.

This doesn't produce the theoretically optimal/minimal diff, but seems to work well enough for practical application.

When text is removed the diff is empty
2022-09-13 21:51:15 +00:00
Nicolas Fella
986c2e6db5 Don't use KActivities on macOS
Activities are a Plasma concept, they don't make sense on macOS
2022-08-24 16:49:33 +02:00
Albert Astals Cid
cb3fefb22c GIT_SILENT Upgrade release service version to 22.11.70. 2022-07-12 23:48:30 +02:00
Albert Astals Cid
26bb7b6a03 Add ki18n_install and kdoctools_install 2022-05-22 12:00:39 +02:00
Albert Astals Cid
913d437822 Make all optional dependencies REQUIRED by default
You can opt-out using the FORCE_NOT_REQUIRED_DEPENDENCIES option

We want people to always build as much of the optional dependencies as
possible, so force them to spell out what they don't want

And except on Android because two reasons:
 * The gitlab CI doesn't have some dependencies we actually have available
 * Some dependencies are not really available
2022-05-03 22:39:36 +00:00
Albert Astals Cid
0d40301d50 Add a few definitions that will come with ECM 5.85
Better enforce them now, so that the work to port doesn't increase over
time

Not a super fan of this for regular applications, but oh well the ship
has sailed
2022-04-07 23:02:12 +00:00
Nicolas Fella
9eb404c337 Don't find ktextwidgets for mobile
It's only used for the KPart
2022-04-05 22:43:58 +00:00
Albert Astals Cid
ce8401e917 Don't require KF5::IconThemes for Mobile
It just gives us a 48px = Large, so not worth to have that extra dependency for
that in my opinion
2022-03-29 12:56:04 +00:00
Albert Astals Cid
d8f0baa2b9 KCrash is only used on the desktop 2022-03-28 23:18:27 +02:00
Albert Astals Cid
5944ce059f Android: improve a bit the "androiddeployqt is not smart and needs help" code
We do that by:
 * Remembering all the generators we're building
 * Linking the dependencies of all those generators against the app

For that to work we do three things:
 * Move the creation of the app target to after the generator targets
   have been created
 * Have a global variable that lists all the created generators
 * Move the find_package of the generator dependencies to the top level
   so it can be used from the mobile app target
2022-03-28 20:25:04 +00:00
Albert Astals Cid
36ee0a1aa7 Add DQT_NO_KEYWORDS
A future ECM is going to force it on us, so add it now
2022-03-19 10:58:47 +00:00
Albert Astals Cid
ad6426be52 GIT_SILENT Upgrade release service version to 22.07.70. 2022-03-12 13:03:14 +01: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
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
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
Carl Schwan
c9e09be0a9 Improve mobile drawer
Before:

![image](/uploads/cd0af949c3929eae5fbe68c6916e565b/image.png)

![image](/uploads/e121ddfc21aa6fb01e81f80cde7270d8/image.png)

After:

![image](/uploads/93ef9afc24d1712a20fa64bd06ad09fb/image.png)

![image](/uploads/721cca28cce0a9ab2e409774070a439b/image.png)

@mart
2022-01-19 22:33:21 +00:00
Albert Astals Cid
8681bc0223 Okular Mobile: Require Qt 5.15.2
Removes the smooth property of PageItem since it was never set and clazy
was complaining about it not having a NOTIFY signal

Remove two signals that already exist in parent class

Fix C++11 detach in range-loop
2021-12-28 09:06:01 +00:00
Albert Astals Cid
3792d8d560 Tweak default UI
It's desktop unless you're building for Android where the default it's
mobile.

You can still manually specify which UI you want and you'll get that
regardless of the platform

Only require KParts if we're building the desktop UI

Two small changes in CI:
 * Stop pretending we have a macOS CI
 * Add Android CI
    - libkexiv2, khtml and kjs would be nice but we don't have Android builds
      yet
2021-12-17 22:03:35 +00:00
Albert Astals Cid
29911062e3 Merge remote-tracking branch 'origin/release/21.12' 2021-11-21 23:12:31 +01:00
Albert Astals Cid
2de5c96e52 okularcore doesn't need dbus 2021-11-21 17:50:40 +00:00
Heiko Becker
86cdd29a86 GIT_SILENT Upgrade release service version to 22.03.70. 2021-11-08 20:40:45 +01:00
Heiko Becker
33fa8b542d GIT_SILENT Upgrade release service version to 21.11.80. 2021-11-08 20:03:08 +01:00
Mahmoud Khalil
8b3dfcb3f4 PDF: Add Stamps to the file properly
By using Poppler 20.10 new custom image stamps APIs

Instead of the incompatible hack we used before that only worked for Okular.

This is done by modifying the update function used by PopplerAnnotationProxy in order to load the image in
the correct dimensions and send it to the poppler-Qt5 frontend.

We temporarily store the stamp annotation appearance when deleting it so that we can set it again when doing an undo undo.
2021-10-01 16:04:50 +00:00
Volker Krause
2a7e4416b5 Don't require D-Bus on Android
Also, actually fully disable the build of okularpart, which isn't needed
on Android.

With this Okular can be built for Android without the D-Bus stub, at least
once KIO doesn't pull in D-Bus anymore.
2021-08-20 18:46:50 +00:00
Simone Gaiarin
8837a1138f Add quick annotation minibar action
BUG: 425438
BUG: 425598

Fix #20
2021-08-13 21:28:39 +00:00
Albert Astals Cid
7876ccac65 GIT_SILENT Upgrade release service version to 21.11.70. 2021-07-10 20:05:41 +02:00
David Hurka
195bbe3636 Create color mode menu.
Implemented using a ColorModeMenu class,
derived from ToggleActionMenu (derived from KActionMenu),
as a child object of PageView.

* KToggleAction for every color mode, allows to set shortcuts for every mode.
  Color mode actions have icons.
* KToggleAction for normal colors mode.
* ToggleActionMenu containing all color mode actions.
  If triggered, toggles color mode between normal colors and last change colors mode.

"Toggle Change Colors" is replaced by "Change Colors", which is actually a toggle action.

BUG: 407217
BUG: 437755
2021-05-29 23:08:56 +00:00
Nicolas Fella
c4e33d0e79 Make dependency on KI18n and KTextWidgets explicit
They are already pulled in by KParts, but we better not rely on that
2021-04-26 13:49:43 +02:00
David Hurka
67325270ec Fix viewport jumps when drag-scrolling beyond screen edges
This creates CursorWrapHelper, which wraps the cursor
from e. g. top screen edge to bottom screen edge,
and calculates the drag offset from the actual cursor movement.
2021-03-25 12:22:19 +00:00
Albert Astals Cid
889e744f91 GIT_SILENT Upgrade release service version to 21.07.70. 2021-03-13 22:06:29 +01:00
David Hurka
134cbc30d5 Port config dialogs from .ui to QFormLayout
* C++ instead of .ui files.
* Put every control in a QFormLayout row.
* Where possible, use only a single layout, i. e. no nesting.
* Use rows with an empty QLabel as horizontal spacer.
  Content grouping by whitespace instead of group boxes.
* Where group boxes were used for labeling tool managers,
  use a <h3> QLabel instead.
* Where group boxes were used for labeling control groups,
  drop the label or label only the first control (like in Dolphin).
* Use combo boxes instead of radio button groups.
  (I don’t know how to connect radio buttons to KConfigWidgets...)
* Don’t use checkboxes as label, that doesn’t lay out correctly.
  Instead, put the checkbox in an own row, although it controls the same feature.

Some of the changes are not perfect yet, so I opened
https://invent.kde.org/graphics/okular/-/issues/45 to outline further improvements.
2021-01-01 01:09:10 +00:00
Thorsten Behrens
f7d6045b92 Add poppler NSS support
Move certificate config down into generator code
Read available signing certificates from poppler NSS
2020-12-13 21:31:14 +00:00
Katarina Behrens
242710cae7 Recycle WidgetConfigurationToolsBase for certificate management dlg 2020-12-13 21:31:14 +00:00
Katarina Behrens
69ddb957f1 Add config page to configure signing identities/certificates 2020-12-13 21:31:14 +00:00
Albert Astals Cid
3cc7bdd1d7 cmake: Modern way to link to zlib 2020-12-02 18:57:49 +01:00
David Hurka
a83261db92 Merge branch 'release/20.12' into master 2020-11-18 20:35:53 +01:00
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
becdc7c483 Revert the two last commits
f9841b0f8a and e0f45add55

They break the windows build, which shows there's something defenitely
fishy going on with the current code, but oh well, someone with more
time needs to figure out a proper solution
2020-11-11 01:31:47 +01:00
Albert Astals Cid
e0f45add55 Enable -Wweak-vtables in clang
Read https://stackoverflow.com/a/23749273/11956287 for a full
explanation, but basically this is important for headers like the
interfaces/ and kdocumentviewer.h that are supposed to be used by third
partyies where it may happen that wrong things happen because the whole
class is inline in a header

For the classes that are defined in the .cpp or are not installed
headers this would not be necessary but it's not so hard to add a few
default defined destructors, so do that :)
2020-11-08 21:21:06 +00:00
Albert Astals Cid
f44eceba76 GIT_SILENT Upgrade release service version to 21.03.70. 2020-11-08 18:40:16 +01:00
Albert Astals Cid
1327fdd830 GIT_SILENT Upgrade release service version to 20.11.80. 2020-11-08 17:53:23 +01:00
Simone Gaiarin
580cbce837 Selectively reparse builtin and quick annotation tool configuration 2020-10-28 05:32:07 +00:00
Laurent Montel
f7cc59b7dc Drop outdated QT_USE_FAST_OPERATOR_PLUS 2020-09-17 07:14:54 +02:00
Friedrich W. H. Kossebau
37bf29d57d Use ecm_setup_qtplugin_macro_names
Avoids all the explicit boilerplate needed, ensures the dependency on
the JSON file ia also set and allows simple export of the setup
in the installed CMake config file, so other projects importing
the config file have the respective CMake macros set as recommended.

Test Plan:
Still builds as before. Touch a plugin metadata JSON file now triggers a moc
rerun. CMake config file contains setup of variables.
2020-09-13 11:20:50 +02:00
Albert Astals Cid
c17127b018 cmake: suggest-override is provided by ECM since 5.55 2020-09-13 01:04:16 +02:00
Albert Astals Cid
e989200dcf Increase minimum supported versions to those provided by Ubuntu 20.04 2020-09-13 01:03:53 +02:00
Albert Astals Cid
d5210db504 Change the version to be date based
As discussed on the Akademy meeting, it's just simpler to do this than
keep pretending 1.10 vs 1.9 have some kind of meaning :)
2020-09-11 16:27:26 +00:00
Albert Astals Cid
2697105462 Revert cbddcd3273
KJS and KWallet are indeed optional, that's what the ${optionalComponents} variable does
2020-09-09 14:13:09 +02:00
Albert Astals Cid
cbddcd3273 kwallet and kjs are mandatory in cmake anyway, remove ifdefs 2020-09-05 23:50:45 +00:00
Albert Astals Cid
ee2ef4b0f2 Merge remote-tracking branch 'origin/release/20.08' 2020-07-13 01:16:38 +02:00