Commit graph

1089 commits

Author SHA1 Message Date
Ivailo Monev
5a8143eff2 kdeui: do not map QComboBox and KComboBox properties in KConfigDialogManager
different property is used based on the editable state of the QComboBox or
KComboBox object

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-06-04 03:27:18 +03:00
Ivailo Monev
e5be0d5a2a generic: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-06-04 03:17:41 +03:00
Ivailo Monev
2970cad3e9 kdeui: merge KIconLoaderGlobalData into KIconLoaderPrivate
to reload any generic icons data (from the xdgdata-mime resources) when
icon settings change, also there is a global instance of KIconLoader
(created by KIconLoader::global()) so one less global static

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-06-04 00:57:30 +03:00
Ivailo Monev
0fc795f6a3 kdeui: use foreach() for iterations in KIconLoader
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-06-04 00:40:18 +03:00
Ivailo Monev
9c4a2560c4 kdeui: convert KIconLoaderPrivate::overlaySize() to static method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-06-04 00:22:56 +03:00
Ivailo Monev
ff8033e1f1 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-06-01 12:37:59 +03:00
Ivailo Monev
37ee627773 kdeui: replace internal KPasswordDialog method with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-06-01 12:29:11 +03:00
Ivailo Monev
d28a9c8650 kdeui: drop the feature of KPasswordDialog to show known logins
it is usually one comming from KPasswdStore

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-06-01 12:23:08 +03:00
Ivailo Monev
1689a9288d kdeui: do not change the spin boxes suffix to empty one on value change from KIntNumInput and KDoubleNumInput
because suffix may be set via the KDoubleNumInput::setSuffix() overload
that takes QString argument

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-31 18:50:42 +03:00
Ivailo Monev
1d0d3598c7 kdeui: use KToolInvocation::startServiceForUrl() instead of spawning kde-open process in KWidgetJobTracker
kde-open does exactly the same - it calls
KToolInvocation::startServiceForUrl() with the URL as argument

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-31 05:10:06 +03:00
Ivailo Monev
22d6167ae8 kdeui: map properties for all widgets KConfigDialogManager supports
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-30 13:02:20 +03:00
Ivailo Monev
8364192b45 kdeui: map properties in KConfigDialogManager for all currently used widgets
the widgets used by kwin, gwenview and okular

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-30 04:03:24 +03:00
Ivailo Monev
cd0bf16803 kio: rework KIO::pixmapForUrl() to use KFileItem
for overlays and overall icon consistency (where possible, KHistoryComboBox
still cannot use it)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-28 10:16:47 +03:00
Ivailo Monev
2bfcabb4a4 kdeui: remove unused header inclusion
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-24 13:31:59 +03:00
Ivailo Monev
f9d58bcec1 kdeui: send notifications to plasma-windowed from KNotificationManager
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-24 13:30:03 +03:00
Ivailo Monev
bbf7da7475 kdeui: use foreach() for iteration in KTextEdit::contextMenuEvent()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-24 10:08:49 +03:00
Ivailo Monev
28995472b7 kdeui: send job data to org.kde.plasma-windowed
the same has to be done for application notifications

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 08:30:03 +03:00
Ivailo Monev
1b034764ad kdeui: KPlasmaJobTracker::registerJob() optimization
by not converting the QVariant (property) to QString and then back to
QVariant (implicitly)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 07:31:12 +03:00
Ivailo Monev
b643c2b0da kdeui: update comment in KDynamicJobTracker::registerJob()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 07:22:55 +03:00
Ivailo Monev
a2209be85f kdecore: return boolean from KJobTrackerInterface::registerJob()
so that classes that inherit from it and use D-Bus interfaces can return
true if the interface is not valid as may be the case for
KPlasmaJobTracker, that way KDynamicJobTracker will not have to create
QDBusInterface object to decide which tracker to use

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 17:48:49 +03:00
Ivailo Monev
06d8b39d5c kdeui: do not set the alignment of KIntNumInput and KDoubleNumInput
see the following commit in the Katie repo:
79236242c8dc7491898c5da8f29bcd1ab7b826c9

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 10:13:43 +03:00
Ivailo Monev
b3eee3d695 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 17:29:40 +03:00
Ivailo Monev
020f82e5d7 kdeui: choose default KIntNumInput and KDoubleNumInput alignment based on layout direction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 15:16:37 +03:00
Ivailo Monev
46f5e8cbc2 kdeui: drop KIntValidator and KDoubleValidator
by reworking KIntNumInput and KDoubleNumInput to set the locale of the
internal spin boxes (QSpinBox or QDoubleSpinBox) both of which use
either internal validator (QSpinBoxValidator for QAbstractSpinBox) or
validate via the locale

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 12:31:17 +03:00
Ivailo Monev
de27e20efc kdeui: KIntValidator and KDoubleValidator review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 10:14:07 +03:00
Ivailo Monev
1332872ba6 kdeui: KIntValidator and KDoubleValidator review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 09:51:21 +03:00
Ivailo Monev
f559d2b200 kdeui: simplify KIntValidator
KDoubleValidator rewritten also by me, see the following commit:
84ea11af90

thus copyright goes to me. also now KIntValidator uses the global
KLocale for validatation

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 09:41:08 +03:00
Ivailo Monev
27ae4b6288 kdeui: set the KIntNumInput and KDoubleNumInput validators range
otherwise the validators are unaware of the ranges, the old implementation
of the integer input widgets was not doing it (no wonder it was borked for
integers with base other than 10)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 09:23:31 +03:00
Ivailo Monev
bdf64f5e2c kdeui: implement step setter for KIntNumInput and KDoubleNumInput
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 07:36:57 +03:00
Ivailo Monev
5d3c498bc6 kdeui: setup KIntNumInput and KDoubleNumInput, connect the spin boxes to the sliders
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 06:59:17 +03:00
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
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
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
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
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
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
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
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
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
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
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
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
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