Commit graph

1045 commits

Author SHA1 Message Date
Ivailo Monev
b5b1741ca5 kio: correct logic for hiding user name in KIO::SlaveBase::openPasswordDialog()
that nasty operator not..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 17:12:52 +03:00
Ivailo Monev
a224bab20c kdeui: drop the domain feature of KPasswordDialog
editing the domain does not make sense, showing domain can be done via
comment (the complete URL is shown via comment by the KIO curl slave for
example)

note the change to KIO::AuthInfo, this invalidates stored data

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 23:17:35 +03:00
Ivailo Monev
2983df9818 kio: properly initialize KIO::AuthInfo members
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 22:33:21 +03:00
Ivailo Monev
f0dd6c73f5 kio: check cache only if the password store is not open from KIO::SlaveBase::openPasswordDialog()
if the password store is open and KIO::SlaveBase::openPasswordDialog() is
called then the password from the cache is not valid

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 11:02:26 +03:00
Ivailo Monev
42f9a2162c kio: remove unused headers inclusions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 11:01:17 +03:00
Ivailo Monev
03e6b05f68 kio: use members for extra KIO::AuthInfo fields
because streaming a map of QVariants is not exactly optimal, members remain
undocumented but refer to KPasswordDialog flags and such anyway

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 10:56:23 +03:00
Ivailo Monev
11b5a43a53 kio: MOC warning fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-17 08:14:42 +03:00
Ivailo Monev
3ebc020de4 kio: remove methods that are not implemented
the compiler is supposed to catch such errors (e.g. wrong type passed to
the method)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-17 07:46:17 +03:00
Ivailo Monev
8c8855d9a6 generic: drop temporary file option
any program launched with temporary file (as per the spec) argument
(because it does not support %u or %U) should not be responsible for
deleting the file, klauncher already handles that thus the option is
redundant. I don't know how other implemenatations (of program launchers)
do it but I cannot say I care either

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-16 01:37:20 +03:00
Ivailo Monev
381ab0a324 kio: wake up the slave before terminating it
otherwise (apparently) sending SIGTERM is not doing anything

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-14 11:54:19 +03:00
Ivailo Monev
9530356389 kio: use smaller type for sending KIO::JobUiDelegate::MessageBoxType type
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-14 09:02:23 +03:00
Ivailo Monev
e4ce49f138 kio: use the macro for sending data in KIO::SlaveInterface::setConfig()
no functional change

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-14 08:58:36 +03:00
Ivailo Monev
24336de9b9 kio: KIO::NetAccess review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 23:25:10 +03:00
Ivailo Monev
7f261aca95 kdecore: new KTemporaryFile::urlPath() method
based on the bits in kparts/part.cpp

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 22:52:30 +03:00
Ivailo Monev
75eeefb652 kio: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 08:50:41 +03:00
Ivailo Monev
c40e6014ce kio: preserve the extension from KIO::NetAccess::download()
it was done by kioexec which KRun was using but now everything that uses
KIO::NetAccess::download() benefits from better MIME type detection (e.g.
inkscape used to fail to detect the image format because the temporary file
was lacking extension)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 08:30:31 +03:00
Ivailo Monev
cfceb37f62 kio: log debug messages when terminal or kdesudo is not found
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 07:53:16 +03:00
Ivailo Monev
292b85fb94 kio: rename KRun::isExecutable() argument
it is not service type, is it?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 07:51:10 +03:00
Ivailo Monev
2ab6930a94 kio: KRun documentation review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 07:44:48 +03:00
Ivailo Monev
bc9f3cf339 kinit: download remote URLs for services lacking support for such
now klauncher has all required features (by the spec) and then some

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 07:32:39 +03:00
Ivailo Monev
3fb2096129 kio: remove redundant KDesktopFileActions::userDefinedServices() overload
there is one convenience overload already

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 06:14:23 +03:00
Ivailo Monev
0364baa81f kio: remove unused KDesktopFileActions::userDefinedServices() argument
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 05:53:13 +03:00
Ivailo Monev
85cf5851bd kio: handle terminal and UID substitution options in KRun::processDesktopExec()
much like the old implementation except that empty QStringList is returned
if either terminal or kdesudo is required but not found, ideally errors
should be reported by klauncher when that is the case

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 21:53:27 +03:00
Ivailo Monev
bd3345543d kio: reuse variable in KFilePropsPlugin
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 22:45:15 +03:00
Ivailo Monev
3c96458087 kio: rework KRun::processDesktopExec() to account for empty list of URLs and not join the URLs into single argument
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 18:28:08 +03:00
Ivailo Monev
ae72f73768 kdeui: simplify KToolInvocation::invokeMailer()
thunderbird for one accepts a single URL (which probably is split into bits
and checked for query items). it does not have "t", "s", etc. placeholders
in its .desktop file so that whole map thing is not really working well

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 15:04:52 +03:00
Ivailo Monev
779f3b5635 kio: update placeholders references in KOpenWithDialog
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 14:44:36 +03:00
Ivailo Monev
25d81b76b9 kio: slightly better exec extraction in KOpenWithDialog
the matching could try basename and possibly second argument match tho,
e.g. the Exec key value could be relative or full path and interpreter may
be the first argument with the actual program (or script rather) second
making the matching kinda hard to get right

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 14:40:26 +03:00
Ivailo Monev
aee3b7b3da kio: log debug messages to a valid debug area
250 is not a registered one

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 14:25:51 +03:00
Ivailo Monev
06cafdba67 kio: default to the locale encoding in KIO::SlaveBase
as is done in KIO::Scheduler

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 12:45:30 +03:00
Ivailo Monev
6af1008bc5 kio: kill slaves from KIO::Scheduler destructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 09:13:21 +03:00
Ivailo Monev
45324eac58 kio: show stat() progress after 3 seconds for remote files
the magic of timers! continue from 5ae8fe637e

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 08:34:43 +03:00
Ivailo Monev
5ae8fe637e kio: hide of progress of stat() jobs done by KIO::NetAccess
now that stat() is used for MIME type determination it is used in lots of
places and progress should not be shown more often than it should

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 07:20:35 +03:00
Ivailo Monev
dfd76bcd04 kio: remove the job from the queue and unlock the mutex on failure to create the slave
if the mutex is not unlocked deadlock occurs, if the job is not removed
from the queue it will be attempted to start it again

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 06:10:08 +03:00
Ivailo Monev
5f43d4a86c kio: KRun documentation update
other misc changes were made while at it, .gitexcludes had executable
bit set..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 05:50:57 +03:00
Ivailo Monev
1a29d6bb3b kio: check if the URL is directory before checking permissions in KRun::isExecutableFile()
as the KRun::isExecutableFile() method name implies - it is only for
checking files

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 04:26:15 +03:00
Ivailo Monev
b90f90905b kio: move most of the KRun bits to KLauncher
two things doing the same thing - one has to go away. also KRun does not
fork and the launched service/application lifetime was bound to the
process launching it, that is not the case with klauncher - it is bound
to the session (in the usual case)

a few things on the TODO list but mostly for services/applications
lacking features

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 03:21:17 +03:00
Ivailo Monev
e6666ee203 kio: remove now unused KCModuleInit service type
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 03:36:35 +03:00
Ivailo Monev
0e0db0b815 kdeui: move session management to KApplicaiton
every comment about X11 and session management in general claims it was
broken, not going to claim otherwise. everything that does not use
KApplication shall not be involved into session management now and gets
the middle finger (SIGTERM or SIGKILL) after 5 sec by klauncher when the
session is done

also session management has to be explicitly enabled by applications
now, disabled by default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-09 08:29:51 +03:00
Ivailo Monev
3716b1ffe5 kutils: allow storing and retreiving of temporary passwords via KPasswdStore
the implementation supports it and KIO now uses that feature

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-05 07:22:39 +03:00
Ivailo Monev
dfc39666d2 kio: remove unused member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-05 04:48:20 +03:00
Ivailo Monev
22c025def4 kio: reduce the job queue timeout
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-04 22:35:16 +03:00
Ivailo Monev
d45c3a867b kio: remove unused variable
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-04 21:59:13 +03:00
Ivailo Monev
559411bd09 generic: optimize MIME type detection
KRun already had such optimization in place for example, that makes the
file slave kinda special tho as it will determine MIME type only from mode
but the goal is to not even spin a job and a slave for local files

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-04 21:26:18 +03:00
Ivailo Monev
817b7a4aab kdecore: rework KMimeType
more accurate probing then before, notably by probing the file content
from the file slave (only the name was checked before because the
filepath was not a full path in some cases and the file could not be
open)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-04 20:14:53 +03:00
Ivailo Monev
6820e4e63c kioslave: different take on MIME type determination in curl slave
because FTP and SFTP are special about it so is the MIME type
determination

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-04 04:03:02 +03:00
Ivailo Monev
954e45641e kio: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-03 20:35:43 +03:00
Ivailo Monev
59f92c0970 generic: compiler warning fixes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-03 20:21:35 +03:00
Ivailo Monev
71151f9f6f kio: PasteDialog review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-03 20:05:39 +03:00
Ivailo Monev
19a06b0e06 kio: add the missing PasteDialog bits
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-03 20:02:25 +03:00