[Development] Notes from the QLocale-timezone-ICU session

Thiago Macieira thiago.macieira at intel.com
Sat Jun 23 17:14:13 CEST 2012


-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
---+ Locales and timezones with ICU
   * ICU provides a simpler API to deal with a lot of data
   * TZ data is deeply embedded into ICU
      * Unix distros will keep it up to date
      * On Windows:
         * ICU libs can't be relied to be recent enough
         * But Windows's registry can't either!
         * Countries that change the info too often (like Brazil) have users who are used to having the wrong TZ information anyway
         * Conclusion: just use ICU everywhere
   * Split QLocale?
      * We have lots of formatters, parsers, for:
         * numbers
         * currency
         * date & time
         * collators
      * Proposal:
         QLocale lc("en_GB at calendar=islamic");
         QString s = lc.calendar().toString(datetime);
      * Should it have setters?
         * i.e., build your en_GB at calendar=islamic with setCalendar(QLocale::IslamicCalendar)?
      * Similar to QFont
   * Requirements:
      * QLocale(), QLocale::c() and the system locale *need* to be very quick
      * The rest can be slow, since they aren't widely used
   * ICU thread-safety?
      * Some ICU objects are not thread-safe, so we need to figure out a way to wrap them in a nice, safe Qt API
   * Timezone rules / phases?
      * Finding out when we'll enter or exit DST -- useful for PIM applications
      * Also receives rules from the meeting invitations
      * Specialised use-case, but we could have an API "next time we enter DST from this date" -> later
   * Collator:
      * Ready, not public because of feature freeze
      * Does natural sorting
      * TBD: Bucketing / section headers (i.e., A, B, C, like a phone book)
   * On Windows:
      * ICU can be stripped down to 6 MB or maybe less
      * ICU should not be imported into src/3rdparty -> should only be a system library, even on Windows
      * Instructions on the wiki to strip it down
   * Minimal l10n / i18n / calendar support in Qt?
      * Feature system
   * Can we link to iOS's ICU?
   * Use ICU for the codecs too
   * 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120623/7d060d5c/attachment.sig>


More information about the Development mailing list