Commit graph

874 commits

Author SHA1 Message Date
Ivailo Monev
a68302abc1 kdeui: do not change the cursor theme from KGlobalSettings
in full Katana session it is done by the input KCM and even by the
`startkde` script (so that cursor theme applies for any error messages
shown via `xmessage`). as for changing after startup it is again done by
the input KCM (via `XFixesChangeCursorByName()` calls and other stuff), the
change even applies when not in Katana session (i.e. `systemsettings`
changes the cursor theme even if not in Katana session) so it is redundant
to do it from KGlobalSettings and only the notification signal has to be
emitted

on a side note style and palette are applied by the platform plugin (see
kde-workspace/qguiplatformplugin_kde/qguiplatformplugin_kde.cpp) when in
full Katana session meaning style and palette also do not have to
applied by KGlobalSettings but that is for another commit because there
are some other things to take in account (such as style override via
command line argument and initializing plugin paths early, before
KApplication is constructed)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:28:01 +03:00
Ivailo Monev
73717efd83 kdeui: apply double-click, drag, scroll, etc. settings on KGlobalSettings::SETTINGS_MOUSE notification
the input KCM (which changes mouse settings) emits that change so it makes
sense to apply mouse-related settings to the application when it is
emitted. also notfication for KGlobalSettings::SETTINGS_QT was never
emitted

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:18:06 +03:00
Ivailo Monev
6ace1d4cae kdeui: KGlobalSettings and KApplication friendship has been broken
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:14:38 +03:00
Ivailo Monev
0dd60b4e64 kdeui: deal with TODO related to KGlobalSettings::activate()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:02:41 +03:00
Ivailo Monev
ee6cd48109 kdeui: remove unused KGlobalSettings::SettingsCategory::SETTINGS_POPUPMENU enum
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 15:53:07 +03:00
Ivailo Monev
762d5413a0 generic: change the home, bug report and help URLs
fortunately I've made it that easy

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 20:01:46 +03:00
Ivailo Monev
1d2947b476 kdeui: KStartupInfoId::timestamp() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 01:02:48 +03:00
Ivailo Monev
a50c72de91 generic: drop support for startup notification via D-Bus service
just another way to do what ASN does, the KService::DBusWait mode was
not used too. with this change however all of the process setup code is
moved to a seperate class and the responsibility of KLauncher about ASN
is reduced (ASN now works better for process that fork but if application
claims ASN support and does not send ASN finish then the timeout will be
reached)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 19:53:14 +03:00
Ivailo Monev
32ac1e19f9 kdeui: drop now redundant KApplication hack
see the following commit in the Katie repo:
198625f679aabbe25097884ec0029bc55e0a84b8

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 00:40:20 +03:00
Ivailo Monev
09763a2377 kdeui: create the _NET_SUPPORTED atom on demand
fixes the "waitforwm" command line option
(KApplicationPrivate::parseCommandLine() was called before the X11 atom was
created and atom was invalid) and doubles as optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 00:27:11 +03:00
Ivailo Monev
f6e53fdb0b kdeui: update KDoubleValidator documentation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 18:22:23 +03:00
Ivailo Monev
cd3f388434 kdeui: remove bogus kconfig_compiler tests
I intend to rewrite kconfig_compiler at some point (possible to use JSON
format) and the tests will be done anew

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 00:18:45 +03:00
Ivailo Monev
9a5af1214b kdecore: reimplement KuitSemantics
is interesting how much simpler it can be by assuming that the tags are
strict and by using Qt::mightBeRichText() for the rich text detection.
while mostly compatible (entities are not converted, some tags were not
used and some even did not do anything) it is subject to optimization by
using QStringMatcher or other tricks (like using a separate tag for the
numbers precision)

overall - no regular expression matching, no XML parser is used and does
what the old implementation was doing but with less code. also passes
most tests (the exception is KLocalizedString test case that expect
entities to be replaced)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-17 01:43:12 +03:00
Ivailo Monev
9fee47106a kdeui: initialize KTimerDialogPrivate::buttonOnTimeout member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 15:51:24 +03:00
Ivailo Monev
437a488d1a kdeui: move private KTimerDialog members to private data pointer
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 15:44:06 +03:00
Ivailo Monev
e0d476372c kdeui: move KTimerDialog source and header from kde-workspace
there were 3 copies of it, only one with minor changes. by moving it
here any changes that have to be done to it will not have to be done to
the copies aswell.

TODO: move its private members to KTimerDialogPrivate

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 15:18:39 +03:00
Ivailo Monev
336d708b45 kdeui: remove KLineEdit TODO
done via 5333e9917d

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 12:06:44 +03:00
Ivailo Monev
d278c3c63c kdeui: new KDE_DEFAULT_CURSOR_THEME
to make it easy to change the default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 02:38:45 +03:00
Ivailo Monev
0d2c0aba3f kdecore: remove non-operational KLocalizedString::inContext() method
non-operational since 5185c917de

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 01:06:56 +03:00
Ivailo Monev
245a161cc8 kdeui: de-duplicate code in KIconEngine::pixmap()
QColor(0,0,0,0) is the same as QColor(Qt::transparent)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 23:19:29 +03:00
Ivailo Monev
86f370b395 kdeui: reimplement QIconEngine::iconName() from KIconEngine
this makes KIcon serializable by name (e.g. by KDBusMenuExporter) in
most cases, that however means lookup on the other end (if the icon pixmap
is not serialized it is essentially the same as calling QIcon::fromTheme()
on the other end of the serialization)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 23:15:40 +03:00
Ivailo Monev
f197e144ca kdeui: drop support for setting custom pixmap for KRatingPainter
KRatingPainter and KRatingWidget are currently not used but holding a
reference to a pixmap that can already be (and is) obtained from the icon
(constructing QIcon from pixmap is a thing) is just redundant

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 14:57:01 +03:00
Ivailo Monev
12b8b0b3ae kdeui: remove unused KAssistantDialog class
use QWizard instead

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 13:53:21 +03:00
Ivailo Monev
b3b190e6ae kdeui: raise and activate KMessageBox and queued KDialog windows
this is mostly for status notifier dialogs, if the dialogs are not raised
and activated they will block (because QDialog::exec() is called) and
manual activation has to be done (via alt+tab)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 02:02:58 +03:00
Ivailo Monev
37f9ea4dba kdeui: do not swap the order of the image bits in KStatusNotifierItemPrivate::imageToStruct()
does nothing but slow down the image serialization on little endian really,
the image data is not ment to be saved and passed around to other host

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 01:34:42 +03:00
Ivailo Monev
cc38aa13b0 kdeui: remove non-operational bits
Katie has the option to set printer properties and options anyway, as
for why the bits are non-operational - it is because of the version
check which is lower than the current Katie version

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 21:10:02 +03:00
Ivailo Monev
9945c07d7f kdeui: remove reference to non-existing KPasswordEdit class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 20:37:36 +03:00
Ivailo Monev
300da74a3f kdeui: drop support for restoring more than one KMainWindow-dervice classes
unused feature

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 12:12:59 +03:00
Ivailo Monev
d41b63de00 kdeui: initialize KUniqueApplication::Private member in the constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 11:49:05 +03:00
Ivailo Monev
c0379cc431 kdeui: remove unused KGlobalSettings methods
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 11:46:24 +03:00
Ivailo Monev
fa51ecdfaf kdecore: remove unused KAboutData methods and redundant constructor arguments
the homepage and the bugs email address shall always be defined in
kglobalsettings header for official Katana applications, libraries, etc.
the option to override them is still a thing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 17:41:54 +03:00
Ivailo Monev
bd063c8b56 generic: remove dead and irrelevant links references
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 14:26:19 +03:00
Ivailo Monev
be9d8967f7 kdeui: remove redundant KGlobalSettings::desktopGeometry() methods
QDesktopWidget is Xinerama aware and it can be disabled because I
implemented option for that, see the following commit in the Katie repo:
b7e4bae65f0cae7f3029b98980f638c077ecfc22

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 03:58:14 +03:00
Ivailo Monev
a2101eec56 kdeui: remove invalid KIconLoader resource directory
considered - nothing installs icons in such directory

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 03:08:36 +03:00
Ivailo Monev
5c61e288e5 kdeui: remove unused kiamgeframe source and header files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 18:32:25 +03:00
Ivailo Monev
65bedeae01 kdeui: return a single format type from KImageIO::typeForMime() and add mode argument for it
because it returns only one (definitive) format type using QStringList as
return type makes no sense, also a mode argument is very much required to
return correct result - not all image format plugins support writing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 17:57:18 +03:00
Ivailo Monev
0c2a65b0e9 kdeui: focus the first KNewPasswordDialog password widget on initialization
much like KPasswordDialog which does a lot of focus tricks depending on
its flags and which widgets are to be shown

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 16:11:09 +03:00
Ivailo Monev
1da5e17b82 kdeui: replace tab with spaces in KXMLGUIFactoryPrivate::saveDefaultActionProperties()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-06 06:16:53 +03:00
Ivailo Monev
a31aa23230 kdeui: rename variable for consistency
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 13:04:48 +03:00
Ivailo Monev
fc7f5206d2 kdeui: minor KCrash documentation review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 11:54:44 +03:00
Ivailo Monev
0f7d9f8ea3 kdecore: setup KCrash to log to the system log, update its documentation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 11:51:35 +03:00
Ivailo Monev
6bf6169caf kdecore: return QByteArray from kBacktrace()
to avoid conversion from QString to QByteArray when possible, the trace is
handled as array of latin1-encoded strings anyway

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 08:14:53 +03:00
Ivailo Monev
2647be1ab2 kdeui: KCrash rewrite
a crashed program trying to restart itself is very unreliable,
especially program that uses KUniqueApplication instance. so, instead
all the information about the crash shall be written to a file on the
disk (in the temporary directory) and read by external kcrash KDED
module that will report the crash (possibily even upload the crash
details somewhere) and restart the program as necessarry.

this also opens up possibility for per-application configuration for
things such as the automatic restart feature but that shall be done by the
kcrash KDED module instead (parsing a config from a crashed program is
not a good idea)

KCrash::NoRestart will be unused but kept for future expansion

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-03 11:21:41 +03:00
Ivailo Monev
358840b6a1 kdeui: remove unused QSessionManager header inclusion
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-03 07:30:35 +03:00
Ivailo Monev
9642bc3d81 kdeui: handle zero time as special case in KTimeEdit and better min/max
the plasma frame applet for example uses zero time (QTime(0, 0, 0), not
invalid time) as a special for case for "never" (i.e. don't update) so
having this feature will make KTimeEdit even more suitable for timers (that
ofcourse has to be handled by the application or library, zero time timers
are a thing)

also min/max now allows to set lower seconds (for example) when the minute
is not zero instead of just restricting the seconds value to a hard-minumum
altough that makes me think a step feature may be needed (e.g. to now allow
intervals less than two seconds with minimum of one second)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-03 05:58:23 +03:00
Ivailo Monev
643efdc576 kdeui: remove forward-declaration of non-existing KDoubleLine class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 23:11:20 +03:00
Ivailo Monev
4de3537a82 kdeui: new KTimeEdit widget
inspired by QTimeEdit but ment for timers

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 13:14:24 +03:00
Ivailo Monev
b323e4a95d kdeui: remove forward-declaration of now non-existing KCalendarWidgetPrivate class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 12:19:10 +03:00
Ivailo Monev
7d088288c2 kdeui: remove redundant X11 atoms creation from KApplicationPrivate::init()
XdndDrop is already created by QApplication for internal purposes,
KDE_DESKTOP_WINDOW is a bogus one

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 08:32:37 +00:00
Ivailo Monev
899f789b07 kdecore: move KToolInvocation to kdeui
to get rid of the KApplication signal which is a hack really

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 08:09:02 +00:00