summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale_unix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CoreLib: use const (and const APIs) moreAnton Kudryavtsev2016-04-181-1/+1
| | | | | | | | | | For CoW types const methods will be called. Mark store_persistent_indexes() as const, because this method does not modify the object. Change-Id: Ic867913b4fb5aaebfbaaffe1d3be45cf7b646403 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-111-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| * QLocale: Use QVariant::toStringList() instead of template instantiationSérgio Martins2016-02-101-1/+1
| | | | | | | | | | | | | | | | Avoids (binary) code duplication. Change-Id: I57a23e2f6e151963163d8073b309b3562f8e8684 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix QLocale::standaloneMonthName when d->m_data == systemData()Albert Astals Cid2013-05-011-0/+4
| | | | | | | | | | | | | | | | | At the moment if d->m_data == systemData() it calls systemLocale()->query but forgets about the standalone part so you get the wrong data This patch introduces the new enums so that backends can implement properly the standaloneMonthName feature properly. At the moment the Windows and Mac ones still return the monthName, the Unix and Blackberry ones return the data we store in months_data Change-Id: Idc5a50b04ab1f914f16c7385be1dca2e027feae3 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Mehdi Fekari <mfekari@blackberry.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Inital port of QSystemLocale on BlackBerry 10El Mehdi Fekari2013-03-141-101/+0
| | | | | Change-Id: Ic177e2867d9fa3dbaec221766964ac28656a2662 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Split QQNXLocaleData::readPPSLocale()Rafael Roquetto2013-01-141-5/+22
| | | | | | | | | | | | | | Because this method creates a QSocketNotifier, it needs to be split into a part that is run on initialization, namely QQNXLocaleData::initialize(), and one that is run delayed through event loop invocation, namely QQNXLocaleData::installSocketNotifier(). Task-number: QTBUG-28701 Change-Id: Ib60000902692bbca4820d3d0bc7719212668dfa9 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Qnx: Check if QCoreApplication::instance() exists before using QSocketNotifiermfekari2012-11-281-2/+5
| | | | | | Change-Id: I9f00314ea1ef73b87bc56ca1f8fcf859c9cd1824 Reviewed-by: Bernd Weimer <bweimer@rim.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* BlackBerry: The MeasurementSystem port was for BlackBerry OS not QNXmfekari2012-11-211-14/+14
| | | | | | | Change-Id: I87708aad18ebe1c6a08fe89376290be66f9c0577 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* Qnx: Handle the MeasurementSystem value in QNXmfekari2012-11-201-0/+80
| | | | | | | Change-Id: I00837421431d82aa831b785d3effb0920b4541f3 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Rename QSystemLocale::fallbackLocale() to QSystemLocale::fallbackUiLocale()Mike FABIAN2012-06-061-1/+1
| | | | | | | | | | Suggested by Oswald Buddenhagen. This function is about the (main) UI language, not about other locale features like number formatting etc. It not in the public API anymore in Qt 5.0 so it can be renamed. Change-Id: I2a23892c67e5813de4c0e57330749568777e9ee6 Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Check LANGUAGE as well in QSystemLocale::fallbackLocaleMike FABIAN2012-06-061-0/+13
| | | | | | | | | | | | Because QSystemLocale::fallbackLocale() is about UI languages, it makes sense to check LANGUAGE as well if appropriate. Adapt tst_qlocale.cpp accordingly. Suggested by Oswald Buddenhagen. Change-Id: Ib2c9674081809e3251be4e34456b05210eebc010 Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use LC_MESSAGES instead of LC_NUMERIC in QSystemLocale::fallbackLocale()Mike FABIAN2012-06-061-3/+1
| | | | | | | | | | | | | | | | | commit b9790a04eeba664ecdf9ace24911094a71b5f0bd (https://codereview.qt-project.org/24304) introduced the problem that the country gets initialized from LC_NUMERIC and the language from LC_MESSAGES. For example, if LC_NUMERIC=ru_RU and LC_MESSAGE=fr_FR, then QLocale::system().name() returns "fr_RU". It is not nice to mix the values of two LC_ variables there. Therefore, revert this change and use LC_MESSAGES instead of LC_NUMERIC in QSystemLocale::fallbackLocale(). This was also suggested in the changelog of b9790a04 and it looks like a better way to fix the problem. Change-Id: I8fa6fec2b33e9f1f5a31c4b288503a658dad6d30 Reviewed-by: Denis Dzyubenko Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Always return uiLanguages in bcp47 formatLars Knoll2012-05-041-20/+18
| | | | | | | | | | | | | | The old code didn't convert the uilanguages coming from the system locale to bcp47 format, leading to QLocale().uiLanguages() and QLocale("en_US").uiLanguages() returning things in an inconsistent format. Now it always returns bcp47 format (ie. Language and Country separated by a hyphen). Change-Id: I40d3442255e6e8daa4723f7b3fc13829c9764eb1 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fix locale issue on unix systemsStephen Röttger2012-04-241-0/+2
| | | | | | | | | | | | | QSystemLocale::query() was missing the LanguageId QueryType. Therefore QSystemLocale::fallbackLocale() was always used as default language, which reads environment variables in the order: LC_ALL -> LC_NUMERIC -> LANG. The correct behaviour is to read LC_ALL -> LC_MESSAGES -> LANG. This leads to problems for users that want to use english language, but non-english localization features (date, number formats etc.) Change-Id: I4310537dac8622a3dd79231fbad58e22f20ca262 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: John Layt <jlayt@kde.org>
* Make QLocalePrivate::updateSystemLocale() reset the locale data on UnixLars Knoll2012-03-221-21/+49
| | | | | | | | | | Reread the environment, and update the locale data on request. Also fix a small bug where the time format wasn't inherited from the LANG environment variable if LC_TIME wasn't set. Change-Id: I619447603ade19d5587b427491cfd9c8fe814858 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QByteArray: deprecate QT_NO_CAST_FROM_BYTEARRAY-protected operatorsMarc Mutz2012-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QByteArray::operator const {char,void}*() implicit conversions are a source of subtle bugs, so they right- fully can be disabled with QT_NO_CAST_FROM_BYTEARRAY. const char *d = qstring.toLatin1(); // implicit conversion while ( d ) // oops: d points to freed memory // ... But almost no-one ever enabled this macros in the wild and many were bitten by these implicit conversions, so this patch deprecates them. I would have liked to remove them completely, but there are just too many occurrences even in Qt itself to hope to find all conditionally-compiled code that uses these. Also fixes all code that needs to compile under QT_NO_DEPRECATED (in qmake/, src/tools/). I984706452db7d0841620a0f64e179906123f3849 separately deals with the bulk of changes in src/ and examples/. Depends on I5ea1ad3c96d9e64167be53c0c418c7b7dba51f68. Change-Id: I8d47e6c293c80f61c6288c9f8d42fda41afe2267 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update year in Nokia copyright headers.Jason McDonald2012-01-101-1/+1
| | | | | | | | The previous change missed some headers from years prior to 2011, and a few new files were merged after the previous change. Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+226
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12