Commit graph

1336 commits

Author SHA1 Message Date
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
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
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
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