is interesting how much simpler it can be by assuming that the tags are
strict and by using Qt::mightBeRichText() for the rich text detection.
while mostly compatible (entities are not converted, some tags were not
used and some even did not do anything) it is subject to optimization by
using QStringMatcher or other tricks (like using a separate tag for the
numbers precision)
overall - no regular expression matching, no XML parser is used and does
what the old implementation was doing but with less code. also passes
most tests (the exception is KLocalizedString test case that expect
entities to be replaced)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
the device was opened for reading only but for the version to be written
it has to be opened for writing too
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
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>
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>
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>
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>
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>
due to Katie changes (see 7c840afcb12096778ecb1539f7baba3e02ba6f85 in the
Katie repo) reading lines is much faster
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
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>
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>
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>
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>