summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qlocale
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup testcase for platforms without QProcess support.Maurice Kalinowski2016-02-091-0/+2
| | | | | Change-Id: Ib56c90262605ad975772f6b26c6232020e308ca6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* [Android]: Java uses some deprecated locale codes so account for theseAndy Shaw2016-01-131-1/+2
| | | | | | | | | | There are three deprecated language codes that Java still uses for the locale so we need to account for these inside QLocale by mapping them to the right language. Task-number: QTBUG-49632 Change-Id: Ib66b3f2763e085f7384228f2490b048bb56be259 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix compilation for WinRTMaurice Kalinowski2015-12-142-3/+3
| | | | | | | | TEST_HELPER_INSTALLS cannot be used on platforms with no QProcess support. Change-Id: I2a6a283d94ca4487fc628449c53fc37140dd291d Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* The C locale should omit group separators by defaultLars Knoll2015-10-191-10/+11
| | | | | | | | | | | | | Numbers formatted in the C locale should not use group separators by default. [ChangeLog][QtCore][QLocale] The C locale does not use group separators when formatting numbers any more. Task-number: QTBUG-4044 Task-number: QTBUG-3068 Change-Id: Ia647a72efc11fecd66d22f9253562b1d4ef58168 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add qHash(QLocale)Marc Mutz2015-06-301-0/+2
| | | | | | | | | | | QLocales can be compared for equality, so qHash should be overloaded, too. [ChangeLog][QtCore][QLocale] Added qHash(QLocale). Change-Id: Ia0fdf1207b842b9bb20b8f9ab0165016915debf4 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update CLDR to v27Konstantin Ritt2015-03-271-21/+38
| | | | | | | | | | | | | + A bunch of fixes in the locale data + New scripts from Unicode 7.0 + New locales - Some locales disappeared (aa_DJ, aa_ER, st_LS, ss_SZ, swc_CD, tn_BW) - Some locales lost their contents (i.e. en_Dsrt_US) [ChangeLog][QtCore] QLocale data updated to CLDR v.27 Change-Id: Iba8c7884f8087e577cbb25a8fc106dd7bd3ebb5d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [QLocaleData] Extract defaultContent localesKonstantin Ritt2015-03-271-0/+1
| | | | | | | | | | | | | | This adds some locales missing in the common/main/ directory, namely: bss_CM, cch_NG, dv_MV, gaa_GH, gez_ET, ha_Arab_NG, iu_Cans_CA, kaj_NG, kcg_NG, kpe_LR, ku_Latn_TR, mi_NZ, ms_Arab_MY, mn_Mong_CN, nds_DE, ny_MW, oc_FR, sa_IN, sid_ET, tk_Latn_TM, trv_TW, tt_RU, ug_Arab_CN, wa_BE, wo_Latn_SN See http://www.unicode.org/reports/tr35/tr35-info.html#Default_Content for more info. Change-Id: I6b3082d370a21da64fbd5e72ab6344e1d7a6a3c9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Skip instead of entirely excluding tests with disabled featuresMarko Kangas2015-03-161-1/+7
| | | | | | | | | | | | Properly QSKIP tests that use disabled QProcess and symlink features instead of excluding them silently by #ifdef. Other reason is that moc doesn't respect QT_NO_* defines in class definition which causes build issues on some platforms. Change-Id: I041020f7452f7d36c7ec8a5866a4ba5eb23d1f94 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Update copyright headersJani Heikkinen2015-02-112-14/+14
| | | | | | | | | | | | | | | | | | 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-242-38/+22
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Add support for blacklisting test functionsLars Knoll2014-09-211-0/+8
| | | | | | | | | | | | | | | | | We need to have a finer grained control over the tests we skip in our CI system. This adds a blacklisting mechanism that allows blacklisting individual test functions (or even test data) using a set of predefined matching keys for the operating system and some other relevant variables. QTestlib will search for a file called BLACKLIST in the test directory and parse it if found. The file contains a simple ini style list of functions to blacklist. For details see qtestblacklist.cpp. Change-Id: Id3fae4b264ca99970cbf9f45bfb85fa75c1fd823 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make tst_QLocale::macDefaultLocale() more robustMorten Johan Sørvig2014-07-021-28/+44
| | | | | | | | | | | | | | | | | | | | | | | The assumption that we can test "en_US" and expect it to behave a certain way is flawed in that most of the formatting settings are independently configurable by the end user. Make the test more robust while attempting to preserve as much testing as possible: Make the decimalPoint/groupSeparator tests check for a range of possible values. Check that they are not the same. Remove the date formatting tests and the firstDayOfWeek() == Sunday test. Make the time zone test accept a non zero extended time zone. ("GMT+2" in addition to "GMT+02".) Change-Id: Ie1f89793eb785f526c5f6fafbb6726ef8c6cb016 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Revert "test: marked tst_qlocale as insignificant on Windows"Friedemann Kleint2014-01-301-1/+0
| | | | | | | | | | | | | | This reverts commit b7486591cd114351c755b9e8b2bfe5d175461ec9. Conflicts: tests/auto/corelib/tools/qlocale/test/test.pro Task-number: QTBUG-25284 Task-number: QTBUG-36306 Change-Id: If4a335c114302f7af999d7a254e1aa55b2df7176 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix tst_QLocale::windowsDefaultLocale().Friedemann Kleint2014-01-281-16/+35
| | | | | | | | | | Adapt to Windows-version-specific changes. Task-number: QTBUG-36306 Task-number: QTBUG-33718 Change-Id: I8275423f6f79ede3c3903a646b731eba2182e83c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update the internal CLDR tables up to v.24Konstantin Ritt2014-01-131-12/+12
| | | | | | | Change-Id: I9c0b110e36dd80c6a0b7275aa13bc548419aca9c Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: John Layt <jlayt@kde.org> Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-261-0/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * QLocale: Add auto tests for Poruguese(Brazil) and Greek localesEl Mehdi Fekari2013-10-291-0/+9
| | | | | | | | | | Change-Id: Ib1b553efb39a150710ceb609d2cb099f19f73e35 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | WinRT: Fix various test compilationsAndrew Knight2013-10-021-3/+3
|/ | | | | | | | | | | | | - Remove irrelevant test subdirs via .pro files - Follow WinCE codepaths where applicable - Replace unsupported Win32 APIs with WinRT equivalents This does not aim to fix any failures in the tests themselves; it only makes them compile. Change-Id: Ia82bc0cc402891f8f6238d4c261ee9152b51be80 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QLocale - Fix Mac date format code translationJohn Layt2013-09-261-4/+1
| | | | | | | | | | | | | | | | | | | | Mac uses the CLDR format codes which need to be translated into their Qt equivalent. The existing code mistranslates the year code, is outdated for a number of new codes introduced in recent versions of CLDR, and by default accepted any codes it didn't recognize. This change updates support to the latest version of CLDR, fixes the treatment of years, and defaults to ignoring any new format codes added in the future. Note that this change cannot have auto tests written as the system locale formats change between versions of OSX. Testing must be done manually by changing system locale and formats. Task-number: QTBUG-25057 Change-Id: I69dda25b4a0b38d3971995644546306876922d57 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QDateTime - Add QTimeZone supportJohn Layt2013-09-231-0/+12
| | | | | | | | | | | Add support to QDateTime for time zones using the new QTimeZone class. [ChangeLog][QtCore][QDateTime] Add support for a new Qt::TimeZone spec to be used with QTimeZone to define times in a specific time zone. Change-Id: I21bfa52a8ba8989b55bb74e025d1f2b2b623b2a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLocale - Improve date formatterJohn Layt2013-09-051-0/+100
| | | | | | | | | | | | | | | | Modify the QLocale date formatter to be consistent with the QDateTime date formatter and able to replace the QDateTime formatter in a subsequent change. Fix the treatment of negative years. The internal QLocale::timeZone() has been replaced by the QDateTime::timeZoneAbbreviation() to ensure the correct tz for the date/time is used rather than always the current system default. Change-Id: I2ef26700856e2e69b979069226aa504ecbb50071 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* BlackBerry: fix tst_QLocale::emptyCtor()Rafael Roquetto2013-06-102-0/+70
| | | | | | | | | | | | BlackBerry OS does not allow for explicitly controlling the locale through the "LANG" environment variable. Locale is controlled by the underlying PPS Service instead. Change-Id: I22154e39f81a9467ad7fdb90a042396390398b1b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
* QLocale: add autotest for French_Morocco localeEl Mehdi Fekari2013-05-081-0/+1
| | | | | | Change-Id: Ie489557342bf9ea571ba4070e8982b1a13fc7021 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update QLocale data to CLDRv23Konstantin Ritt2013-04-011-2/+3
| | | | | | | | Say hello to Interlingua and Mongolian once again. Change-Id: I735fbc5793f34620be1f6932a251224b9ded02e3 Reviewed-by: Denis Dzyubenko <denis@ddenis.info> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QLocale: Report textDirection() by looking to the locale scriptKonstantin Ritt2013-03-301-0/+42
| | | | | Change-Id: Ic562b0301271ba414d5d3ff75a308d84bd288f56 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add an auto test for Irish localeEl Mehdi Fekari2013-03-121-0/+3
| | | | | Change-Id: I2458cb580553ea02461869220fbd5dfb0f8fcb2c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QLocale: Added QStringRef overloads to toInt(), toUInt(), etc...Keith Gardner2013-02-181-2/+19
| | | | | | | | | | Added the following function overloads to QLocale: toShort, toUShort, toInt, toUInt, toLong, toULong, toLongLong, toULongLong, toFloat, and toDouble. Change-Id: I8cd90ca08b88338b08a73a72492f4c91c4f46ea4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-181-0/+4
|\ | | | | | | | | | | | | Conflicts: src/widgets/styles/qmacstyle_mac.mm Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
| * QLocale: add autotest for tamil's AM/PM textEl Mehdi Fekari2013-02-151-0/+4
| | | | | | | | | | | | Change-Id: I67e572f16fcabd5833549286be20172e7f2a2337 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-141-0/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * QLocale: add autotests for Japanese and Czech localesEl Mehdi Fekari2013-02-121-0/+7
| | | | | | | | | | | | Change-Id: Id4351ab49bfbdf91b65ccb5153c5d01f53acdf72 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix warning about incorrect format in tst_qlocale.Friedemann Kleint2013-01-301-3/+3
|/ | | | | | | type is unsigned long, should be %lu. Replace by stream. Change-Id: Ib0346b54a4494910b4a5927d0de45840ca53fbda Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Add autotests for Indonisian and Catalan localesMehdi Fekari2013-01-231-0/+12
| | | | | Change-Id: Idbf14ee6f0cd83acfdc407408794aac7ad91c054 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-182-2/+2
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add an autotest for Canadian locale(dateFormat)Mehdi Fekari2013-01-101-0/+4
| | | | | Change-Id: I68a91a418c418e113ecfe66769a7b3bc46de380c Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Update qlocale autotestMehdi Fekari2013-01-061-0/+50
| | | | | | | | | | | Add additional tests for the updates in the Qt4.8 qlocale data (CLDRv2.0) already existing in Qt5 locale data (CLDRv22.1): - The NumberingSystem for some Indic and Slovak locales. - The Month/Day name in Irish/Gaelic locale. - The AM/PM Text in Turkish locale. Change-Id: Iaea4f13ec79f94ab937b97f8ae60eb8d8f217c4b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Core: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-041-3/+0
| | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: I54523eb854619917123d8816d3cd6c3a1f5b4c55 Reviewed-by: David Faure <david.faure@kdab.com>
* QLocale: Fix matchingLocales() behavior if script or country is not Any*Konstantin Ritt2012-11-251-0/+30
| | | | | | | | | | | Since the documentation doesn't mention the search should be done by language only, consider the current behavior incorrect. As of now, it is possible to get a list of locales by Country or Script as well. Also fix countriesForLanguage() to be in-sync with matchingLocales(). Change-Id: I6a09ca459120143565fa6099d2b823df1fed7c25 Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* QLocale: Fix toCurrencyString() didn't respect group separator optionKonstantin Ritt2012-11-231-15/+21
| | | | | | Change-Id: Icda43d71d600d77fe1ed4fcde1ef4478ef29c1d5 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* Update Qlocale data up to CLDR 22.1Konstantin Ritt2012-11-211-4/+3
| | | | | Change-Id: Ie6ddfec14cb052e0b89230dc93290ff79488fb25 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update Qlocale data up to CLDR 2.0.1Konstantin Ritt2012-11-211-4/+3
| | | | | Change-Id: I4279fac57436d7009a6d61dab5936b72fd39fc14 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use likelySubtags to instantiate a locale id from it's short formKonstantin Ritt2012-11-212-365/+86
| | | | | | | | | ...just like described in http://www.unicode.org/reports/tr35/#Likely_Subtags. This is much more effective than current "guessing" algorithm + makes it possible to instantiate a locale by the script or territory code only. Change-Id: I674f8476e65b01c56960b6e83a1a346df0715274 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [SIC/BIC] QLocale: update enums up to CLRD 1.9.1Konstantin Ritt2012-11-211-7/+39
| | | | | | | | | | This patch adds some missing codes (two-letter ones only), removes an outdated ones, and updates some names. The legacy language codes are handled in QLocalePrivate::codeToLanguage() (fortunately, there are only 4 of such codes). Change-Id: Iff50aecd1c762b6399cd151aebb955f341d366c6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QLocale: replace hard-coded default country-for-language mapKonstantin Ritt2012-11-191-3/+3
| | | | | | | | | | ...with a generated one in a way similar to what http://www.unicode.org/reports/tr35/#Likely_Subtags suggests. The supplemental/likelySubtags.xml contains all the required data. This changes some default countries to a most-expected ones. Change-Id: I920a5623601d8661a943e78197d3bcc838191483 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* test: fix tst_QLocale::macDefaultLocaleLiang Qi2012-11-091-2/+4
| | | | | | | | | | | | | | 1. There is a behaviour change for CFDateFormatterGetFormat() between 10.6 and later, QLocale::dateFormat(QLocale::LongFormat) will return "MMMM d, yyyy" for 10.6 and "MMMM d, y" for 10.7, 10.8 2. Add a comment for toCurrencyString() test, need another system settings Task-number: QTBUG-27790 Change-Id: I4fe684d6e0c1d4a140e3b1f1ef395b7fdad030b4 Reviewed-by: Samuli Piippo <samuli.piippo@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* test: Mark tst_QLocale::macDefaultLocale as XFAILSamuli Piippo2012-11-081-0/+2
| | | | | | | Task-number: QTBUG-27790 Change-Id: Ida33d9579df4ef35d0323546f4d89596e159cb8e Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Output leading zeroes for yyyy date formats in QLocale::toString().Mitch Curtis2012-10-241-0/+4
| | | | | | | | | | Converting the date 1 January 0001 to a string in the format "dd MMMM yyyy" currently results in the string "01 January 1", but it should be "01 January 0001". Task-number: QTBUG-27287 Change-Id: Ia025da7343d1c36aaee34c47c6db551a6e89595f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Test: remove QSKIP in tst_QLocale::emptyCtorCaroline Chao2012-10-191-7/+7
| | | | | | | Instead omit the whole test when appropriate. Change-Id: Iebd569676cc7b2f8fe4a1d272107e092410d397b Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* tst_QLocale: remove QSKIP, wrap Q_OS_MAC/Q_OS_WINSergio Ahumada2012-10-041-5/+8
| | | | | Change-Id: I44755379561b98e43dd19c8c01b40349be203e14 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-222-49/+49
| | | | | | | | 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>