Commit graph

1317 commits

Author SHA1 Message Date
Ivailo Monev
09a4b1dd06 okular: fix xps generator printing
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-01 19:06:37 +02:00
Ivailo Monev
658e812f74 gwenview: do not rely on compiler to pick up the correct constructor
KUrl has QVariant operator meaning it should be QVariant from QVariant
(i.e. copy constructor) but the testModel() function (see the history model
test) explicitly converts it to KUrl while the StartMainPage class was
converting it to QUrl (via QVariant::toUrl()).

qVariantFromValue<T>() has type before QVariant specialization

side note, try compiling the following (with proper Makefile):

 #include <qurl.h>
 #include <qvariant.h>
 #include <qdebug.h>
 #include <kurl.h>

int main (int argc, char** argv)
{
    QVariant v(QUrl());
    qDebug() << v.type() << v.userType();

    QVariant v2(KUrl());
    qDebug() << v2.type() << v2.userType();

    return 0;
}

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-30 22:32:43 +02:00
Ivailo Monev
6a58726aea okular: remove the part action to import PS as PDF
Okular can open both document formats, can even export PS as PDF

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-30 19:53:00 +02:00
Ivailo Monev
e7750e6448 okular: remove non-existing action in part.rc
GHNS support was dropped

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-30 19:49:01 +02:00
Ivailo Monev
601a08ccab okular: remove file printer leftovers
only native printing (via QPrinter) is supported now

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-30 19:40:11 +02:00
Ivailo Monev
fd5e26de00 okular: load the movie anew when repeating it
also the loaded state does not have to be tracked and a new attempt to load
it (in case of temporary resource failure) may succeed (failures are
neither tracked nor reported by the video widget class)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 03:23:38 +02:00
Ivailo Monev
c50f1ce84c okular: multiply the size by 4 from SnapshotTaker
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-28 11:22:50 +02:00
Ivailo Monev
f61bb0f7f3 okular: switch from poster to player when a mouse button is pressed and the current page is poster
this is just pre-face to (maybe) use poster image instead of custom one for
videos in the epub generator

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-28 06:41:33 +02:00
Ivailo Monev
91e0bf2ce0 okular: copyrighting snapshot taker to me
nothing left from the original code logic

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-28 05:53:07 +02:00
Ivailo Monev
84fc87f682 Merge branch 'master' of https://scm.osdn.net/gitroot/kde/kde-extraapps 2022-11-28 05:48:41 +02:00
Ivailo Monev
5b77797be4 okular: rewrite snapshot taker to use KIO::PreviewJob
KIO::PreviewJob was made for this kind of things, it also does not involve
loading the file (which may play a sound even if the widget is not
visible), seeking, pausing and then grabbing a QWidget snapshot. the only
requirement is for ffmpegthumbs thumbnailer to be installed

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-28 05:48:24 +02:00
Ivailo Monev
15ebbe0768 okular: error message correction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-28 05:38:08 +02:00
Ivailo Monev
28a9ce4234 kget: cache the font used by ProxyWidget
that KIcon("kget").paint() in ProxyWidget::paint() looks expensive.. may
have to cache the KIcon object aswell and update it when the system icon
theme changes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-28 00:24:19 +02:00
Ivailo Monev
80c0e15ea7 kget: remove unused KGetAppletUtils class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-28 00:07:54 +02:00
Ivailo Monev
67457c8751 okular: fix playing of epub generator sounds
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 23:29:43 +02:00
Ivailo Monev
6b0fb147aa okular: log position via kDebug() instead of qDebug() from epub generator
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 22:08:45 +02:00
Ivailo Monev
d8d26e46c4 okular: correct breaks scope in document source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 22:04:20 +02:00
Ivailo Monev
8ed83be2bf okular: map the sound action volume to value appropriate for KAudioPlayer
fixes regression since the port to KAudioPlayer, the use of qBound() is
there to make sure speakers (or head-phones) do not blow up while the
assert is for developers to know that Okular generator is trying to use
value outside the range

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 21:35:10 +02:00
Ivailo Monev
c6d2c74219 okular: pass the data size to the static QString constructor from epub generator
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 20:48:08 +02:00
Ivailo Monev
436bb16561 okular: hack for KMediaPlayer
see 47ec323674

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 20:24:02 +02:00
Ivailo Monev
dde11052a3 okular: use QTextCodec::codecForHtml() instead of QTextCodec::codecForUtfText() in markdown generator
QTextCodec::codecForHtml() can detect non-unicode character sets and
character set specified via HTML meta header

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 04:02:40 +02:00
Ivailo Monev
47ec323674 ark: hack for KMediaPlayer part
note that it is MPV itself that requires it thus the media classes (such as
KMediaPlayer, KMediaWidget, etc.) require it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 02:10:04 +02:00
Ivailo Monev
438d8ad3a7 generic: set the parts object name
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 00:49:53 +02:00
Ivailo Monev
246920bec1 Merge branch 'master' of https://scm.osdn.net/gitroot/kde/kde-extraapps 2022-11-26 23:26:55 +02:00
Ivailo Monev
cfe5d7aeb7 thumbnailers: set the initial ps thumbnailer preference to 2
the generic image thumbnailer uses a glob that matches image/* and the ps
thumbnailer handles image/x-eps thus the generic image thumbnailer should
have lower preference (its InitialPreference value is set to 1)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 23:56:31 +02:00
Ivailo Monev
fac3df8cef ark: set the part object name
used by debug message in kdelibs/kparts/part.cpp

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 23:26:42 +02:00
Ivailo Monev
9822f945eb okular: fix xps generator font loading regression
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 17:51:56 +02:00
Ivailo Monev
4affd41c78 okular: do not thread the xps generator
it is not thread-safe

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 17:03:36 +02:00
Ivailo Monev
a2f4d17258 okular: adjust xps generator to KArchive behaviour
trying to generate entry paths (absolute or otherwise) is the wrong thing
to do, they should be checked if they are in the archive instead (with or
without leading slash)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 17:03:09 +02:00
Ivailo Monev
26bf2328f1 krdc: VNC client low quality option fix
note that the depth can be 32 for any quality, the quality it is tuned by
setting other options too (e.g. compression level which I believe has
nothing to do with rendering quality, assuming compression is lossless)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-18 22:30:44 +02:00
Ivailo Monev
fde94cda1c gwenview: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 02:09:37 +02:00
Ivailo Monev
74a6b57570 krdc: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 01:12:06 +02:00
Ivailo Monev
45dcabf7f8 generic: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 15:37:30 +02:00
Ivailo Monev
c10c11bd76 okular: make use of KStringHandler::naturalCompare() in comicbook generator
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-11 22:37:15 +02:00
Ivailo Monev
df9227c95c okular: drop non-native printing support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-11 13:06:20 +02:00
Ivailo Monev
d2144d7ff4 okular: connect to the paintRequested() signal of QPrintPreviewDialog
printing to the QPrinter of QPrintPreviewDialog must be done on demand,
fixes print preview in general

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-11 05:06:48 +02:00
Ivailo Monev
2734df9d74 kdeplasma-addons: check for MPRIS interface instead of relying on categories
generally speaking trying to guess MPRIS interfaces is brute-force guess - it
works kinda. the check that was used before this change however does not
account for applications that are not categorized as audio or music player
but do have MPRIS interface (chromium does).

side note: tested only the MPRIS v2 interface

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-08 20:34:29 +02:00
Ivailo Monev
03c55f0bb8 kdeplasma-addons: minor icontasks optimizations
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-08 19:55:17 +02:00
Ivailo Monev
b3dd756c1d kdeplasma-addons: use the now exported Plasma::DialogShadows class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-07 18:26:30 +02:00
Ivailo Monev
933de0b833 ksnapshot: replace qDebug() with kDebug()
this has to be done it a lot more places

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-06 17:09:23 +02:00
Ivailo Monev
74d989e8d2 ksnapshot: ungrab the X11 server after pointer is queried in windowUnderCursor() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-06 19:48:32 +02:00
Ivailo Monev
e52b5a473a generic: use sysconf() to get the total memory
available on non-Linux and non-FreeBSD, getFreeMemory() remains
unimplemented for other platforms tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-05 19:18:38 +02:00
Ivailo Monev
dabd0aca0b gwenview: update MIME types in .desktop files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-28 01:21:35 +03:00
Ivailo Monev
aeabcae59c ksystemlog: link the library used for testing to the required libraries
fixes testing build

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-28 00:26:07 +03:00
Ivailo Monev
cc0562473e gwenview: update MIME types in .desktop files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-26 19:02:18 +03:00
Ivailo Monev
c2681eeef1 okular: use KTemporaryFile instead of QTemporaryFile in Movie constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-23 18:34:52 +03:00
Ivailo Monev
8e48833447 kdeplasma-addons: remove redundant qsrand() calls
KRandom does not require seeding

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-23 08:25:23 +03:00
Ivailo Monev
68a2d24c6a okular: prepare for KDebug change
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-23 02:49:36 +03:00
Ivailo Monev
9c2d216fad gwenview: do not overwrite kdebugrc when testing
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-23 00:23:50 +03:00
Ivailo Monev
863de60922 okular: log poppler generator messages to specialized area
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-22 23:02:49 +03:00