Commit graph

1091 commits

Author SHA1 Message Date
Ivailo Monev
a934004638 kio: use 125 as default for the preview icon alpha
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-13 14:27:57 +02:00
Ivailo Monev
af901f454d kio: replace KUriFilter::loadPlugins() with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-13 13:58:37 +02:00
Ivailo Monev
350056d016 kio: pass the matches list directly to KUrlCompletionPrivate::addMatches()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-13 13:43:42 +02:00
Ivailo Monev
db387cd314 kio: someone's typo
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-13 13:32:36 +02:00
Ivailo Monev
fa5db6c506 kio: debug message correction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-13 07:03:51 +02:00
Ivailo Monev
777e9d8024 kio: new djvulibre metadata extractor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-13 06:45:19 +02:00
Ivailo Monev
638f54bc2b kio: deprecation warning fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-08 14:04:47 +02:00
Ivailo Monev
6c98720e24 kdeui: implement KCrash::NoRestart flag
for programs that cannot be restarted by simply exec-ing them such as the
KIO slaves which require application socket as argument

note that restarting is maybe works thing - programs started by kdesudo
cannot be restarted (properly) as they are exec-ed by other program that
does the setup for them to function the way they should

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-08 00:36:35 +02:00
Ivailo Monev
d258df3881 generic: unblock signals when setting handlers for them
generally, those signals should not be blocked but it seems something is
blocking consequent SIGSEGV signals send by `kill` for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 07:45:25 +02:00
Ivailo Monev
053898e849 kio: use the default KCrash handler for debugging KIO slaves
once KIO slaves are plugins it would not matter tho (KApplication sets the
KCrash::DrKonqi flag already) but for now since they are detached
process poping drkonqi in case they crash (and KDE_DEBUG is set) is more
usefull than printing trace to stderr

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 07:33:20 +02:00
Ivailo Monev
08a5c77e48 kio: compiler warning fixes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 23:50:37 +02:00
Ivailo Monev
c1a17d5a30 kio: disconnect the slave and close the connection in case of error in the slave loop
this was done only when there was pool socket (when klauncher was handling
slaves) but it has to be done anyway to prevent more tasks (commands) from
being send after error occurs

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 05:22:53 +02:00
Ivailo Monev
bc067dbdfa kio: drop support for putting slaves on hold
with klauncher no longer responsible for KIO slave the next step is to
make them plugins and the feature to put them on hold will be of no value
because QLibrary reuses library/plugin instances and creating a new
slave object will be cheap

in other words the performance will be similar to that of KFileMetaInfo
for which I also wrote the plugins myself - they are pretty quick
compared to what strigi was doing and with more flexible configuration
interface but it took some effort to get there

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 04:22:23 +02:00
Ivailo Monev
babadc729f kio: remove unused KRun::checkStartupNotify() argument
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 08:47:55 +02:00
Ivailo Monev
5177126cc6 generic: documentation update
note that the kdeinit README used to reference Pentium 3 CPU

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 02:08:10 +02:00
Ivailo Monev
aa6b5ea4f0 kinit: klauncher and KCrash rewrite
much simpler and easier to maintain, also it will be proper D-Bus
service now with no sockets, process title hack and whatnot. KCrash
and startkde script (in kde-workspace repo) have to be adjusted for
it tho

note that the internal KIO scheduler already has the functionality to
put slaves on hold but now they will be started as detached process.
eventually they may become plugins (they are loaded as such by kioslave
program) without event loop dispatcher

fixes application startup notification (ASN) and cleanup issues

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-04 23:20:15 +02:00
Ivailo Monev
7f3fa16363 kio: remove documentation for removed KIO::StatJob method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-03 00:18:50 +02:00
Ivailo Monev
77d4eda777 kio: do not check what plugin to use for items with empty MIME type
such items should not be in the queue for preview even, even items for
remote URLs have something vendor-specific or application/octet-stream as
MIME type. fixes KMimeTypeTrader runtime warning

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-30 09:14:28 +02:00
Ivailo Monev
c06770a96f kio: remove archive slaves leftovers
they were not using the X-KDE-LocalProtocol property either

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 11:30:38 +02:00
Ivailo Monev
1460e60247 kio: remove binary compat bits
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 11:29:03 +02:00
Ivailo Monev
1ecd860cd3 kio: specialize only the globs matching
the soft MIME matching via KMimeType::is() is way too.. soft. it can match
application/x-dvi as plain/text (and use ps thumbnailer) which is not ideal
(should use only textthumbnail thumbnailer for plain/text and ps
thumbnailer for application/x-dvi)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 00:02:56 +02:00
Ivailo Monev
f9b87a7adf kio: update comment in PreviewJobPrivate::getOrCreateThumbnail()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 06:13:29 +02:00
Ivailo Monev
e3f470feab kio: typo
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 06:12:13 +02:00
Ivailo Monev
9e3f2b3eb2 kio: log PreviewJob messages to the kio (KIOJob) debug area
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 06:10:02 +02:00
Ivailo Monev
9e5c94b905 kio: check if any of the preferred services is in the list of enabled plugins
the reason for checking the preffered offers first should be obvious - it
is questionable which match should be done first. should it be the glob or
the exact match? chicken and egg thing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 02:25:06 +02:00
Ivailo Monev
bc10416911 kio: try to find thumbnailer plugin via KMimeTypeTrader::query() first
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 02:13:58 +02:00
Ivailo Monev
2e6f3fba02 kio: PreviewJobPrivate::startPreview() rewrite
mostly to make the MIME types check consistent by using KMimeType::is()
for the comparison (as done by KPreviewPropsPlugin::supports() for example)
and to filter the ThumbCreator service type (to avoid invalid KMimeType
checks)

fixed KFileMetaInfo regression for plugins that use globs aswell

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 01:25:33 +02:00
Ivailo Monev
27de045733 kio: drop unused remote thumbnailers feature
none of the plugins support it and it slows down the thumbnail
preview generation (or fetching of existing thumbnail)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 23:25:40 +02:00
Ivailo Monev
de3384ee46 kio: format and indent previewjob source file
side note: the MIME matching code in PreviewJobPrivate::startPreview() is
spaghetti

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 22:41:13 +02:00
Ivailo Monev
d67610909c kio: remove documentation for non-existing methods
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 03:48:28 +02:00
Ivailo Monev
38635d4406 kio: implement IconAlpha config option for previews
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-16 23:35:39 +02:00
Ivailo Monev
b5c5b5c85a kio: remove preview overlay icon alpha override
setting it to zero essentially disables it, an option for it will be
implemented instead

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-16 23:34:32 +02:00
Ivailo Monev
8611f36591 kio: correct reference to kDebug()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 00:59:14 +02:00
Ivailo Monev
3339338121 generic: prepare for Katie changes
note that kDebug(), kWarning(), etc. automatically add end of line

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 00:46:32 +02:00
Ivailo Monev
9b41127ecb generic: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 00:40:18 +02:00
Ivailo Monev
2b2ac283e8 kio: move metadata plugin keys to the .desktop files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-04 14:40:57 +02:00
Ivailo Monev
1e982a7e2d kio: move metadata plugin MIME types to the .desktop files
ideally, the keys would also be stored in the .desktop files so that
plugin instances would not have to be created from
KFileMetaInfo::supportedKeys() too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-04 13:59:00 +02:00
Ivailo Monev
b8834c9cdd kio: increase the default preview sizes limits
the option to change them is hidden deep into the Dolphin configuration
meaning a thumbnail not being generated in gwenview may require from the
user to launch Dolphin and increase the limit (especially for images in
RAW format) but does he/she know about it?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-26 07:32:12 +03:00
Ivailo Monev
55e7b76bd0 kio: fix regression since 704ef230d5
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-24 17:46:10 +03:00
Ivailo Monev
76ffb428ee kio: add timeout timer to the KDirLister test
fixes possible test hang

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-24 17:20:51 +03:00
Ivailo Monev
ebdee75650 kio: correct area in KDirModel::flags()
7007 is for kio (KIOJob)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-22 23:48:10 +03:00
Ivailo Monev
2c53b75153 kio: correct error message areas in KIO::chmod()
250 is reserved for kfile (kdelibs)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-22 23:23:17 +03:00
Ivailo Monev
0b998b4881 kio: log FileUndoManager messages to the kio area
1203 is reserved for libkonq

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-22 20:52:09 +03:00
Ivailo Monev
c0a340914c kio: remove comment for them aswell
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-18 03:47:52 +03:00
Ivailo Monev
59bd1359f9 kio: remove code for unsupported info and man KIO slaves
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-18 03:29:18 +03:00
Ivailo Monev
32cc183690 kio: KRemoteEncoding::decode() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-16 18:57:54 +03:00
Ivailo Monev
feb0869d29 kio: avoid temporary in kfilematadata_exiv2 plugin
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-16 01:02:53 +03:00
Ivailo Monev
e29151a728 kutils: essentially KExiv2 rewrite
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-16 00:59:16 +03:00
Ivailo Monev
301bc3a1e5 kutils: new kemail library
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-15 05:03:10 +03:00
Ivailo Monev
368cfcd2f4 kio: correct arguments passed to konsole executable
fixes starting programs that require terminal from Plasma menu for
example

%i no longer expands to "--icon '%i'", I changed it to be so some time ago
so that different arguments can be passed along with %i to programs if they
support icon option but with different option name

%m is deprecated, for reference:
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-14 22:52:06 +03:00