Commit graph

4737 commits

Author SHA1 Message Date
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
Ivailo Monev
686ba65a7e kdecore: drop redundant "para" markup tag
not used in plain context, same as "p" in rich context. also now Katie will
detect the paragraphs as rich text

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 00:39:06 +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
ae66400fc7 kdecore: drop redundant "nl" markup tag
not used in plain context, same as "br" in rich text

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-17 23:34:50 +03:00
Ivailo Monev
f1217c0e64 kdecore: likely KuitSemantics::format() branch optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-17 23:08:48 +03:00
Ivailo Monev
f8f390c86f kdecore: add "markup" section to the KLocalizedString documentation topics
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-17 23:08:26 +03:00
Ivailo Monev
abf1deffe0 kdecore: oops
automatic sycoca database was disabled while working on
70f9b2f953 for testing purpose

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-17 22:52:36 +03:00
Ivailo Monev
1c6ce50933 kdecore: drop support for overriding numbers localization via numid tag
fun fact: there is CLDR data for ~1000 languages and only ~50 use different
number system (not "latn")

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-17 22:08:20 +03:00
Ivailo Monev
224e42fc3a kdecore: remove unused KLocalizedStringPrivate::substituteSimple() argument
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-17 19:54:31 +03:00
Ivailo Monev
86025d2c8a kdecore: pass the number width and fill character to KuitSemantics from KLocalizedString
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-17 19:43:51 +03:00
Ivailo Monev
528f427c67 kdecore: adjust expected results in KLocalizedString tests
text with "&lt;" in it is considered as rich text by Qt::mightBeRichText()
as special case. also entities are not markup and shall not be handled by
KuitSemantics (there is a class for that - KCharsets). entity is used
only in one place (kde-workspace/kate/part/view/kateviewhelpers.cpp) and it
does not even need special handling by KuitSemantics. so, instead of
slowing the whole markup parsing with redundant and unused feature I've
decided to not support it and even improve Katie's Qt::mightBeRichText()
function

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-17 18:16:26 +03:00
Ivailo Monev
b7b65494a4 kdecore: KuitSemantics optimizations
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-17 14:47:37 +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
fd112713d1 kdecore: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 13:41:23 +03:00
Ivailo Monev
6133f1aaa9 kdecore: PCI IDs database update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 13:31:46 +03:00
Ivailo Monev
70f9b2f953 kdecore: fix KSycoca dummy strategy setup
the device was opened for reading only but for the version to be written
it has to be opened for writing too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 13:27:47 +03:00
Ivailo Monev
4e81bcde1c mimetypes: use text/plain as sub-class for application/x-kcsrc
so that the color schemes can be opened and edited via text editor by
default (the files are essentially INI files)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 23:53:11 +03:00
Ivailo Monev
2efb42147b kimgio: add rarely used jpeg header
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 22:54:58 +03:00
Ivailo Monev
8b9b1703aa kdecore: use QPair<T,T> instead of QList<T> for zone coordinates in KSystemTimeZones
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 19:55:07 +03:00
Ivailo Monev
b11d10492b kio: launch scheme handlers via KToolInvocation from KRun
generally KRun does not start processes as detached process and as soon as
the process is launched and KRun::finished() is emitted KRun is deleted,
that however means that when the program that used KRun to launch
something exits the launched program will be terminated. while in most
cases that is not an issue (for services that have valid path for example)
for `kde-open` it is because its lifetime is short and the command to
execute is obtained via KProtocolInfo::exec() (QString, not KService)

so, to launch the scheme handlers as detached process (because the
programs that handle such may not fork) KRun has to use KToolInvocation

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 15:05:30 +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
07de7723af plasma: replace use of QTime as timer with QElapsedTimer in Plasma::ScrollWidget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 02:10:11 +03:00
Ivailo Monev
468c9dc431 kdecore: KAboutLicense::byKeyword() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 01:42:07 +03:00