Commit graph

24 commits

Author SHA1 Message Date
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
1e3041061a kdecore: fix regression since 0b9281b360
also adjust KLocalizedString test case, "Job" is no longer translated
string in the source code thus not in the french translation

on a side note there are KLocale tests all around - KLocalizedString, KIO
tests, etc. so perhaphs only quircks should be tested by the KLocale
specifiec tests

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 06:02:28 +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
e5f56675d2 generic: call QCoreApplication::applicationName() as static method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 01:19:01 +03:00
Ivailo Monev
39f0466cac kdecore: convert the QString to QByteArray only once in KGlobalPrivate::initFakeComponent()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-11 09:40:37 +02:00
Ivailo Monev
1039216fd8 kdecore: delete the KDETranslator instance from removeKDETranslator() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-10 14:53:35 +02:00
Ivailo Monev
0b9281b360 kdecore: install and remove KDETranslator via constructor/deconstructor functions
it has to be done only once (because it calls global static to translate),
does not have thread requirement (QCoreApplication locks when installing
or removing translator) and it checks if KGlobal has locale via
KGlobal::hasLocale() to ensure it is not attempting to call
KGlobal::locale() after KGlobal destruction

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-10 06:51:36 +02:00
Ivailo Monev
b8b37e01a3 kdecore: actually install the KDETranslator
was non-operational code due to QT_NO_TRANSLATION being defined in the
kglobal source file for some reason, it has a huge impact on performance
ofcourse because anything Katie will attempt to translate will go trough it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-02 11:02:51 +02:00
Ivailo Monev
894a2d52bb kdecore: remove KLocale getters related to text codec
see the comment in KLocalePrivate::initEncoding()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-30 20:00:04 +03:00
Ivailo Monev
29a8459798 generic: remove checks for system headers that should be present
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-23 15:42:09 +03:00
Ivailo Monev
1c1bab4da8 generic: do not initialize QAtomicInt and QAtomicPointer<T> via assignment
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-30 22:07:52 +03:00
Ivailo Monev
3422ca4413 generic: get rid of KGLobal::staticQString()
global statics are static objects and the method is using one

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-18 19:49:54 +02:00
Ivailo Monev
d00c56fe0b generic: adjust to Katie changes
also fixes build with QT_NO_TRANSLATION, symbols will not exists in the
library even if QT_NO_TRANSLATION is undefined and redefined

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2020-11-29 02:25:45 +00:00
Ivailo Monev
949dff9e92 generic: misc cleanups
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-10-19 03:32:06 +00:00
Ivailo Monev
3e06b05004 generic: use QAtomicInt/QAtomicPointer instead of QBasicAtomicInt/QBasicAtomicPointer
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-09-30 23:37:55 +00:00
Ivailo Monev
c334b5b1b0 kdecore: remove overload for KGlobal::staticQString()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-05-26 15:51:32 +00:00
Ivailo Monev
656489f1d7 kdecore: remove redundant constructor function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-04-22 10:58:34 +00:00
Ivailo Monev
af1f18f3e3 generic: misc cleanups
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-04-19 08:38:24 +00:00
Ivailo Monev
9c7b41e8f4 generic: misc cleanups 2015-09-21 20:30:05 +00:00
Ivailo Monev
a8a54f0484 generic: proper support for icon and caption in .desktop files 2015-09-21 00:26:31 +00:00
Ivailo Monev
21ad0df488 generic: make changes required for building against katie 2015-08-11 05:56:07 +03:00
Ivailo Monev
7fe9f582f7 make KGlobal reference counting thread safe.
REVIEW: 121134
2015-01-03 22:47:54 +00:00
Ivailo Monev
4f3fd401e4 KDE3_SUPPORT cleanup 2014-12-04 00:04:49 +00:00
Ivailo Monev
814163a8dc initial import 2014-11-13 01:04:59 +02:00