Commit graph

1087 commits

Author SHA1 Message Date
Ivailo Monev
9bab635b46 kio: remove redundant spacing override
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-10 03:51:12 +03:00
Ivailo Monev
8293d08153 kdeui: rework job tracking
just watch me do it without a dedicated D-Bus service and dataengine

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-07 23:35:17 +03:00
Ivailo Monev
179d6768bf kio: correct buffer size in KIO::SocketConnectionBackend::sendCommand()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-30 21:54:03 +02:00
Ivailo Monev
1eaf89824e generic: make use of the new QPixmap comparison operators
requires the following commit from the Katie repo:
e28900041a4e78589f3ba28c36fda5bfd6e0f150

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-30 13:07:11 +02:00
Ivailo Monev
d9847b4290 kio: remove unused read timeout getters
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-29 15:44:06 +02:00
Ivailo Monev
f1521944ed kio: documentation updates
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-29 10:15:33 +02:00
Ivailo Monev
b43339cf19 kio: drop proxy support
because curl internally checks the environment for proxy-related variables
it is redundant to duplicate that feature, that however is possible due to
the rewrite of the ftp, sftp and http slaves that I did. some other changes
were made while at it such enable automatic resuming by default, if KIO
slaves cannot resume or do not resume transfers that is different thing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-29 09:54:38 +02:00
Ivailo Monev
1eaf3dab61 kio: remove kfilemodule leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-27 06:12:57 +02:00
Ivailo Monev
4df06d8f7a generic: adjust to Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-24 02:43:33 +02:00
Ivailo Monev
6e654af2b3 kio: implement KFileWidget::setConfirmOverwrite() and KFileWidget::setInlinePreviewShown()
no idea why those methods were stubs but KFileWidgetPrivate had a method
for it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-24 02:32:50 +02:00
Ivailo Monev
7dd0200d8f kio: de-virtualize KFileWidget methods
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-24 02:28:43 +02:00
Ivailo Monev
a65bd3b685 kfile: merge it into kio
once upon a time it was either part of it or was separated from it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-24 01:19:59 +02:00
Ivailo Monev
30eedcf057 kio: KIO::PreviewJob documentation corrections
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-23 10:38:59 +02:00
Ivailo Monev
891458c94a kio: do not cache strings in KIO::UDSEntry
KIO::UDSEntry and QString are already shared data

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-23 06:54:31 +02:00
Ivailo Monev
75b9cfddd3 generic: const-ify private data pointers where copying is disabled
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-23 06:49:59 +02:00
Ivailo Monev
645366a330 kio: remove redundant KIO::UDSEntry::UDS_TIME enum
same as KIO::UDSEntry::UDS_NUMBER internally

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-23 05:44:32 +02:00
Ivailo Monev
6f0e672758 kio: user notification optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-22 12:55:38 +02:00
Ivailo Monev
4b0c33cf75 kio: drop unused metadata
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-20 08:38:45 +02:00
Ivailo Monev
b163f7c35c kio: remove unused definitions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-18 23:24:44 +02:00
Ivailo Monev
5a491b5bdb kio: remove the port from the URL asweel for the auth info key
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-18 23:10:44 +02:00
Ivailo Monev
a38ba51a44 kio: add TODO for authorization port trickery
is a maybe tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-18 07:07:38 +02:00
Ivailo Monev
7c31e18dcf kio: remove comment in authInfoUrl() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-17 21:52:05 +02:00
Ivailo Monev
d80be928b3 kio: magic bits to fill user and password when required but not specified
at the cost of more round-trips to store and (possibly) retrive such, very
convenient tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-17 21:39:58 +02:00
Ivailo Monev
44b4a7ace6 kioslave: different take on authorization in curl slave
unfortunately redirection has to be done just for the sake of visual
pleasantry (so that the URL in the navigation bar matches the actual
address), if it was not for that then the whole redirect thing can be
avoided

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-17 20:59:51 +02:00
Ivailo Monev
1df1ba03f1 kio: use only the protocol, host and port for authorization key
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-17 07:19:34 +02:00
Ivailo Monev
010a2f9054 kio: check only the major poppler version in poppler metadata plugin
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-17 04:19:08 +02:00
Ivailo Monev
58f43fbe7d kioslave: implement authorization info caching for curl slave
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-17 02:21:27 +02:00
Ivailo Monev
0c5d00727e generic: remove redundant Q_OS_UNIX definition checks
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-15 09:28:30 +02:00
Ivailo Monev
88f056fc99 generic: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-15 08:33:10 +02:00
Ivailo Monev
fbfb374b9c generic: drop scripting and tray support
after changes to multiple sub-projects (Katie, kdelibs, kde-workspace
and kde-extraapps) that finally happened, can write lots about it but I
will keep it short - by rewriting parts that were using js/qml (e.g. the
plasma applets) the desktop startup was reduced to half, also the legacy
tray thing shall be no more (anything that needs tray icon shall be a
plasma applet now) thus some applications and features will be dropped
aswell. see all repositories for the changes done

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-21 08:06:58 +03:00
Ivailo Monev
d9cb72afd0 kio: remove redundant job classes destructors
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-24 23:16:37 +03:00
Ivailo Monev
96de1ec99f kio: check only the number of maximum recent document entries to decide if adding should be disabled
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-20 11:53:53 +03:00
Ivailo Monev
84d27ea0b7 kio: log the protocol of the slave that fails the verifications
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-18 12:32:10 +03:00
Ivailo Monev
552d89425b kioslave: implement Authorization metadata for http slave
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-16 13:46:36 +03:00
Ivailo Monev
2d1d7daf82 kio: drop fake startup notification support
silent_arg was used to fake startup notification for non-compliant
applications, that shall not be the case anymore - when applications do not
claim startup notification support or it is simply disabled for specific
use case (as is done by ark for its service actions) then there shall be no
startup notification, silent or otherwise

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 00:46:58 +03:00
Ivailo Monev
4051004a5e kio: checkDesktopFile() function optimization
KFileItem::isRegularFile() is a simple mode (member) check while
KFileItem::mostLocalUrl() does some dirty work

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-02 01:57:31 +03:00
Ivailo Monev
387bdaa93f generic: drop support for BrowserApplication config option
browser shall be determinted by the preferred service for "text/html",
"application/xhtml+xml" or any other MIME type for it (that includes
scheme handlers)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 21:22:56 +03:00
Ivailo Monev
88598523d0 kdeui: new KPixmapWidget
the idea for QImage/QPixmap-optimized widget occurred to me while
writing kimageviewer (see the kde-playground repo), unlike the widget I
wrote for kimageviewer this one supports drag-n-drop tho and is drop-in
replacement for QLabel when showing only a pixmap is required. the
widget also shows a small image while dragging ala ksnapshot

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-29 08:59:51 +03:00
Ivailo Monev
fd53dcd2f4 kio: remove non-operational bits
CHECK_UTF8 is never defined

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-28 03:18:08 +03:00
Ivailo Monev
80d185a980 kio: rename X-KDE-SysTray to X-KDE-HasTrayOption
the tray feature of KApplication works like a charm:
https://ibb.co/sbqxjVr

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-24 16:30:40 +03:00
Ivailo Monev
4b632fcae6 kdeui: implement status notifier for any KApplication instance
optional feature that requires "-tray" command line argument and replaces
what the `ksystraycmd` program was doing. requires "X-KDE-SysTray" entry
in the desktop file as indicator that the application supports "-tray"
argument, unlike `ksystraycmd` does not spawn extra process and even
session management will work properly for it (the argument is manually
added to the restart command)

the feature is very much tide to KMainWindow (and derived classes) but the
overhead is next to none when the "-tray" argument is not specified (the
status notifier is not created in such case) however if created an
expensive tooltip update is done whenever a window changes (may have to
look into optimizing it but then again - most of the code does nothing
unless the "-tray" argument is specified)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-24 01:41:02 +03:00
Ivailo Monev
998d57874d kio: use QString instead of KUrl as argument for KFileMetaDataPlugin::metaData()
for performance reasons (to not convert KUrl to QString from each plugin)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 00:34:54 +03:00
Ivailo Monev
14b62a7d3d kio: implement interface to change the "StartupWMClass" key of .desktop files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 03:03:09 +03:00
Ivailo Monev
f8e1de3728 kio: reimplement KService::DBusUnique
by using properties defined in the spec (see
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html)
what KService::DBusUnique (or X-DBUS-ServiceName and X-DBUS-StartupType)
was used for can be implemented but the difference is now standard
properties can be filled (with values that are correct) and (ab)used for
the same purpose, bonus points?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 22:34:44 +03:00
Ivailo Monev
a50c72de91 generic: drop support for startup notification via D-Bus service
just another way to do what ASN does, the KService::DBusWait mode was
not used too. with this change however all of the process setup code is
moved to a seperate class and the responsibility of KLauncher about ASN
is reduced (ASN now works better for process that fork but if application
claims ASN support and does not send ASN finish then the timeout will be
reached)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 19:53:14 +03:00
Ivailo Monev
07660bf9cd kio: drop support for X-KDE-WMClass and X-KDE-StartupNotify
see the following commit in kde-workspace repo:
f1f6ae7a3ec35e289df1f45cd47e71bd3c696fbe

on a side note the default for StartupNotify should probably be false as it
is unknown if the application actually supports startup notification is one
of the reasons why currently KLauncher does more than merely set an
environment variable and assume applications know what to do with it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 18:21:58 +03:00
Ivailo Monev
b11d10492b kio: launch scheme handlers via KToolInvocation from KRun
generally KRun does not start processes as detached process and as soon as
the process is launched and KRun::finished() is emitted KRun is deleted,
that however means that when the program that used KRun to launch
something exits the launched program will be terminated. while in most
cases that is not an issue (for services that have valid path for example)
for `kde-open` it is because its lifetime is short and the command to
execute is obtained via KProtocolInfo::exec() (QString, not KService)

so, to launch the scheme handlers as detached process (because the
programs that handle such may not fork) KRun has to use KToolInvocation

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 15:05:30 +03:00
Ivailo Monev
625373ffa8 kdecore: drop KDateTime
with the rewrite (see f452e2e50b),
KDateTime is just glue-code for compatibility now. the exception is
KDateTime::isNightTime() (written by me) which is used only in one place
(kde-workspace/plasma/dataengines/weather/ions/wetter.com/ion_wettercom.cpp)
and can be moved there

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-14 22:35:08 +03:00
Ivailo Monev
0f0dcc7b33 kio: drop redundant and disabled by default kionetrc/.netrc support
no interface to enable it and with KPasswdStore in place it is simply
redundant (other than the auto-login macros maybe)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 15:46:45 +03:00
Ivailo Monev
2880bc1677 kio: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 15:35:05 +03:00