Commit graph

938 commits

Author SHA1 Message Date
Ivailo Monev
696545b1ac kdeui: skip KColorButton tests if 40.color file is not found
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 02:02:20 +03:00
Ivailo Monev
6f106c7068 kdeui: check aliases from KImageIO::isSupported()
because MIME strings (those from shared-mime-info package for example)
tend to change and exact MIME string match is unreliable

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 01:14:44 +03:00
Ivailo Monev
fa0eed0087 kdeui: do not set icons for separators from KDBusMenuImporter
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 00:57:07 +03:00
Ivailo Monev
1f2f01be55 kdeui: better KIconEngine::availableSizes()
expensive as it may be it is more reliable check if the icon is actually
available than QIcon::isNull() (for system icons anyway)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 22:43:10 +03:00
Ivailo Monev
ba2d781573 kdeui: implement availableSizes() for KIcon
it is actually implemented in the underlaying icon engine (KIconEngine)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 20:50:09 +03:00
Ivailo Monev
0f50ef0a87 kdeui: KIconEngine::pixmap() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 20:48:55 +03:00
Ivailo Monev
58dfa5c884 kdeui: keep reference to the QByteArray object in x11SetCursorName() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 05:44:17 +03:00
Ivailo Monev
b4657deb95 kdeui: new KGlobalSettings signal and enum for global config change
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 04:28:15 +03:00
Ivailo Monev
24f8640acd kdeui: simplify KGlobaSettings and do not setup mouse from it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 23:32:43 +07:00
Ivailo Monev
948a17ffb0 kdeui: partially revert 3dbd7b1da9
lots of work to be done on that one so for now just apply the palette

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 08:48:21 +07:00
Ivailo Monev
535ac857be kdeui: do not prefix the KDBusMenuImporter virtual method calls
otherwise the (possible) reimplementation is not called

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 18:56:43 +03:00
Ivailo Monev
3dbd7b1da9 kdeui: do not apply style and palette from KGlobalSettings
palette and style shall be applied by the platform plugin, the font is
independant of the full Katana session (look for
KGlobalSettings::generalFont() for example, font from config is used here
and there because the config and thus KGlobalSettings offer fine grained
font selection for different purposes)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 17:42:31 +03:00
Ivailo Monev
c1015be8c8 kdeui: remove reference to non-existing kDebugCleanup() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:51:53 +03:00
Ivailo Monev
791e27f106 kdeui: sync getKLauncherError() with KLauncher
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:46:08 +03:00
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