Commit graph

171 commits

Author SHA1 Message Date
Ivailo Monev
1efda255a2 kdeui: KKeyServer::modToString() function optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 19:56:21 +03:00
Ivailo Monev
bdcac11bc5 kdeui: initialize static variables in kkeyserver source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 19:54:22 +03:00
Ivailo Monev
8994ef1ef3 kdeui: remove unused variable in KKeyServer::stringUserToMod() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 19:53:07 +03:00
Ivailo Monev
0f6d7ebd2d kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 19:52:23 +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
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
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
f6e53fdb0b kdeui: update KDoubleValidator documentation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 18:22:23 +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
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
Ivailo Monev
a31aa23230 kdeui: rename variable for consistency
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 13:04:48 +03:00
Ivailo Monev
fc7f5206d2 kdeui: minor KCrash documentation review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 11:54:44 +03:00
Ivailo Monev
0f7d9f8ea3 kdecore: setup KCrash to log to the system log, update its documentation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 11:51:35 +03:00
Ivailo Monev
6bf6169caf kdecore: return QByteArray from kBacktrace()
to avoid conversion from QString to QByteArray when possible, the trace is
handled as array of latin1-encoded strings anyway

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 08:14:53 +03:00
Ivailo Monev
2647be1ab2 kdeui: KCrash rewrite
a crashed program trying to restart itself is very unreliable,
especially program that uses KUniqueApplication instance. so, instead
all the information about the crash shall be written to a file on the
disk (in the temporary directory) and read by external kcrash KDED
module that will report the crash (possibily even upload the crash
details somewhere) and restart the program as necessarry.

this also opens up possibility for per-application configuration for
things such as the automatic restart feature but that shall be done by the
kcrash KDED module instead (parsing a config from a crashed program is
not a good idea)

KCrash::NoRestart will be unused but kept for future expansion

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-03 11:21:41 +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
673a5e02bd kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-29 01:09:29 +03:00
Ivailo Monev
f2badd9016 kdeui: do not pass KIconLoader pointer to KIcon in KGuiItem::icon()
same as not passing one

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 00:15:40 +03:00
Ivailo Monev
6a84ebfe95 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 00:11:37 +03:00
Ivailo Monev
81dea86d7c kdeui: KPassivePopup::defaultArea() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 00:00:49 +03:00
Ivailo Monev
ecb617b9c8 kdeui: minor KPixmapSequence optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-18 23:53:48 +03:00
Ivailo Monev
d24e1c1437 kdeui: replace private KPassivePopupMessageHandler methods with their body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-18 23:44:53 +03:00
Ivailo Monev
502164e5be kdeui: remove redundant KeyRelease undef
the inclusion of fixx11h fixes the clashes, KeyRelease is not used in the
source file too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-16 18:36:12 +03:00
Ivailo Monev
e978590acd generic: define KDE_DEFAULT_DEBUG_AREA in the main build file for each library
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-09 23:43:20 +03:00
Ivailo Monev
669c8caa3b generic: format kimageio and krecentdirs source/header files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-05 02:47:05 +03:00
Ivailo Monev
ccb168fe34 generic: consistent headers inclusion
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-02 23:59:34 +03:00
Ivailo Monev
58279dcba2 kdeui: remove unused KPixmapSequenceOverlayPainter::Private class member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-02 23:59:01 +03:00
Ivailo Monev
dbb1f533e0 kdeui: KPixmapSequenceOverlayPainter optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-02 23:54:16 +03:00
Ivailo Monev
6e549c55ff kimgio: drop TIFF write support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-05-22 17:27:52 +03:00
Ivailo Monev
b3e9998d8c kimgio: fix TIFF images reading and implement write
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-05-22 07:54:18 +03:00
Ivailo Monev
7cfcbc3775 kdeui: new KCrash::Backtrace to log backtraces
for programs that cannot call drkonqi to show backtrace (such as
ksmserver or any non-GUI D-Bus service)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-09 12:28:21 +02:00
Ivailo Monev
bdff3fa4e7 kdeui: log backtrace when no KCrash flags are set
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-09 12:17:48 +02:00
Ivailo Monev
717fd59dc8 kdeui: send only SIGTERM before killing the selection owner via XKillClient()
XKillClient() is the same as sending SIGKILL

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-09 09:24:33 +02:00
Ivailo Monev
f27ab85ce6 kdeui: correct breaks indentation in KPixmapSequenceOverlayPainter::eventFilter()
they look really out of place, don't they?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-08 13:16:20 +02:00
Ivailo Monev
802bf9aaf1 kdeui: KPixmap documentation correction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-08 13:12:30 +02:00
Ivailo Monev
6c98720e24 kdeui: implement KCrash::NoRestart flag
for programs that cannot be restarted by simply exec-ing them such as the
KIO slaves which require application socket as argument

note that restarting is maybe works thing - programs started by kdesudo
cannot be restarted (properly) as they are exec-ed by other program that
does the setup for them to function the way they should

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-08 00:36:35 +02:00
Ivailo Monev
d4bf3d7a70 kdeui: exit after logging error when drkonqi is not installed
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 08:54:32 +02:00
Ivailo Monev
41418cb12b kdeui: set the KCrash handler to the default one if command line args are not initialized
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 08:33:04 +02:00
Ivailo Monev
6896f96245 kdeui: check if the KCmdLineArgs pointer is non-null before using it
fixes possible crash (e.g. when KCmdLineArgs is not initialized)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 07:49:43 +02:00
Ivailo Monev
d258df3881 generic: unblock signals when setting handlers for them
generally, those signals should not be blocked but it seems something is
blocking consequent SIGSEGV signals send by `kill` for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 07:45:25 +02:00
Ivailo Monev
be2d99738e kdeui: use system() instead of QProcess to execute drkonqi
less things can go wrong

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 07:14:26 +02:00
Ivailo Monev
b3d1569867 kdeui: tag comment as note in KCrash::defaultCrashHandler()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 23:16:46 +02:00
Ivailo Monev
b447c353a7 kdeui: log error in case neither of the KCrash flags is set
since any message type can be set to log via syslog() that may be the only
way to know when a program without interface (such as service) crashes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 04:23:05 +02:00
Ivailo Monev
ef0dd41a12 kdeui: do not assume XDisplayString() and getenv() return non-null
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 00:45:26 +02:00
Ivailo Monev
aa6b5ea4f0 kinit: klauncher and KCrash rewrite
much simpler and easier to maintain, also it will be proper D-Bus
service now with no sockets, process title hack and whatnot. KCrash
and startkde script (in kde-workspace repo) have to be adjusted for
it tho

note that the internal KIO scheduler already has the functionality to
put slaves on hold but now they will be started as detached process.
eventually they may become plugins (they are loaded as such by kioslave
program) without event loop dispatcher

fixes application startup notification (ASN) and cleanup issues

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-04 23:20:15 +02:00
Ivailo Monev
b7e58ab6e8 kdeui: replace tab with space in KPassivePopup::setPopupStyle()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-22 23:15:33 +02:00
Ivailo Monev
ce11071465 kdeui: tune KSelectionOwner check time
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-16 03:48:33 +02:00
Ivailo Monev
118be95512 kdeui: pass the screen root window to NETWinInfo constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 16:49:00 +02:00
Ivailo Monev
cf78624887 kdeui: add new KSelectionOwner::currentOwnerWindow() method to query the current selection owner
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 07:29:15 +02:00
Ivailo Monev
8ea7b7bfbc kdeui: do not automatically release the selection when it is lost
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 07:21:45 +02:00