Commit graph

4713 commits

Author SHA1 Message Date
Ivailo Monev
d51ed7beb4 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 15:53:28 +03:00
Ivailo Monev
35d700e9b6 kdeui: assume that the platform plugin has set the starting drag distance
the default of the platform plugin is QApplication::startDragDistance() too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 05:01:28 +03:00
Ivailo Monev
7408814734 kdeui: cache some fonts via QApplication
bonus points for setting fixed font for QTextEdit and QPlainTextEdit by
default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 04:42:50 +03:00
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
79b9c8d634 kutils: check if there is plugin for the images from the KExiv2 test
fixes test failures in case the jpg plugin is not installed

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 01:43:38 +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
3b5777a92a kdeclarative: KIconProvider::requestPixmap() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 22:11:37 +03:00
Ivailo Monev
0834b257bf kdeclarative: fix possible crash
in case the id is not valid

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 21:54:22 +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
d281fc7b64 kdecore: create the initial KTimeZone transition date in UTC spec
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 00:15:19 +07: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
e741648f6e kded: do not assume prefixing the menu with XDG_MENU_PREFIX will result in valid menu file
if the menu file is uninstalled for example but XDG_MENU_PREFIX is still
set the menu becomes invalid

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 08:41:27 +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
998d57874d kio: use QString instead of KUrl as argument for KFileMetaDataPlugin::metaData()
for performance reasons (to not convert KUrl to QString from each plugin)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 00:34:54 +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
7694eb70ba kdecore: bump ksycoca version
because a50c72de91

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 19:30:40 +03:00
Ivailo Monev
8bc18c9962 kdecore: do not output entities from KCmdLineArgsStatic::parseAllArgs()
the output goes to the TTY and there is no rich text handler there, note
that the plain format for the "email" tag also contained entities (even
before the KuitSemantics reimplementation)

because the plain format for the "email" tag

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 19:20:12 +03:00
Ivailo Monev
2e0b2056c8 generic: update KDELibs4Config documentation, remove unused variables
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 18:22:52 +03:00
Ivailo Monev
14b62a7d3d kio: implement interface to change the "StartupWMClass" key of .desktop files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 03:03:09 +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
f56c50e41a kdecore: drop redundant "emphasis" markup tag
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 23:28:54 +03:00
Ivailo Monev
f8e1de3728 kio: reimplement KService::DBusUnique
by using properties defined in the spec (see
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html)
what KService::DBusUnique (or X-DBUS-ServiceName and X-DBUS-StartupType)
was used for can be implemented but the difference is now standard
properties can be filled (with values that are correct) and (ab)used for
the same purpose, bonus points?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 22:34:44 +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
64e890cc1a kinit: read the launch timeout from klaunchrc
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 01:16:26 +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
ddc3476e83 kdecore: KuitSemantics::format() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 23:38:25 +03:00
Ivailo Monev
5e6bc849e0 kdecore: break once format matches the context in KuitSemantics::format()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 23:31:36 +03:00
Ivailo Monev
76ced36171 kdecore: KuitSemantics::format() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 20:04:16 +03:00
Ivailo Monev
4049764b2f kdeclarative: implement depth() and hasAlphaChannel() getters for QImage
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 19:47:51 +03:00
Ivailo Monev
e4a7b266fe kdeclarative: minimal QLocale type binding
to be used for KLocale::toLocale() binding and possible more (QLocale
can now be constructed in .qml files and more importantly it will have
getters)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 19:31:46 +03:00
Ivailo Monev
591849f4e2 kdecore: KLocalizedString documentation review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 18:55:51 +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
07660bf9cd kio: drop support for X-KDE-WMClass and X-KDE-StartupNotify
see the following commit in kde-workspace repo:
f1f6ae7a3ec35e289df1f45cd47e71bd3c696fbe

on a side note the default for StartupNotify should probably be false as it
is unknown if the application actually supports startup notification is one
of the reasons why currently KLauncher does more than merely set an
environment variable and assume applications know what to do with it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 18:21:58 +03:00
Ivailo Monev
53cef8e793 kdecore: break the tag search on bogus tag in KuitSemantics::format()
because the tag will not be replaced in that case and will result in
infinite loop otherwise

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 01:02:51 +03:00
Ivailo Monev
cef5ea6e46 kdecore: drop non-operational "application" markup tag
it was not applying any formatting before the reimplementation thus it is
simply redundant

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 00:55:14 +03:00