Commit graph

1074 commits

Author SHA1 Message Date
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
Ivailo Monev
59f92c0970 generic: compiler warning fixes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-03 20:21:35 +03:00
Ivailo Monev
bd9f76451d generic: remove redundant metatype registrations
builtin

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-03 02:17:57 +03:00
Ivailo Monev
dcb57aa69a kdeui: manually delete the dialog in KMessageBox::createKMessageBox()
Qt::WA_DeleteOnClose can have some unforseen consequences

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-02 08:57:44 +03:00
Ivailo Monev
aeef583555 kdeui: unregister any registered jobs from KPlasmaJobTracker destructor
this is so that jobs are not left in the plasma applets as active when, for
example, the program that has jobs registered is interrupted by a signal
(be that ctrl+c or something nasty like SIGSEGV). KUiServerJobTracker
was just warning about it but I can do better

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-01 06:48:43 +03:00
Ivailo Monev
f44fc1ee8d kdeui: tweak KMessageBox layout
with a fixed-size contstraint the stretch factor bits are redundant

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 23:33:31 +03:00
Ivailo Monev
0e4e6a717f kdeui: import action collection configuration when adding one to KShortcutsDialog
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 23:02:11 +03:00
Ivailo Monev
faaf690e9e kdeui: use fixed-size size constraint for KMessageBox dialogs
effectively reverting 4ed10bdd76 but with a
twist

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 22:44:17 +03:00
Ivailo Monev
072673d082 kdeui: delete the KMessageBox dialog on close
what if the dialog is closed between show and exec by the window manager
tho?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 22:35:38 +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
53dc9fede5 kdeui: enable opening of external links for KMessageWidget and disable text selection
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 21:31:32 +03:00
Ivailo Monev
e86c7d9264 kdeui: warn and restore the property text when changing property in KDebugger
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 08:58:29 +03:00
Ivailo Monev
2a566aa4d0 kdeui: rework KMessageBox layout
finally it is not scuffed

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 08:24:48 +03:00
Ivailo Monev
78232470de kdeui: always use QTextBrowser for the details text
otherwise the look and feel is not consistent

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 07:49:07 +03:00
Ivailo Monev
0360088d1e kdeui: do not use KSqueezedTextLabel in KMessageBox
because the message may be rich text, see the previous commit

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 07:46:22 +03:00
Ivailo Monev
1c4fa8c32a kdeui: add warning about KSqueezedTextLabel
reminds me of surrogates chopping in QString..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 07:40:55 +03:00