Commit graph

67 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
Albert Astals Cid 818e1445f7 CI: reenable clazy warning now that it has cmake 3.24.1 2022-08-19 13:53:36 +02:00
Albert Astals Cid 4c25d516b4 CI: Disable no-copyable-polymorphic while cmake 3.24.0 generates broken code
https://gitlab.kitware.com/cmake/cmake/-/issues/23823
2022-08-09 23:39:39 +02:00
Albert Astals Cid 4ae3762ab8 CI: workaround cmake 3.24.0 issues
https://gitlab.kitware.com/cmake/cmake/-/issues/23823
2022-08-05 21:29:43 +00:00
Albert Astals Cid 0a571b84df clang-tidy-14 2022-08-02 23:09:05 +02:00
Nicolás Alvarez 0553e93121 CI: Tag custom Ubuntu and Clazy jobs as 'Linux'
This makes them run on the faster CI servers that normally run linux.yml.
There are also 3 servers so this brings better parallelism.

Not all custom jobs are suitable to run there, but these in particular
should be fine.
2022-04-09 14:56:47 -03:00
Albert Astals Cid 98fbeefcfe CI: Add Windows
GIT_SILENT
2022-04-08 11:10:05 +02:00
Albert Astals Cid 9d3842c796 Move to clang-format 13 2022-03-10 00:23:22 +01: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 b38b2dfe52 Merge remote-tracking branch 'origin/release/21.12' 2022-01-03 21:54:22 +01:00
Albert Astals Cid 46bc21bfd9 CI: Debian has removed clazy from testing, use the one in unstable for now
Disable a few new warnings in clang-tidy

bugprone-implicit-widening-of-multiplication-result and
bugprone-easily-swappable-parameters seem like would be nice to fix, but
no time now
2022-01-03 17:03:46 +01: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 a157ded61d Use "new" freebsd/Linux CI templates 2021-11-28 11:49:12 +01:00
Albert Astals Cid f9ca87c8a1 CI: add the deb-src of testing since we're based on testing not unstable 2021-10-13 00:23:49 +02:00
Albert Astals Cid 4880e609af CI: Switch to new clang-format 2021-01-10 00:51:48 +01: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
Albert Astals Cid 1f187211bc Remove CI workaround 2020-09-24 19:35:36 +02:00
Albert Astals Cid 56a23a803f CI: fix build_clazy_clang_tidy 2020-09-17 01:27:42 +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 92e7c78f56 Check clang-format at CI stage 2020-07-11 09:17:35 +02:00
Albert Astals Cid a0d6a377cb CI: Remove python-yaml 2020-05-23 20:07:30 +02:00
Albert Astals Cid e2335e965a CI: Use debian testing while unstable is broken 2020-03-26 22:28:00 +01:00
Albert Astals Cid f431ef6dcc CI: tell debian derivatives not to ask us question in apt time 2020-03-26 22:27:57 +01:00
Simone Gaiarin 341875b342 Make clang-tidy in CI use the .clang-tidy config file 2020-02-29 09:26:34 +01:00
Albert Astals Cid 3720833be4 Enable clazy qstring-allocations 2020-02-21 17:45:03 +01:00
Albert Astals Cid 07a1f616c0 Enable clazy qproperty-type-mismatch 2020-02-21 17:09:46 +01:00
Albert Astals Cid 9a32bd354d Enable clazy raw-environment-function 2020-02-21 17:09:46 +01:00
Albert Astals Cid dcf8f79481 Enable clazy isempty-vs-count and qhash-with-char-pointer-key 2020-02-21 17:09:46 +01:00
Albert Astals Cid 46d1ba0e20 Enable clazy missing-qobject-macro 2020-02-21 17:09:46 +01:00
Albert Astals Cid 6d0d61c2ad Enable clazy copyable-polymorphic 2020-02-21 17:09:43 +01:00
Albert Astals Cid 93540ac16d Enable most of clazy level2 2020-02-21 14:57:48 +01:00
Albert Astals Cid 968e9d6073 Enable clazy old-style-connect 2020-02-20 15:48:08 +01:00
Albert Astals Cid a9598e83e8 Enable all of clazy level1 2020-02-20 13:35:35 +01:00
Albert Astals Cid c10faf0926 Enable clazy qproperty-without-notify 2020-02-20 12:53:28 +01:00
Albert Astals Cid edb44b1fd3 Enable clazy connect-3arg-lambda 2020-02-20 12:42:34 +01:00
Albert Astals Cid 91bce4a0a3 Enable clazy const-signal-or-slot 2020-02-20 12:42:23 +01:00
Albert Astals Cid e03943fae9 Enable clazy qstring-lef 2020-02-20 12:03:31 +01:00
Albert Astals Cid 93de247795 Enable all of clazy level0 2020-02-20 11:34:47 +01:00
Albert Astals Cid f85deae680 Enable clazy container-anti-pattern
Yes, this is a bit of cheating, but there's really no nicer way of doing
this and memory/speed here is not really important so we can trick clazy
2020-02-20 11:22:57 +01:00
Albert Astals Cid 3ca05fc1f8 Enable clazy qstring-insensitive-allocation 2020-02-20 11:15:15 +01:00
Albert Astals Cid beb195c9e6 Enable clazy qcolor-from-literal 2020-02-20 11:12:00 +01:00
Albert Astals Cid 8e35b43a3d Enable clazy unused-non-trivial-variable 2020-02-20 11:08:04 +01:00
Albert Astals Cid 0a60ab54c4 Enable clazy qstring-ref 2020-02-20 11:01:58 +01:00
Albert Astals Cid 95e19450c9 Enable clazy fully-qualified-moc-types 2020-02-20 10:59:54 +01:00
Albert Astals Cid 3b4dd35c9f Enable clazy lambda-in-connect 2020-02-20 10:57:47 +01:00
Albert Astals Cid eddbe03128 enable clazy strict-iterators 2020-02-20 10:15:24 +01:00
Albert Astals Cid e54609b596 CI: rename to show we're also running clazy 2020-02-19 23:44:41 +01:00
Albert Astals Cid 468f4b64c2 CI: Enable clazy inefficient-qlist-soft 2020-02-19 23:44:41 +01:00
Albert Astals Cid e2a1705703 CI: Enable clazy connect-not-normalized 2020-02-19 23:44:41 +01:00