Commit graph

4552 commits

Author SHA1 Message Date
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
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
625373ffa8 kdecore: drop KDateTime
with the rewrite (see f452e2e50b),
KDateTime is just glue-code for compatibility now. the exception is
KDateTime::isNightTime() (written by me) which is used only in one place
(kde-workspace/plasma/dataengines/weather/ions/wetter.com/ion_wettercom.cpp)
and can be moved there

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-14 22:35:08 +03:00
Ivailo Monev
3fc6433561 generic: make it possible to build from the source directory
after lots of build system changes (including this commit) it is
finally possible

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-14 20:35:59 +03:00
Ivailo Monev
da2cb4b848 plasma: do not check if the current "requires configuration" state matches from Plasma::Applet::setConfigurationRequired()
because the message overlay is used for both (error) messages and to show
configuration button (with optional message) and the overlay may have to
be recreated to override the one previously setup by
Plasma::Applet::showMessage() (e.g. when an applet is created, message is
shown and then a configuration overlay but with the internal "requries
configuration" state not changing)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-14 16:17:47 +03:00
Ivailo Monev
c3a344c4af plasma: check the display outside the loop in Plasma::DialogShadowsPrivate::freeX11Pixmaps()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-14 14:49:53 +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
c0f69bf109 kdewidgets: remove unused picture
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 20:38:47 +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
6d9beb3591 generic: remove useless AUTHORS files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 20:12:17 +03:00
Ivailo Monev
3b4c47d967 kdecore: remove bogus test code
checking for directory existing via QFile::exists() is bogus, also Katana
does not install files in such directory

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 18:40:38 +03:00
Ivailo Monev
553608ca41 kutils: someone's typo
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 18:25:19 +03:00
Ivailo Monev
3ad6579891 kdecore: findLibraryInternal() function optimization
by checking if the unmodified (by makeLibName()) name is absolute first and
by not checking for relative library (if the name is not absolute path
QFileInfo::path() would return "." resulting in a relative lookup for
the library by KStandardDirs::findResource() in "lib" resource) the most
common cases are only looked for by KPluginLoader (either absolute path,
relative module or library but not relative to the current directory)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 18:02:33 +03:00
Ivailo Monev
fe00f4058f kdecore: remove TODO related to KPluginLoader
the property shall not be removed

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 17:27:32 +03:00
Ivailo Monev
59b1d3da2d kdecore: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 17:14:38 +03:00
Ivailo Monev
4d01af27ee kdecore: remove unused KPluginFactoryPrivate member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 17:06:17 +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
7dee8c8183 kdecore: remove TODOs for KAboutData enums
unless KAboutLicense is merged into KAboutData that cannot happen because
KAboutData has getters that use the enums

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 11:52:31 +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
c6c05c10b4 kdecore: use KStandardDirs::locate() to check for the existence of catalogs
the catalog file must exist, not just the directory

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 09:30:35 +03:00
Ivailo Monev
ca00fba4ed kdecore: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 21:03:14 +03:00
Ivailo Monev
ab05f3c60d kdecore: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 20:47:11 +03:00
Ivailo Monev
d181c8678c kdecore: do not deep-copy the QString objects in KAboutData::translators()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 20:10:09 +03:00
Ivailo Monev
d55f6589fb kdecore: remove custom license support leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 20:08:54 +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
31553f8958 mimetypes: add KWin window rules MIME type
to be used by kwin rules KCM

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 10:28:23 +03:00
Ivailo Monev
9472a51e80 generic: version bump
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 23:13:36 +03:00
Ivailo Monev
6a07ac897c kutils: typos
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 16:17:27 +03:00