Commit graph

1330 commits

Author SHA1 Message Date
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
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
5432c47994 kdecore: KMimeTypeRepository::parseMagicFile() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 02:18:59 +03:00
Ivailo Monev
b2a4509b14 kdecore: mimeDataBaseVersion() function optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 01:52:22 +03:00
Ivailo Monev
5fb7d39eb2 kdecore: disable KLOCALE_DUMP_UNTRANSLATED by default
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 23:42:52 +03:00
Ivailo Monev
4472e87d19 kdecore: add compile-time definition to dump catalogs when translations is not found
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 23:41:24 +03:00
Ivailo Monev
33138d4a49 kdecore: effectively revert 6ae96c3c1d
due to Katie changes (see 7c840afcb12096778ecb1539f7baba3e02ba6f85 in the
Katie repo) reading lines is much faster

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-07 17:12:37 +03:00
Ivailo Monev
4d3d7840f2 kdecore: call KLocalizedString::notifyCatalogsUpdated() only when the catalogs were actually updated
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-07 02:15:02 +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
ef262ab3bd kdecore: remove unused variable in lookupPrefix() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-06 20:11:24 +03:00
Ivailo Monev
31cd95338f kdecore: remove redundant private KMimeTypeRepository::aliases() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-06 19:53:47 +03:00
Ivailo Monev
65587af47d kdecore: probe all languages from KLocale::languageCodeToName() and KLocale::countryCodeToName()
for that to work what KConfig expects (the language only) has to be first
in the list, otherwise KConfig returns entries that are actually not in the
set locale (go figure)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-06 18:55:59 +03:00
Ivailo Monev
c7dc966f67 kdecore: deep-copy the patterns in KMimeTypeRepository::findFromOtherPatternList()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-06 08:09:51 +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
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
8bea5c9837 kdecore: set the config locale to the highest priority language from KLocale::languageCodeToName() and KLocale::countryCodeToName()
as noted in de7070d2bb having multiple
languages and matching the correct one for each use case will have to be
tuned

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 07:11:08 +03:00
Ivailo Monev
5e51868194 kdecore: const-ify variables in KLocale::translateRaw() methods
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-01 05:18:47 +00:00
Ivailo Monev
886187c647 kdecore: remove unused kdatetime header inclusion
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-01 03:55:47 +00:00
Ivailo Monev
3e6c5f88ba kdecore: remove redundant KDateTime class forward-declration in klocale header
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-01 03:53:47 +00:00
Ivailo Monev
295e41b936 kdecore: scoop timezones
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 21:52:28 +00:00
Ivailo Monev
9de2672f31 kdecore: python3 compatible scoop-tzones.py script
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 21:51:47 +00:00
Ivailo Monev
17b82b3fd4 kdecore: PCI IDs database update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 21:36:33 +00:00
Ivailo Monev
5545cb7e2f kio: remove unused KProtocolManager::supportsOpening() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 20:35:46 +00:00
Ivailo Monev
899f789b07 kdecore: move KToolInvocation to kdeui
to get rid of the KApplication signal which is a hack really

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 08:09:02 +00:00
Ivailo Monev
73e5c1ad96 kdecore: compiler warnings fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 11:31:25 +03:00
Ivailo Monev
acd77cb495 kdecore: replace authors of KLocale
rewritten and improved!

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 06:14:31 +03:00
Ivailo Monev
4dc549635a kdecore: update KCatalog documentation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-29 08:30:50 +03:00
Ivailo Monev
2ffa34c16a kdecore: update KLocale::defaultLanguage() documentation
deffinetly not internal

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-29 08:20:50 +03:00
Ivailo Monev
ecc721b59c kdecore: change locale language from KLocale::reparseConfiguration() of default KLocale objects
default as in no explicit language has been passed as argument to KLocale
and the language comes either from config or the environemnt variables

with this change KCalendarWidget properly adapts to KLocale config change,
however other applications and widgets may not which is something that has
to be looked into. note that logout is (and was before the KLocale rewrite
even) recommended by the locale KCM for the change to fully take effect

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-29 08:08:13 +03:00
Ivailo Monev
d02d2b3fa4 kdecore: implement precision field for KuitSemantics
otherwise KLocale::formatNumber() has to guess the precision that was
passed to KLocalizedString::subs() and make up a localized integer string
with a magic wand, the precision for precise number types (e.g. ulong,
qlonglong, etc.) remains -1

fixes KSignalPlotter test case failure

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 15:45:04 +03:00
Ivailo Monev
f04d336bc0 kdecore: more compat bits for KLocale::formatNumber()
one more hack comming right up..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 15:38:13 +03:00
Ivailo Monev
8d3cf0ad3d kdecore: compat bits for KLocale::formatNumber()
the test case for this is in a KSignalPlotter test, see:
kde-workspace/libs/ksysguard/tests/signalplottertest.cpp

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 14:38:05 +03:00
Ivailo Monev
c4a5205981 kdecore: correct milisecond(s) spelling
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 13:20:53 +03:00
Ivailo Monev
d47978309e kdecore: replace the "ok" argument of KLocale::readDate() and KLocale::readTime() with "format" one
beware that bad things will happen if the input strings are not in one of
the formats KLocale::formatDate() and KLocale::formatTime() output

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 12:54:53 +03:00
Ivailo Monev
de7070d2bb kdecore: return only the language part from KLocale::language()
e.g. "bg" for "bg_BG", the default locale is special case for that method
too because of expectations in other places (such as KConfig, KMimeType
tries to match all of the languages returned by KLocale::languageList()
which is how it should be done but that is for another commit)

that is essentially the last bit to bring it back to a compatible state
with the previous implementation, except now more locales are supported

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 12:28:08 +03:00
Ivailo Monev
476f006aab kdecore: do not insert duplicate catalogs into KLocale
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 11:57:30 +03:00
Ivailo Monev
c44da5428f kdecore: do not insert and remove catalogs from KPluginFactory
already done by KComponentDataPrivate, when the component is created and
deleted

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 10:04:36 +03:00
Ivailo Monev
95ccbcb31b kdecore: do not insert invalid catalogs into KLocale
to optimize translation lookup, also re-purposed
KCatalog::catalogLocaleDir() for that

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 10:02:57 +03:00
Ivailo Monev
b1ffffeb89 kdecore: preserve manually inserted catalogs on KLocale configuration reparse
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 06:21:00 +03:00