qt5base-lts/tests/auto/corelib/tools
Albert Astals Cid 78e92997ed QLocale: Update the system private on QLocale default constructor if needed
When first starting an Android app we have invocation order issue, to
load the platform plugin we create the default QLocale (needed by the
resource locator code to see if :/qt/etc/qt.conf exists) so when the
android platform plugin loads and creates its own QSystemLocale, the
QLocale defaultLocalePrivate is already created and pointing to
globalLocaleData which means that systemData won't be called and thus
the code that triggers the call to QLocalePrivate::updateSystemPrivate
won't be called when calling QLocale().

I thought of two ways of fixing this, one was calling
QLocalePrivate::updateSystemPrivatea() from the QAndroidSystemLocale
constructor, but giving the responsibility to not break things to the
plugin seems a little fragile, so making the check on QLocale()
seems better.

Without this patch an Android app doing
  QApplication app(argc, argv);
  qDebug() << QLocale().name();
  qDebug() << QLocale().name();
  qDebug() << QLocale::system().name();
  qDebug() << QLocale().name();
would print
  ""
  ""
  "ca_ES"
  "ca_ES"
now it correctly prints "ca_ES" the four times.

Task-number: QTBUG-41385
Change-Id: I2cf419f59aa008fa3aca11295fe7d42c40bcc32e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-03-02 09:52:14 +00:00
..
collections Fix tst_Collections for gcc/arm 2017-04-07 05:54:04 +00:00
containerapisymmetry Add front()/back() to QString, QStringRef, QByteArray and QLatin1String 2017-04-07 08:32:32 +00:00
qalgorithms Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
qarraydata tst_QArrayData: fix unused variable warning in reallocate() 2017-03-22 09:22:34 +00:00
qarraydata_strictiterators Make sure all containers compile in strict-iterator mode 2014-02-22 04:38:01 +01:00
qbitarray Updated license headers 2016-01-21 18:55:18 +00:00
qbytearray Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
qbytearraylist Updated license headers 2016-01-21 18:55:18 +00:00
qbytearraymatcher Long live QStaticByteArrayMatcher! 2017-01-19 21:37:46 +00:00
qbytedatabuffer Updated license headers 2016-01-21 18:55:18 +00:00
qcache Updated license headers 2016-01-21 18:55:18 +00:00
qchar Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
qcollator Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flags 2018-01-20 18:16:59 +00:00
qcommandlineparser Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flags 2018-01-20 18:16:59 +00:00
qcontiguouscache Updated license headers 2016-01-21 18:55:18 +00:00
qcryptographichash Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flags 2018-01-20 18:16:59 +00:00
qdate Raise the upper bound on years to 9999 2017-11-30 20:19:13 +00:00
qdatetime Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
qeasingcurve Updated license headers 2016-01-21 18:55:18 +00:00
qexplicitlyshareddatapointer Updated license headers 2016-01-21 18:55:18 +00:00
qfreelist Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00
qhash Merge remote-tracking branch 'origin/5.9' into dev 2017-05-07 13:08:18 +02:00
qhash_strictiterators Make sure all containers compile in strict-iterator mode 2014-02-22 04:38:01 +01:00
qhashfunctions QHash: make it so a zero seed selects a constant algorithm 2017-04-26 15:22:44 +00:00
qlatin1string Replace Q_NULLPTR with nullptr where possible 2017-09-19 11:53:55 +00:00
qline Add QLineF::center() returning the point in the center of the line 2016-05-27 08:49:44 +00:00
qlinkedlist Merge remote-tracking branch 'origin/5.6' into 5.7 2016-05-19 12:55:27 +02:00
qlist Merge remote-tracking branch 'origin/5.6' into 5.7 2016-05-19 12:55:27 +02:00
qlist_strictiterators Make sure all containers compile in strict-iterator mode 2014-02-22 04:38:01 +01:00
qlocale QLocale: Update the system private on QLocale default constructor if needed 2018-03-02 09:52:14 +00:00
qmacautoreleasepool macOS: Detect use of heap-allocated QMacAutoReleasePool 2017-09-08 12:05:21 +00:00
qmap Implement key-value iterator 2017-05-05 14:25:56 +00:00
qmap_strictiterators Make sure all containers compile in strict-iterator mode 2014-02-22 04:38:01 +01:00
qmargins Updated license headers 2016-01-21 18:55:18 +00:00
qmessageauthenticationcode Updated license headers 2016-01-21 18:55:18 +00:00
qpair Merge remote-tracking branch 'origin/5.6' into 5.7 2016-07-15 20:47:57 +02:00
qpoint Updated license headers 2016-01-21 18:55:18 +00:00
qpointf Updated license headers 2016-01-21 18:55:18 +00:00
qqueue Updated license headers 2016-01-21 18:55:18 +00:00
qrect Improve rounding of QRect::toRect 2017-06-26 21:35:38 +00:00
qregexp QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
qregularexpression QRegularExpressionMatch: add QStringView-related functions 2017-04-04 15:35:22 +00:00
qringbuffer QRingBuffer: avoid reallocations of the data 2017-12-30 10:15:10 +00:00
qscopedpointer QScopedPointer: add get() 2017-09-17 11:42:26 +00:00
qscopedvaluerollback Updated license headers 2016-01-21 18:55:18 +00:00
qset Updated license headers 2016-01-21 18:55:18 +00:00
qsharedpointer Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
qsize Updated license headers 2016-01-21 18:55:18 +00:00
qsizef Updated license headers 2016-01-21 18:55:18 +00:00
qstl Updated license headers 2016-01-21 18:55:18 +00:00
qstring Merge remote-tracking branch 'origin/5.10.1' into 5.11 2018-02-19 16:02:52 +01:00
qstring_no_cast_from_bytearray Updated license headers 2016-01-21 18:55:18 +00:00
qstringapisymmetry qstringapisymmetry: Fix XML parsing failing on invalid encodings 2018-03-02 07:59:12 +00:00
qstringbuilder QStringBuilder: add support for QStringView 2018-01-08 09:41:43 +00:00
qstringiterator QStringIterator: port to QStringView 2017-04-03 15:41:09 +00:00
qstringlist QStringList: add contains(QLatin1String) overload 2017-03-20 06:16:59 +00:00
qstringmatcher QStringMatcher: fix setCaseSensitivity() on a non-QString-backed matcher 2017-02-07 16:31:00 +00:00
qstringref Remove references to obsolete platforms 2017-11-05 06:33:53 +00:00
qstringview Fix license headers 2018-01-11 11:40:36 +00:00
qtextboundaryfinder Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
qtime Raise the upper bound on years to 9999 2017-11-30 20:19:13 +00:00
qtimeline Blacklist flaky tst_QTimeLine tests on macOS 10.12 2017-06-18 12:58:53 +00:00
qtimezone Test Russia's post-DST transitions are reported correctly 2018-01-19 13:57:38 +00:00
qvarlengtharray tst_qvarlengtharray: Add missing include 2018-01-26 06:55:15 +00:00
qvector Add rvalue overload of insert/prepend to QVarLengthArray and QVector 2018-01-20 09:27:14 +00:00
qvector_strictiterators Make sure all containers compile in strict-iterator mode 2014-02-22 04:38:01 +01:00
qversionnumber Tests: Raise minimum supported MSVC version to 2015 2018-01-04 20:23:25 +00:00
tools.pro macOS: Detect use of heap-allocated QMacAutoReleasePool 2017-09-08 12:05:21 +00:00