Commit graph

5494 commits

Author SHA1 Message Date
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
Ivailo Monev
5e8ef901ce solid: check if the object is null before qobject_cast<T>()-ing it in return_SOLID_CALL() macro
fixes possible crashes, notably on FreeBSD the backend of which does not
implement all interfaces

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 09:15:24 +03:00
Ivailo Monev
b46e8b1170 solid: remove unused SOLID_CALL() macro
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 09:14:09 +03:00
Ivailo Monev
5338c9f8e0 plasma: do not log the time in debug messages
slows down startup actually, KDebug has option for (KDE_DEBUG_TIMESTAMP
environment variable)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 07:39:46 +03:00
Ivailo Monev
7bea4731e7 plasma: do not add the default applet actions twice to the action collections
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 07:22:03 +03:00
Ivailo Monev
a8080b7dde kdeui: setup the session config instance for saving
comes with a warning, session management is tricky but it works like a
charm now

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 06:23:55 +03:00
Ivailo Monev
753b39282c kdeui: remove KMainWindow compat bits
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 03:58:43 +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
d79faf5d2e kdeui: do not ask top-level widgets for close twice
it could happen because after session management is done klauncher sends
SIGTERM to the programs (the session manager does not close the
applications)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 03:26:40 +03:00
Ivailo Monev
957f5be670 generic: remove session management support leftovers
the X11 bits anyway. bye, bye broken session management

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-09 08:47:21 +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
8ce0f2ec3f kinit: delete finished processes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-07 23:32:03 +03:00
Ivailo Monev
c181a8e25c kdeui: do not log the action pointer when unsafe
generally because KGlobalAccel uses raw pointers it is unsafe to use the
KAction pointers for anything but comparison when removing/unregistering
from the KGlobalAccel destructor

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-07 02:30:48 +03:00