Commit graph

523 commits

Author SHA1 Message Date
Ivailo Monev
3d311955ab kdeui: drop KRichTextEdit and KRichTextWidget
because KTextEdit inherits QTextEdit it is rich text-capable and the
actions that KRichTextEdit and KRichTextWidget provide are not used
anywhere (the actions require explicit setup)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-06 21:01:01 +03:00
Ivailo Monev
bac4fbc947 kutils: do not lookup TXT records from KDNSSD
irrelevant to it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-06 16:52:45 +03:00
Ivailo Monev
6d1d1b7112 kutils: sync password store on write
in case kded crashes for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-30 14:08:53 +02:00
Ivailo Monev
cf842d6705 kutils: ensure the initial KDecompressor buffer size is never zero
fixes decoding of long xz data

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-23 08:51:49 +02:00
Ivailo Monev
75b9cfddd3 generic: const-ify private data pointers where copying is disabled
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-23 06:49:59 +02:00
Ivailo Monev
39ebfa6fd4 kutils: disable copying of KEMailSettings
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-23 06:49:09 +02:00
Ivailo Monev
70d01331b7 kutils: KCompressor and KDecompressor optimizations
notably for the case of processing data multiple times with the same
KCompressor/KDecompressor object

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-22 12:25:43 +02:00
Ivailo Monev
6063b39cb2 kutils: easier to change KDecompressor limit
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-22 12:18:41 +02:00
Ivailo Monev
ecd08e8f97 kutils: remove reference to dead links
have to keep an eye on those, servers tend to die

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-22 01:46:50 +02:00
Ivailo Monev
6b5605a0a0 kutils: KDecompressor optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-21 19:10:31 +02:00
Ivailo Monev
b9deac7325 kutils: use KSettings to get the cookie type from getCookie() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-21 04:01:23 +02:00
Ivailo Monev
1a3f533744 kutils: do not reparse the kpasswdstore config on get and set
with password stores being giant-locked (so that opening password stores
happens once even with multiple attempts to open before the first has
finished) it can be assumed that kpasswdstore has not been tempered with
even tho that may not hold true (it can be manually edited via text editor
but do not expect support for that)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-21 03:56:04 +02:00
Ivailo Monev
5064d34b04 kutils: correct placeholders in getLockName() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-16 21:20:41 +02:00
Ivailo Monev
a72d1f48ce kutils: adjust to Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-11-05 00:29:10 +02:00
Ivailo Monev
47c8c442c2 kutils: rename kpasswdstore data file
not ending with "rc" as such files are config files while the kpasswdstore
is stored data file (like kweatherdata of plasma weather applet)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-23 12:18:46 +03:00
Ivailo Monev
e5557c33dc kutils: set the audio-client-name property for KAudioPlayer and KMediaPlayer to the player ID
see the mpv options manual about it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-20 16:18:36 +03:00
Ivailo Monev
c4ae9e0460 kdecore: save lock files in the global temporary directory
O_CLOEXEC won't do it but saving the locks in /tmp or other directory that
is purged across reboot will remove stale locks

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-09 21:16:04 +03:00
Ivailo Monev
086e08f00a kutils: start counting from 1 in KPowerManagerInhibitImpl::Inhibit()
because 0 should be invalid cookie, much like the inhibition cookie of the
org.freedesktop.ScreenSaver interface

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 16:56:56 +03:00
Ivailo Monev
9195193191 kutils: log debug messages when there is no valid inhibition interface
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 16:33:03 +03:00
Ivailo Monev
a39e7777ea kutils: show notification after switching power management profile
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 04:00:12 +03:00
Ivailo Monev
e482da9067 kded: rework phases logic to take any desktop session into account
much like XDG autostart except for KDED modules, requires adjustments to
modules that are automatically loaded in phase-1

in the future the logic may apply not only to modules during startup but
also when attempting to load a module in general

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 23:01:34 +03:00
Ivailo Monev
099f49db36 generic: replace QLabel with the new KPixmapWidget class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-29 18:06:09 +03:00
Ivailo Monev
6f03a3127c kutils: typo
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-27 03:09:25 +03:00
Ivailo Monev
856b853b89 kutils: de-duplicate KAudioPlayerModule code
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 20:15:29 +03:00
Ivailo Monev
4a40419a35 kutils: disable copying of KAudioPlayer, KMediaPlayer and KMediaWidget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 17:15:38 +03:00
Ivailo Monev
11f6e4b586 kutils: set the ID of the KAudioPlayer from the KDED module
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-25 22:08:15 +03:00
Ivailo Monev
450120097d kdeui: reimplement KNotification
cleaning up the mess, everything but KNotificationConfigWidget is
implemented.

not only does it not require additional D-Bus service (knotify) to
function but also does not transmit pixmaps over D-Bus, the features
to execute command or log to file are dropped and will not be
implemented.

also about markup support in notifications - if the server does not
support markup then it is supposed to strip it, see the spec:
https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#backwards-compat
meaning nothing should be done by KNotification itself because it is not
a server, it is just a proxy.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-25 09:01:39 +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
553608ca41 kutils: someone's typo
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 18:25:19 +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
6a07ac897c kutils: typos
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 16:17:27 +03:00
Ivailo Monev
b596272f8a kutils: static analyzer warning fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 14:50:34 +03:00
Ivailo Monev
6d0274d417 generic: adjust to Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-06 23:37:03 +03:00
Ivailo Monev
e7611274fb kutils: add comment for the governors mapping in governorForProfile() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-06 07:20:00 +03:00
Ivailo Monev
b8b9e2c204 kutils: add assert for the poller in KIdleTimePrivate::loadSystem()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-06 07:10:56 +03:00
Ivailo Monev
2b9b3c8d54 kutils: remove redundant Q_WS_X11 definition checks
if xscreensaver or xsync extension is not found it is most likely because
X11 is not found

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-05 22:01:27 +03:00
Ivailo Monev
d16c67d15b kutils: log which poller is used by kidletime and warn when there is none
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-05 21:50:56 +03:00
Ivailo Monev
8eb0c751b8 kutils: log kidletime messages to special area
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-05 21:36:22 +03:00
Ivailo Monev
4a09dd4dad kutils: use separate build file for kidletime library
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-05 21:34:06 +03:00
Ivailo Monev
9b64878a8d kutils: do not use org.freedesktop.ScreenSaver in kidletime
the current org.freedesktop.ScreenSaver implementation actually uses
kidletime internally

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-05 21:18:59 +03:00
Ivailo Monev
48e591141b kutils: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 10:21:57 +03:00
Ivailo Monev
833951fbc3 kutils: remove unused KPluginSelector methods
no application installs kpart plugins either

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 09:31:17 +03:00
Ivailo Monev
cd3cd80d2f kutils: use KUrlRequester as editor for the attachments in KEMailDialog
so that files (attachments) can be conveniently chosen via a file dialog

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-29 23:55:32 +03:00
Ivailo Monev
e028b183a8 kutils: remove unused kdeglobals kcfg files
other than having it around to track what entries kdeglobals has
there is no other purpose for it, I can just use the grep.sh script
from the main Katana repo to look for kdeglobals config references tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-29 09:28:49 +03:00
Ivailo Monev
1a45508306 kdecore: reimplement KLocale
by using QLocale in KLocale and separating the date, time and numbers
conversion from translation KLocale actually gets extended locale
support from QLocale (which uses CLDR data v43 currently). translation
remains unaffected. for comparison here is the result of two function
calls the result of which should explain the whole change:
KLocale::allLanguagesList().size() = 669
KLocale::installedLanguages().size() = 68

the first number is locales Katie supports, the second being the
number of languages Katana is translated into

KSwitchLanguageDialog needs a rewrite but that is on the TODO

also copyrighting KCatalog to me because I rewrote it, for reference:
881b47b8ea

KCalendarSystem gets the middle finger - batteries not included for date
and time. extra calendar systems can, but are unlikely to be, supported
in the future

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-26 23:50:18 +03:00
Ivailo Monev
8cf2ae7bc2 generic: drop floppy support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-14 06:30:29 +03:00
Ivailo Monev
c4d7fcfaa8 kdecore: drop reliance on wheel group for KAuthorization helpers
groups are obsolete thing (e.g. disk, optical, power, etc.)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-10 02:54:21 +03:00
Ivailo Monev
f3b9c12f45 kutils: remove unused KCModuleInfo::Private member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-10 00:17:37 +03:00
Ivailo Monev
f6e2452250 kutils: remove unused QMap header inclusion in kded_knetworkmanager header
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-10 00:08:14 +03:00
Ivailo Monev
c12c142ccc kutils: better Exif orientation detection
Exiv2::orientation() checks for 12 keys in total returning the first found

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