type is unsigned long, should be %lu. Replace by stream.
Change-Id: Ib0346b54a4494910b4a5927d0de45840ca53fbda
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
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>
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>
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>
...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>
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>
...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>
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>
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>
Instead omit the whole test when appropriate.
Change-Id: Iebd569676cc7b2f8fe4a1d272107e092410d397b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
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>
This test actually passes on Windows, so removing the QSKIP
Task-number: QTBUG-24543
Change-Id: Ic2666665f2882392aec92a665f51d6c5dd3355f8
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Qt 5.0 beta requires changing the default to the 5.0 API, disabling
the deprecated code. However, tests should test (and often do) the
compatibility API too, so turn it back on.
Task-number: QTBUG-25053
Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Make test projects declare TEST_HELPER_INSTALLS rather than calling a
function exported by testcase.prf. load(testcase) may be unsafe, as
testcase.prf should be processed after default_post.prf.
Fixes silent disabling of various autotests.
Change-Id: I56b35ffd653a637ad5ab18d64dd1a1edadfac59f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Updated removeGroupSeparators(QLocalePrivate::CharBuff *num) so that it
removes also positive sign ('+') at the start of the string. Auto test
included.
Task-number: QTBUG-26035
Change-Id: I8e0e071d6c682d9192a8c6bb2f282510e21b3c48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
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>
These tests have passed a parallel stress test on all three of Linux,
Mac, Windows. Mark them with CONFIG+=parallel_test to allow CI to run
them in parallel, saving time.
Change-Id: I19fd333c3c645a67374ca998f6c8530dd236b0f8
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
This test has not failed in the last 500 Continuous Integration runs.
Task-number: QTBUG-22769
Change-Id: Ib2e95bb2291757941baa0ea46d568816eef20b09
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This test hangs 2-3% of the time.
Task-number: QTBUG-25284
Change-Id: I32e01696262be2de7e015b8f811d1666551426cc
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
THe UK still uses the Imperial system at least for distances
and many other things.
Change-Id: I99379de35620114328ad6a7fc9b226a46692bedd
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Remove the -armfpa option the config.tests/unix/doubleformat*
detection. The places where we used QT_ARMFPA and Q_DOUBLE_FORMAT
has been removed as well.
Rationale: ARM FPA with GCC does not work with EABI. Qt currently
does not support compiling without EABI, making ARM FPA an
impossibility. It is unknown whether other compilers provide ARM FPA
support with EABI. Support for ARM FPA can be re-added in the future
should the need arise, but since ARM VFP is available for ARMv5 and up,
we should encourage implementors to instead use soft-floats or VFP.
Change-Id: I3671aba575118ae3e3e6d769759301c8f2f496f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
- It was trying to install syslocaleapp sub program as TESTDATA
instead of an application.
Change-Id: I2117d11335bc2fd37a8ccc9a03b0337382f0177f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
- Skip the failing windowsDefaultLocale() test.
- Improve the handling of the subprocess, locate
the binary in initTestCase instead of repeatedly searching it.
- Make all applications console/non-app bundles.
Task-number: QTBUG-24543
Change-Id: I79dfaa3320cd5698f02e74a3fe53477d4a79d4fb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
For shadow builds where "make install" had not been run, the
tst_QLocale::emptyCtor test function would fail to find its helper
application because QFINDTESTDATA was not searching for it in the build
directory due to the test not instantiating QCoreApplication.
This commit fixes the test by instantiating a QCoreApplication using the
QTEST_MAIN macro, which also allows some special case code for Windows
CE to be removed.
Change-Id: Ic81d4699da2538c24b36b3d6bd52c4a02ad417f4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
As discussed on list and approved by Lars and Thiago.
Make QSystemLocale private to give us time and space to change it to a
better implementation.
Change-Id: Ifd806972f3996c43a876f544f78c6557ad71cd75
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
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>
These comments were mostly empty or inaccurate. Appropriate naming of
tests and appropriate placement of tests within the directory tree
provide more reliable indicators of what is being tested.
Change-Id: Ib6bf373d9e79917e4ab1417ee5c1264a2c2d7027
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
In .pro files, removed wince/symbian-specific DEPLOYMENT cases and
replaced them with TESTDATA where appropriate.
In .cpp files, removed SRCDIR and relative paths to testdata and
replaced them with the QFINDTESTDATA macro where appropriate.
Modified test helper apps/libs to install themselves under the test
they relate to.
This change allows corelib tests to be correctly installed, along with
their testdata, via `make install'.
Change-Id: I5e202e2f3b577af7e39072d5c9fe13e0ca125304
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
libstdc++ provides the fenv.h found and for uclibc default toolchains
the bits/c++config.h has _GLIBCXX_HAVE_FENV_H undefined leading to
no import of the uclibc fenv.h
Change-Id: I53173b099f3d8791f527f1ccb60991de57cd19db
Filed: https://bugs.busybox.net/show_bug.cgi?id=4484
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
This is the first change to re-enable the autotests for the individual
qtbase modules. This means adding subdir.CONFIG=no_check_target for each
module (except corelib) in tests/auto/auto.pro instead of in
tests/tests.pro
QFileSystemWatcher, QIODeice, QSettings, QTextStream, QSocketNotifier,
QVariant, QPluginLoader, QLocale: These tests currently fail, which
will block any changes that attempt to re-enable the autotests. Ignore
the failures for now by marking them as insignificant.
QAbstractItemModel: This test currently crashes, which can
destabilize the CI system when attempting to re-enable the autotests.
Skip this test for now by disabling the check target for it.
Change-Id: Ie5147d5c5cfae5e7d0a495d5c4788ce92fe2e6d8
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>