Volker Krause
2fa738d949
Unify usage of WITH_K7ZIP
...
We should either check its value or its definedness, not mix both.
Standardize on the former.
Fixes the build without LZMA support in KArchive.
2024-04-27 15:19:03 +02:00
Sune Vuorela
bfc3e46f9c
A collection of cppcheck fixes
2024-04-15 19:59:42 +02: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
Volker Krause
50d0703ae0
Enable readability-braces-around-statements
2022-03-09 23:29:56 +01:00
Alexander Lohnau
2f193a63de
Convert license headers to SPDX
2021-06-10 08:11:56 +00:00
Albert Astals Cid
f31152d389
Fix loading some png files inside zip comicbook files
...
BUGS: 436086
2021-05-12 22:52:07 +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
Laurent Montel
516fb89d94
Use camelcase include. (scripted)
2020-07-08 13:54:37 +02:00
Albert Astals Cid
4019ec56e5
comicbook: Obey autotransform of images
...
BUGS: 410778
2020-03-04 19:07:03 +00:00
Ahmad Samir
54494cc3d4
[generators/*] Replace deprecated foreach with range-for
2019-12-23 06:06:25 +00:00
Aleix Pol
40d32ae9a4
Fix compilation against a karchive that doesn't have lzma
...
Fixes one of the problems with building for Android.
Note LZMA is an optional dependency for KArchive.
2019-09-21 00:59:50 +02:00
Natsumi Higa
5a8d21d597
Add support for cb7 comic book archives
...
Test Plan: Open a cb7 file (e.g. [[ https://bugs.kde.org/attachment.cgi?id=122002 | Attachment 122002 ]] from [[ https://bugs.kde.org/show_bug.cgi?id=410696 | Bug 410696 ]]) using Okular and see if it works.
Reviewers: #okular, aacid
Subscribers: broulik, pino, okular-devel
Tags: #okular
Differential Revision: https://phabricator.kde.org/D23037
2019-08-10 11:45:13 +02:00
Albert Astals Cid
d9515bb625
mArchiveDir can be const, so we save a nasty const_cast
2019-04-12 09:51:32 +02:00
Laurent Montel
5a3a49c310
Port qSort to std::sort
2019-03-12 13:13:53 +01:00
Fabio Bolz
4e353aabee
Add unarchiver support for cbr files
...
Summary:
FEATURE: 339370
When no unrar installed, Okular now utilizes the program unar for extracting the archive and lsar for listing the content in the archive.
lsar is related and comes with a unar installation.
Subscribers: aacid, okular-devel
Tags: #okular
Differential Revision: https://phabricator.kde.org/D15691
2018-11-07 23:30:22 +01:00
Yuri Chornoivan
c04ca1fa96
Fix minor EBN issues
2018-08-31 12:23:45 +03:00
Kevin Funk
a53a2402ca
clang-tidy: modernize-use-nullptr run
...
Semi-ACK'd by Albert :)
2017-09-06 00:19:48 +02:00
Albert Astals Cid
62eea3336b
Merge remote-tracking branch 'origin/master' into frameworks
2016-10-29 11:13:24 +02:00
Albert Astals Cid
f2b2d94897
Open CBR files with shared-mime-info >= 1.7
...
Not ideal fix surely but it'll do for the moment
BUGS: 369078
2016-10-01 15:39:31 +02:00
Martin T. H. Sandsmark
2b473fedbd
generators: Fix build without implicit cast to/from ascii
...
See previous commit for details.
2016-07-11 21:59:14 +02:00
Montel Laurent
466eb79615
Use QStringLiteral
2015-10-29 13:37:11 +01:00
Montel Laurent
3b4ee788b8
Fix includes
2014-10-08 13:37:04 +02:00
Frederik Gladhorn
6c602bf0e7
Use categorized logging even more
2014-09-16 23:38:25 +02:00
Frederik Gladhorn
e28dbc6c00
Port to QMime
...
compressedMimeFor now already does the inheritance check, so another
check was removed.
2014-09-11 16:32:43 +02:00
Frederik Gladhorn
83d3f1f6b7
Revert "Some more kDebug->qDebug"
...
Seems like kDebug doesn't spam the user, so this needs to use qCDebug.
This reverts commit 34fbdf8c85
.
2014-09-11 02:03:46 +02:00
Frederik Gladhorn
34fbdf8c85
Some more kDebug->qDebug
2014-09-09 18:17:36 +02:00
Albert Astals Cid
55011e0588
Don't create pages for files that are not images
...
The zip in bug #328182 has one
2013-11-30 23:07:29 +01:00
David Palacio
82c29939ea
Merge pages, pageSize and extractImageFiles.
...
This fixes change 39fc2a471e
which does not work on archives (zip, rar, etc.).
2011-11-09 10:53:47 -05:00
Aleix Pol
39fc2a471e
Properly check if a file is a readable image by asking QImageReader.
...
Reviewed by Albert Astals.
2011-08-05 09:47:23 +02:00
David Palacio
4aa3ebe4c6
Add support for reading a directory as a comicbook.
...
REVIEW: 6667
svn path=/trunk/KDE/kdegraphics/okular/; revision=1230519
2011-05-05 20:40:59 +00:00
Glen Kaukola
122fab0eee
Krazy: Check single-char QString operations for efficiency.
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1110335
2010-04-02 19:07:36 +00:00
Pino Toscano
d091beab16
allow TIFF files
...
BUG: 227784
svn path=/trunk/KDE/kdegraphics/okular/; revision=1093114
2010-02-20 10:19:34 +00:00
Harsh Chouraria J
da899f862e
FEATURE:204195
...
Add support for application/x-cbt filetypes using KArchive/KTar support. All kinds of tar (.cbt) files
should now be supported. Changed appropriate .desktop files to detect as well.
svn path=/trunk/KDE/kdegraphics/okular/; revision=1072400
2010-01-10 05:46:13 +00:00
Harsh Chouraria J
f5bbebd879
Generalize the code for KArchive support instead of using KZip directly. This will be helpful in
...
adding other supported formats, such as Tar. (Review ticket: 2181)
svn path=/trunk/KDE/kdegraphics/okular/; revision=1072399
2010-01-10 05:34:57 +00:00
Pino Toscano
6968d1d1a8
isNull() -> !isValid(), as it checks for non-null-but-invalid sizes as well
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=979620
2009-06-10 10:03:18 +00:00
Pino Toscano
36924a897f
When loading a comicbook, try to get just the size of the various images without loading them if possible.
...
Instead of just fully loading the images, make use of QImageReader to query for the size if available, and in case just do the old way (full image loading).
This drastically kills the loading time of comicbook documents of at least 50%, even by 75% (and possibly something more) on the average case.
svn path=/trunk/KDE/kdegraphics/okular/; revision=917041
2009-01-26 18:37:53 +00:00
Pino Toscano
211f082f1e
Scan recursively for images in CBZ archives.
...
BUG: 178029
svn path=/trunk/KDE/kdegraphics/okular/; revision=899134
2008-12-19 23:04:46 +00:00
Pino Toscano
e0987c2989
fix logic error
...
BUG: 178028
svn path=/trunk/KDE/kdegraphics/okular/; revision=898354
2008-12-18 01:21:18 +00:00
Albert Astals Cid
38a3e18279
fix typo spotted by Yuri Chornoivan
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=882560
2008-11-10 22:25:55 +00:00
Pino Toscano
008fce9421
Hack around the fact that CBR or CBZ documents can ahve the wrong extension.
...
(And I wonder, if the only way to recognize them is via extension, wtf?)
BUG: 174701
svn path=/trunk/KDE/kdegraphics/okular/; revision=882007
2008-11-09 14:56:02 +00:00
Pino Toscano
169df555d5
report a message when there is no unrar, or the unrar is not suitable
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=809958
2008-05-19 19:43:48 +00:00
Pino Toscano
f697cdf007
Add a close() method for the comicbook document so:
...
- resources can be freed when closing the Okular document for real (and not just when opening a new comicbook document or quitting)
- we do not crash when doing an opening sequence like: cbz -> cbr -> cbz
svn path=/trunk/KDE/kdegraphics/okular/; revision=798868
2008-04-19 18:46:02 +00:00
Pino Toscano
3c64c3232a
Start adding a minimal way to handle the different flavours of unrar.
...
For now, deny the usage of the "unrar-free", as it does not seem to be much usable...
svn path=/trunk/KDE/kdegraphics/okular/; revision=754056
2007-12-29 00:04:31 +00:00
Tobias Koenig
7e16285d28
Add a new helper functions which allow sorting of strings which
...
contains numbers in natural order
svn path=/trunk/KDE/kdegraphics/okular/; revision=706529
2007-08-30 16:59:49 +00:00
Tobias Koenig
cde58f48ba
* Check for Landscape or Portrait mode (patch by Pino)
...
* Fixed bug by clearing the page map on opening
svn path=/trunk/KDE/kdegraphics/okular/; revision=706496
2007-08-30 15:30:12 +00:00
Albert Astals Cid
0d47b62715
krazy include order issues
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=655893
2007-04-19 18:30:20 +00:00
Tobias Koenig
deabbae3bf
Say hello to the new ComicBook generator for okular.
...
Information about this format and testfiles can be found at
http://en.wikipedia.org/wiki/CDisplay_RAR_Archived_Comic_Book_File
svn path=/trunk/playground/graphics/okular/; revision=624702
2007-01-17 18:49:05 +00:00