Commit graph

920 commits

Author SHA1 Message Date
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
Ivailo Monev
bb0c031b69 kio: remove checks for .ui3 and .ui4 files in Messages.sh script
obsolete UI files..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 23:24:04 +03:00
Ivailo Monev
2280f55199 kio: localize the date and time obtained from kfilemetadata_exiv2 plugin
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 21:59:25 +03:00
Ivailo Monev
b591e29541 kio: create KHostInfoThread on the heap and terminate it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-07 11:31:55 +03:00
Ivailo Monev
0f7d9f8ea3 kdecore: setup KCrash to log to the system log, update its documentation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 11:51:35 +03:00
Ivailo Monev
410d0cdd30 kio: handle compressed PDF documents in kfilemetadata_poppler plugin
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-01 04:08:36 +00:00
Ivailo Monev
58145187d6 kio: return empty QString from getTime() function for invalid poppler time
QDateTime::fromTime_t() should probably check for such

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-01 03:46:52 +00:00
Ivailo Monev
5545cb7e2f kio: remove unused KProtocolManager::supportsOpening() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 20:35:46 +00:00
Ivailo Monev
899f789b07 kdecore: move KToolInvocation to kdeui
to get rid of the KApplication signal which is a hack really

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 08:09:02 +00:00
Ivailo Monev
1177b5d671 kio: replace KFileMetaDataWidget::Private::initMetaInfoSettings() with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 04:49:10 +03:00
Ivailo Monev
7098b9d98e kio: remove unused and private KFileMetaDataWidget slots
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 04:46:07 +03:00
Ivailo Monev
5e358d3015 kio: remove unused KFileItemDelegate::Private::transition() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-29 21:48:11 +03:00
Ivailo Monev
964f78287f kio: call QMimeData constructor in KUrlDragPushButton::dragObject()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-29 20:54:14 +03:00
Ivailo Monev
a2e6cb8a18 kio: remove deprecated and non-operational KIO::Job::canceled() signal
never emitted

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-29 03:16:19 +03:00
Ivailo Monev
e413cbc41f kdecore: reimplement KLocale::formatDuration()
much like the old (and now gone) KLocale::prettyFormatDuration() except
with miliseconds precision instead of days

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-27 07:12:53 +03:00
Ivailo Monev
1a45508306 kdecore: reimplement KLocale
by using QLocale in KLocale and separating the date, time and numbers
conversion from translation KLocale actually gets extended locale
support from QLocale (which uses CLDR data v43 currently). translation
remains unaffected. for comparison here is the result of two function
calls the result of which should explain the whole change:
KLocale::allLanguagesList().size() = 669
KLocale::installedLanguages().size() = 68

the first number is locales Katie supports, the second being the
number of languages Katana is translated into

KSwitchLanguageDialog needs a rewrite but that is on the TODO

also copyrighting KCatalog to me because I rewrote it, for reference:
881b47b8ea

KCalendarSystem gets the middle finger - batteries not included for date
and time. extra calendar systems can, but are unlikely to be, supported
in the future

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-26 23:50:18 +03:00
Ivailo Monev
f452e2e50b kdecore: reimplement KDateTime via QDateTime
KDateTime shall be used only for storing date and time while KLocale
shall be used to display such, not even going to test what KDateTime
does because it is basically a few methods on top of QDateTime now.

and because QDateTime knows not much about calendar systems while
KLocale supports several it makes sense for KDateTime to not be used for
displaying date and time thus the TODOs for KLocale are simply removed

note that KLocale still uses its own parser and formatter which means
that the change affects only KDateTime and its uses, not KLocale

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-21 07:51:13 +03:00
Ivailo Monev
53a5c81a3a kio: minor KRecentDocument::recentDocuments() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-21 01:46:20 +03:00