Commit graph

445 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
4677b62c24 plasma: remove reference to declarative library
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-07 00:41:48 +03:00
Ivailo Monev
b8d4dc0dc4 generic: call static KStandardDirs methods as such
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-05 02:04:03 +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
e273741fdb kio: drop MIME type feature of slaves
the specialized one, stat() does it now because emitting MIME type while
also emitting data (in or out) interrupts the data flow

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-03 05:26:56 +03:00
Ivailo Monev
540ee2cde7 kio: rework the job scheduler
thread-safe and private

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-02 02:16:50 +03:00
Ivailo Monev
aebe72a932 generic: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 21:45:09 +03:00
Ivailo Monev
98f6b2b434 plasma: update the key sequence widget when the applet global shortcut changes
for the case when it is stolen

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-27 04:18:19 +03:00
Ivailo Monev
6514366e29 plasma: create the application activation action on demand
for applets that do not have global shortcut set programatically but global
shortcut is set from the configuration interface

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-27 04:07:33 +03:00
Ivailo Monev
451dc7ea32 plasma: adjust to Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-26 23:49:18 +03:00
Ivailo Monev
2a6dd1965c plasma: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-26 22:59:39 +03:00
Ivailo Monev
e47359782c plasma: make Plasma::Applet::setGlobalShortcut() set the shortcut once only
the shortcut is managed internally by Plasma::Applet

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-26 01:08:31 +03:00
Ivailo Monev
334ecceb27 plasma: set the associated action of the shortcut editor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 09:44:35 +03:00
Ivailo Monev
843463c95d kdeui: drop KSortcut
missing proper configuration interface for the shortcuts, the old one
was borked anyway

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 10:19:03 +03:00
Ivailo Monev
d725bcef69 kdeui: remove old KGlobalAccel autoloading feature leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-22 02:51:29 +03:00
Ivailo Monev
174f6a30e0 plasma: assume QPixmap paint engines support composition
the backbone of QPixmap is QImage

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-19 20:31:07 +03:00
Ivailo Monev
2ad07c5a86 plasma: remove redundant widget properties
once used in qml bindings and such, now redundant

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-19 20:24:03 +03:00
Ivailo Monev
8765730377 plasma: plug memory leak
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-19 20:05:17 +03:00
Ivailo Monev
489bb13a8b plasma: bring back Plasma::RunnerManager::reloadConfiguration() method
does totally different thing tho - the old method was reloading the
configuration of Plasma::RunnerManager while this one reloads the
configuration of the loaded runners. it is a convenience method still that
should not be used as runners are matching for obvious reasons

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-19 07:28:38 +03:00
Ivailo Monev
d3ca6d35c5 plasma: do not load runners when the allowed runners change
unless there are runners loaded that may have to be unloaded for example,
that way the initial loading of runners will be delayed until the first
query

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-19 02:51:16 +03:00
Ivailo Monev
8c2136445e plasma: remove unused Plasma::RunnerContext::Type enum
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 22:35:46 +03:00
Ivailo Monev
df9bffd10c plasma: reset runners context before waiting
so that runners know that it is time for them to stop because the context
is no longer valid

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 22:28:17 +03:00
Ivailo Monev
bd3425b187 plasma: Plasma::RunnerManager documentation update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 22:23:23 +03:00
Ivailo Monev
8791f0571b plasma: do not emit Plasma::RunnerContext::matchesChanged() from Plasma::RunnerContext::reset()
any preperation for matching anew should be done prior to starting a query

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 22:14:48 +03:00
Ivailo Monev
6514cb22a6 plasma: remove unused private member
performance gain for the runners, there should be no duplicates and even
if there was the only thing that was done about it is to print a debug
message when build for debugging

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 22:06:26 +03:00
Ivailo Monev
595991ff55 plasma: simplify runners setup and correct signals emission
Plasma::RunnerManager::matchesChanged() is now emitted when new matches
arive, Plasma::RunnerManager::queryFinished() when matching is done (all
match jobs finished)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 18:18:42 +03:00
Ivailo Monev
f452997709 plasma: remove unused and redundant Plasma::RunnerContext methods
nothing but the manager is supposed to remove matches and there is a
Plasma::RunnerContext::reset() method

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 17:32:27 +03:00
Ivailo Monev
ac5d407fd5 plasma: remove unused Plasma::RunnerContext methods arguments
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 17:09:11 +03:00
Ivailo Monev
97cfe669fc plasma: do not magically adjust the speed of runners
I've optimized the runners enough to not need such bits

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 07:53:05 +03:00
Ivailo Monev
afb548b2ed plasma: unlock Plasma::QueryMatch
assuming that match (Plasma::QueryMatch) objects are modified by one thread
in the runner itself only or operated on a copy of one matching does not
need a mutex

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 07:43:34 +03:00
Ivailo Monev
632dd982df plasma: remove redundant KThreadPool::setMaxThreadCount() call
KThreadPool uses the same value by default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 06:40:49 +03:00
Ivailo Monev
a871678ec4 plasma: rework runners classes to not pass around the context
unused in most cases, shared data and dangerous to pass around

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 05:15:02 +03:00
Ivailo Monev
2f485d5376 generic: replace QThreadPool and QRunnable with custom class
on a side note it does not solve any thread-safety issues, such are out
of the scope of the class

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 03:05:03 +03:00
Ivailo Monev
747c37269b plasma: remove unused Plasma::RunnerContext MIME type info
runners can determine it anyway, generic type detection is done already

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 01:02:11 +03:00
Ivailo Monev
b2a66f5a72 plasma: const-ify Plasma::RunnerContext arguments
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 00:16:31 +03:00
Ivailo Monev
7683b1d29e plasma: drop redundant Plasma::QueryMatch type feature
it could be used to sort ala relevance but what would the relevance feature
would be for then?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-18 00:06:05 +03:00
Ivailo Monev
c4c494d705 plasma: do not copy the query match in Plasma::RunnerContext::addMatch()
its relevance remains unchanged

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-17 23:01:28 +03:00
Ivailo Monev
e7fcb90738 plasma: actually use the priority
the runners priority property was not used for anything, it is now

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-17 21:35:38 +03:00