Commit graph

5506 commits

Author SHA1 Message Date
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
9874c20d80 kinit: report failure to start program based on its exit code
assuming 0 means success and anything else failure, unifdef for example
exits with exit code 1 if the output is different tho so there are
exceptions to it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 05:14:10 +03:00
Ivailo Monev
39320266cc kinit: error out when services do not support remote URLs and one is detected
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 04:47:21 +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
7c88e24338 kdecore: debug areas update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 21:00:39 +03:00
Ivailo Monev
576547a069 kdecore: debug areas update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 20:59:45 +03:00
Ivailo Monev
95bdfc72a7 plasma: setup icons for the next and previous widget containment actions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 23:36:05 +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
fdc8dc967b kdecore: KMimeType compat bits
from the following commit:
817b7a4aab

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 17:57:55 +03:00
Ivailo Monev
9a996146af kdeui: check the filter pointer before using it in KGlobalAccel
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 17:25:56 +03:00
Ivailo Monev
e19f1d01f5 kinit: check only if the MIME type is executable
to be able to run services for files that have the executable bit set but
are not actually programs

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 16:30:19 +03:00
Ivailo Monev
3dc31e41cb kdeui: KToolInvocation review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 15:22:30 +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
ecef0ed675 kinit: remove exec_blind method from the D-Bus interface
no longer used by any other program

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 14:08:08 +03:00
Ivailo Monev
603c4ba5cf kinit: use scheme handlers as fallback for remote URLs
the MIME type (if it can be obtained) is more accurate anyway

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 13:11:46 +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
a8ad8d46de kioslave: update comment in curl slave
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 12:35:04 +03:00
Ivailo Monev
8da3ce890f kinit: use the home path as default working directory
because klauncher is D-Bus service

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 09:30:09 +03:00
Ivailo Monev
feb9e9405c kioslave: map CURLE_RANGE_ERROR to KIO::ERR_CANNOT_RESUME
it is essentially the same - failure to resume transfer

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 09:16:50 +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
047234847d kdecore: remove now invalid debug area
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 09:00:03 +03:00
Ivailo Monev
18e3a27275 kinit: warn on invalid startup phase
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 08:58:39 +03:00
Ivailo Monev
27c58cb772 kioslave: set the CURLOPT_NOBODY option to true for stat() in curl slave
I know one such server tho I do not care about it now so I am putting the
option back in place

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 08:49:50 +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
fa41515d34 kutils: lock from all KPasswdStore methods
also the implementation internally opens the store if it is not open
already

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 07:58:51 +03:00
Ivailo Monev
67d44cd10f kioslave: map CURLE_UPLOAD_FAILED to KIO::ERR_COULD_NOT_WRITE
as the documentation in CURLE_UPLOAD_FAILED claims - it is usually denied
STORE command and is as close to KIO::ERR_COULD_NOT_WRITE as it gets,
previously KIO::ERR_COULD_NOT_CONNECT was returned for such case

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 07:39:49 +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
480e652825 kinit: handle the special case of scheme handlers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 07:01:41 +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
33a2b8b80a kinit: show a dialog to choose service when none can handle the URL
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 05:18:00 +03:00
Ivailo Monev
1ac69ccc74 kdecore: drop unused startup condition feature
there are other conditions that are checked tho like the allowed
environment but this one is Katana specific and unused so

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 05:02:58 +03:00
Ivailo Monev
ccb945dbce kinit: deal with TODO related to multiple files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 04:50:20 +03:00
Ivailo Monev
f278eea50f kinit: set the program icon of klauncher
for message boxes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 04:42:35 +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
f444caa565 kdecore: adjust KMimeType test case
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 04:11:04 +03:00
Ivailo Monev
a2c8e312d8 kinit: remove temporary files when executable too
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 03:33:14 +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
ceaddee1dd kutils: check if the avahi client pointer is null before using it in KDNSSD
should fix crashes due to internal avahi asserts in some cases (e.g. when
the daemon is not running)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 23:05:13 +03:00
Ivailo Monev
476b1a291d solid: correct device name checks in Solid::Backends::Devinfo::Input::inputType()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 23:01:02 +03:00
Ivailo Monev
c95d7918e6 kdecore: adjust kdnssd debug area defaults
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 22:50:34 +03:00
Ivailo Monev
774427b03a solid: build fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 22:47:15 +03:00
Ivailo Monev
72f316b08d solid: implement Solid::Input interface for devinfo backend
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 22:35:08 +03:00
Ivailo Monev
5c66432bfe Revert "solid: check if the object is null before qobject_cast<T>()-ing it in return_SOLID_CALL() macro"
see the following commit in the Katie repo:
d87d2a4e09388bd07560a807be848d4dbc995807
2024-05-10 09:56:46 +03:00