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>
additional calendar systems can be supported via ICU in the future but
for now that will be more than enough considering other things such as
QDateTime and QCalendarWidget, the gregorian and julian calendars being
common, etc.
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
what that does - the general application color scheme applies to the native
widget and any Plasma::Theme overrides are applied on top of that making it
slightly less native looking and more plasma-themed.
also that allows to not just hide the calendar month button but disable it,
the colors for disabled widget as slightly lighter than the usual color
scheme so its not a big difference visually with that change
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
interestingly QLocale is not used for many things but that is about to
change, Katie uses it a lot internally (e.g. for QDateTime formatting
and such) so instead of bolting a calendar system on top of KLocale
perhaps a QLocale wrapped around in KLocale will fit the general idea
of using QLocale in widgets when necessary (as does QCalendarWidget).
that however means no way to specify a calendar system (in general,
other than changing the widgets locale itself) but the QDateTime and
related classes are tied to gregorian calendar already - the system
time itself carries no information about the calendar and any
conversions from one calendar to another are basically made up stuff
(there is the time zone thing ofcourse but that is not a calendar)
another interesting thing to note is that KLocale was written such that
it is read-write - changing the date formats for example is possible
because there are public KLocale methods for that.
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
this was not done in the previous implementation but it is now, it will
allow to detect tzdata changes and fallback to UTC in the plasma time
data engine during system upgrades for example. that ofcourse is only
theoretical and preperation for worst-case-scenario type of situation but
good to have anyway
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
KDateTime shall be used only for storing date and time while KLocale
shall be used to display such, not even going to test what KDateTime
does because it is basically a few methods on top of QDateTime now.
and because QDateTime knows not much about calendar systems while
KLocale supports several it makes sense for KDateTime to not be used for
displaying date and time thus the TODOs for KLocale are simply removed
note that KLocale still uses its own parser and formatter which means
that the change affects only KDateTime and its uses, not KLocale
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
UNIX being UNIX the leading dot meaning a file/directory is hidden is not
going anywhere, the private KFileItem hidden member is always set to
KFileItemPrivate::Auto too
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
KFileItem::mimeTypePtr() is lesser version of
KFileItem::determineMimeType() and if KFileItem::determineMimeType() did
not return valid KMimeType::Ptr then neither will KFileItem::mimeTypePtr()
but calling KFileItem::::mimeTypePtr() after KFileItem::determineMimeType()
is redundant
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
the signal is actually not used, see the following commit in kde-workspace:
45bbcd5e5e963d029974e09fd66edc454e7e9dc4
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
way too much private and mutable KFileItem members, not used a lot so the
performance impact is next to none
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
first thing first - KFileMetaInfo does not support non-local files and
KFileItem is ment to be wrapper for both local and (most importantly)
remote (including virtual KIO) files. KIO::UDSEntry does not carry metadata
either so having a metadata getter and setter in KFileItem is simply
redundant, both are not tested and used only by plasma folderview applet
(see kde-workspace/plasma/applets/folderview/tooltipwidget.cpp)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
when it comes to KFileMetaInfo its bottleneck is determening what plugin to
use for the given URL/path - determening MIME type, matching globs, etc.
and it still is quite fast to the point where the flags are simply
redundant
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>