Commit Graph

88 Commits

Author SHA1 Message Date
Volker Krause
8bc7d0acd6 Port away from Qt5Compat.GraphicalEffects 2024-04-07 21:51:54 +00:00
Sune Vuorela
dc88b5873a Don't put slashes in plugin prefix
It complicates stuff further down the line and we don't gain much for
it, so work with the rest of the stack rather than work around it.

One of the complications is that if bindir contains both plugins and executable, we will have okular and okular/ in the same folder and that doesn't really work.
2024-01-09 14:12:45 +00:00
Sune Vuorela
611dea4c0d Remove deprecated functions. Porting is needed anyways 2023-12-22 23:25:44 +00:00
Sune Vuorela
792425fc77 s/qAsConst/std::as_const/
We now definitely has std::as_const available and Qt has started nagging
about converting to std::as_const.

Implementation is the same for both functions, and qAsConst was a
stop-gap measure until std::as_const was sufficiently available.
2023-12-19 11:46:24 +00:00
Sune Vuorela
fee0380fab Blind port android. Thanks Volker 2023-12-18 22:56:22 +00:00
Carl Schwan
59289e7c3e Adapt QML code for qt6 2023-12-18 22:56:22 +00:00
Carl Schwan
e10950fa28 Make mobile components compile with qt6 2023-12-18 22:56:22 +00:00
Nicolas Fella
c29f0fec54 Switch to kf6 2023-12-18 22:56:22 +00:00
Sune Vuorela
f3be4f1cd3 Hardcode Qt6 2023-12-18 22:56:22 +00:00
Nicolas Fella
b1c904bda3 Don't hardcode Qt5
Prepares for using Qt6
2023-12-18 22:56:22 +00:00
Volker Krause
a1454ca4e4 Pass Android content: URLs fully encoded to Android API
This fixes opening files e.g. with a space anywhere in their name or path.

content: URLs we get from the file dialog need to get back into Android
API (via QFile or otherwise) as exactly the same string, any kind of
changes e.g. to the URL encoding are not considered to be the same file,
and thus a file we have no permission to access.
2023-06-25 22:58:57 +00:00
Friedrich W. H. Kossebau
88590c197c Include only needed headers instead of QtQml module header
GIT_SILENT
2023-06-07 22:41:22 +00:00
Volker Krause
da6549b1df Port tests away from QQC1
Also, make those tests actually work again.
2022-08-05 16:12:02 +02:00
Albert Astals Cid
63d7839129 Mobile: Ask for password if the document needs one 2022-08-02 21:29:05 +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
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
Volker Krause
50d0703ae0 Enable readability-braces-around-statements 2022-03-09 23:29:56 +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
Albert Astals Cid
a9c7834a4f mobile: Update imports to the minimum required versions on the cmake side 2022-01-26 14:26:47 +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
1dc81340bc okularkirigami: Show document error/warning/notice 2021-09-09 18:06:51 +02:00
Albert Astals Cid
0c659a5466 clang-tidy: Enable google-explicit-constructor 2021-08-29 08:52:35 +00:00
Alexander Lohnau
2f193a63de Convert license headers to SPDX 2021-06-10 08:11:56 +00:00
Nicolas Fella
9af0bdee95 Remove dead cmake code
It's not needed
2021-03-09 13:44:44 +00: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
Simone Gaiarin
580cbce837 Selectively reparse builtin and quick annotation tool configuration 2020-10-28 05:32:07 +00: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
Albert Astals Cid
19d98d6a74 Run clang-format
find . \( -name "*.cpp" -or -name "*.h"  -or -name "*.c"  -or -name "*.cc" \) -exec clang-format -i {} \;

If you reached this file doing a git blame, please see README.clang-format (added 2 commits in the future of this one)
2020-07-11 09:17:33 +02:00
Albert Astals Cid
2e46cf22f5 CI: enable clang tidy performance checks 2020-01-02 14:27:11 +01:00
Laurent Montel
5c1fe471a7 Port QSet::toList to QSet::values (toList() is deprecated) 2019-12-20 13:32:49 +01:00
Albert Astals Cid
78cf6bd910 CI: enable more modernize checks
Since unfortunately some of the autogenerated includes don't pass the
checks we do a trick of building out of source and then specifying the
.*/okular/.* path as the only includes we care about
2019-12-18 12:51:13 +01:00
Albert Astals Cid
a2ac42b9c7 CI: Enable modernize-use-bool-literals 2019-12-18 11:32:46 +01:00
Aleix Pol
392755775c mobile: Fix Qt warning 2019-12-14 10:41:59 +01:00
Ahmad Samir
45c72ff0eb Port from deprecated foreach to range-for
autotests/*, conf/* , mobile/* , shell/*, part.cpp, extension.cpp

The code compiles and all unit tests pass (except for the two that
fail on master too).
2019-12-12 22:48:27 +00:00
Nicolas Fella
0110d2f584 [android] Use filedialog from Qt
(cherry picked from commit 187c474024)
2019-11-03 07:44:38 +13:00
Jonah Brüchert
c1b396af3e
mobile: fully port to QQC2
Summary: Remove all QtQuick Controls 1 imports and replace by QtQuick Controls 2

Test Plan: The mobile app behaves just as before

Reviewers: #okular, ngraham

Reviewed By: ngraham

Subscribers: ngraham, okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D21675
2019-06-10 20:59:15 +02:00
Laurent Montel
9f90e14dd1 Fix forward declaration 2019-06-03 08:48:32 +02:00
Laurent Montel
cb691f70dc Fix some clazy warning
Summary: fix clazy warning

Reviewers: aacid

Reviewed By: aacid

Subscribers: nicolasfella, okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D20832
2019-05-27 08:02:57 +02:00
Laurent Montel
5a3a49c310 Port qSort to std::sort 2019-03-12 13:13:53 +01:00
Volker Krause
bc4c19eb92 Remove dependency on okularpart from the mobile components
Summary:
This only depended on okularpart due to the export header used in the
kcfgc file, so use a dedicated one for the mobile components that doesn't
export anything.

This enables disabling the part build for mobile-only builds such as
Android, and thus removing the need for some difficult dependencies
like KParts.

Reviewers: aacid

Reviewed By: aacid

Subscribers: aacid, okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D19037
2019-02-23 09:59:42 +01:00
Yuri Chornoivan
5478b2ec92 Fix minor typos 2018-11-14 21:12:15 +02:00
Yuri Chornoivan
39b6e8147d Fix minor EBN issues 2018-09-01 11:25:57 +03:00
Yuri Chornoivan
c04ca1fa96 Fix minor EBN issues 2018-08-31 12:23:45 +03:00
Aleix Pol
600e72100b Remove the internal file navigation from the global drawer
Summary: Instead include an "open" item.

Test Plan: opened a file

Reviewers: #okular, mart, aacid

Reviewed By: mart

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12884
2018-05-17 16:56:22 +02:00
Aleix Pol
ad09cfdcf1 Kirigami: Properly reuse the page when scrolling back
Reviewed by Albert Astals
2018-05-13 17:57:22 +02:00
Aleix Pol
9cafd504c0 Kirigami: Asynchronous request of pixmaps
Don't block when reading the document to be able to render

Reviwed by Albert Astals
2018-05-13 17:55:34 +02:00
Aleix Pol
c92397da88 Kirigami: Don't try to render if the item is empty 2018-05-13 16:11:55 +02:00
Aleix Pol
1a170e81df Kirigami: set request's normalized rect
We used to give a null rectangle and okular didn't render anything.

Reviewed by Albert Astals
2018-05-13 16:11:33 +02:00
Aleix Pol
cf4bb5e3b1 Android: Make it possible to associate with files
Summary:
Put the file into a file descriptor and open this file descriptor.
Just application/pdf for now.

Test Plan: opened some documents on my phone

Reviewers: #okular, aacid, mart

Reviewed By: mart

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12770
2018-05-11 19:27:13 +02:00
Aleix Pol
90f187e360 QtQuick: schedule a texture render when the window changes
It needs to the devicePixelRatio to the window where it's in.
2018-05-08 17:58:56 +02:00