Commit graph

78 commits

Author SHA1 Message Date
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
Aleix Pol a082ace479 QtQuick: simplify PageItem
Don't compare the limits to itself
2018-05-08 17:58:56 +02:00
Aleix Pol 970e0f2ba9 QtQuick: simplify drawing code
Removes a deprecated optimization
2018-05-08 17:58:56 +02:00
Aleix Pol bf6f5f74dc QtQuick: Don't reset zoom when scrollbars appear 2018-04-25 18:08:03 +02:00
Aleix Pol df35e22314 QtQuick: make certain properties readonly 2018-04-25 17:31:32 +02:00
Aleix Pol 374d953e39 QtQuick: remove unnecessary use of QQuickPixmapItem
It was already ported to render into a pixmap, so just pass that pixmap
as a texture.
2018-04-25 17:27:10 +02:00
Aleix Pol 77dfe3ddc6 QtQuick: Port from Text to proper Kirigami.Units 2018-04-25 16:14:47 +02:00
Aleix Pol 84854afb64 QtQuick: Only emit when there's something to change 2018-04-25 16:01:19 +02:00
Aleix Pol a7b165c0f2 QtQuick: Adopt more assertive behavior upon document change
Don't change all pages to 0, it should be the application currentPage to
change. Otherwise we get to having 3 items at page 0.
2018-04-25 16:01:19 +02:00
Aleix Pol 19222f27ca QtQuick: fix visual corruption
Don't request async pixmaps then render them straight away.
2018-04-25 16:01:19 +02:00
Aleix Pol c51419dd9f QtQuick: use the right bounds when painting
Use textureSize as the documentation suggests, contentsSize is
deprecated.
Sometimes this size is invalid, use textureSize in such case.
2018-04-25 16:01:19 +02:00