Commit graph

5505 commits

Author SHA1 Message Date
Ivailo Monev
7ca1def2e4 kdeui: implement KIntNumInput and KDoubleNumInput alignment proxies
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 16:03:10 +03:00
Ivailo Monev
e4ff263ec7 kdeui: set KIntNumInput and KDoubleNumInput layouts margin to zero
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 15:49:54 +03:00
Ivailo Monev
7b9b0eee9e kdeui: reimplement KIntNumInput and KDoubleNumInput
work-in-progress, the slider is not connected currently and code in many
places needs adjustments

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 15:40:17 +03:00
Ivailo Monev
92ff7de73c plasma: proxy QDoubleSpinBox from Plasma::SpinBox
rounding via qRound() and other methods is always possible anyway

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 12:23:29 +03:00
Ivailo Monev
0ca4db3298 plasma: theme Plasma::Slider widget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 11:25:34 +03:00
Ivailo Monev
6635f1d35d plasma: drop extender support
unused

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 09:50:05 +03:00
Ivailo Monev
386f894043 kinit: delay deletion of processes by 3 seconds
because the process is connected to shortly after started but it may finish
before the connection is made and attempting to connect to it will result
in a crash

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 02:25:05 +03:00
Ivailo Monev
aa8fa5abaf plasma: remove redundant Plasma::ItemStatus::NeedsAttentionStatus
is used by the panel view to force-activated applet windows but since it is
done on mouse press the window should become active anyway (unless there is
something like focus stealing prevention getting in the way)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-19 23:33:32 +03:00
Ivailo Monev
7ce4310781 plasma: remove unused focus-related signals
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-19 10:25:15 +03:00
Ivailo Monev
4621f48a1c kdecore: rework KThreadPool::waitForDone() to not lock
also active and queued threads remain unchanged by the method, events
processing continues too (at a certain interval)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-19 10:22:28 +03:00
Ivailo Monev
25e28e7076 plasma: simulate pressed icon for applets that have Plasma::ItemStatus::NeedsAttentionStatus status
this is only for popup applets, normal (Plasma::Applet-based) applets paint
everything and as such should handle status

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-19 01:57:13 +03:00
Ivailo Monev
9fb18a72e5 kutils: drop unused KPasswdRouletteDialog class
was experimental

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 23:21:27 +03:00
Ivailo Monev
7f593b37ef kdeui: update KPasswordDialog tabstop order
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 23:20:11 +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
11b3645f90 kioslave: implement anonymous mode for curl slave in ftp mode
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 22:48:53 +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
7697b90bb2 kutils: implement KArchive::data() argument to limit the data size
to be used (for example) in MIME type determination, i.e. read only a small
chunk of the data

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 05:13:02 +03:00
Ivailo Monev
6f968d6f03 kutils: skip the data when the path does not match in KArchive::data()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 05:12:00 +03:00
Ivailo Monev
969f3e428e kdecore: optimize KMimeType::findByContent()
read once, match until match is found or otherwise. that means less disk
I/O

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 05:02:20 +03:00
Ivailo Monev
ddbcca439d kutils: implement option to not show the message box about passwords not being stored permanently
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-17 16:05:09 +03:00
Ivailo Monev
198997f5e1 kdecore: interrupt lock attempts from KLockFile destructor
every while loop should have interrupt point, this one did not

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-17 14:39:15 +03:00
Ivailo Monev
922d02660b kdecore: cache KMimeType pointers
that means less parsing of the xml files overall, trading memory usage for
processing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-17 08:33:57 +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
7e3698a667 kparts: move variable to the scope it is used in
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-17 07:45:32 +03:00
Ivailo Monev
06654a1bbd kinit: ensure the startup timeout is atleast 1 second
has to be done in the KCM too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-17 07:32:55 +03:00
Ivailo Monev
50a9aa403b plasma: proxy QTreeWidget instead of QTreeView
much more convenient, already testing it via experimental lsof applet

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-17 05:01:42 +03:00
Ivailo Monev
c72478ab01 kinit: check the process exit code on state change
for flexibility

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-16 06:33:13 +03:00
Ivailo Monev
71704a410d kparts: query the part to close from KParts::MainWindow
because KParts::ReadWritePart::closeUrl() is not called from the
KParts::ReadWritePart destructor (and even if it is bad stuff may happen)
for most rw parts (exception being okular which does its own query, maybe
some other parts too) saving was not actually done (e.g. for ark). now the
part will be queried to close, if the upload job fails (e.g. because of
insufficient access) the application/part will not close (intentionally)
tho and no error is reported via message box which is something that needs
to be looked into

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-16 06:31:19 +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
c91e594827 kutils: start kcmshell4 via KToolInvocation::startProgram()
for consistency

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-16 01:21:02 +03:00
Ivailo Monev
a32a58d0fc kdeui: remove redundant check for appIconName property
not set now

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-14 12:12:43 +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
be70ca9e8c kdeui: use KKeyServer::keyQtToCodeX() for the key to keycode conversion in kGrabKey()
libhotkeys was using it and it does some tricks such as adding shift mod
for captical letters

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-14 02:30:14 +03:00
Ivailo Monev
76537cfbf6 kutils: make it clear that it is inhibition reply in the warning message
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-14 00:50:56 +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
c8304a4da7 kinit: do not use the program arguments to check for remote URLs
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 08:04:39 +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
3523b1baa9 kinit: de-duplicate code
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 07:44:30 +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