qt5base-lts/tests/auto
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
..
android Updated license headers 2016-01-21 18:55:18 +00:00
bic/data Add binary compatibility files for QtBase for 5.10 2018-01-04 16:26:32 +00:00
cmake CMake: Set SKIP_AUTOMOC/AUTOUIC where needed 2017-11-22 13:51:30 +00:00
compilerwarnings/data Updated license headers 2016-01-21 18:55:18 +00:00
concurrent Fix of flaky qFutureAssignmentLeak test 2018-02-15 16:24:38 +00:00
corelib QLocale: Update the system private on QLocale default constructor if needed 2018-03-02 09:52:14 +00:00
dbus Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
gui Blacklist tst_QWindow::testInputEvents on Windows 2018-03-02 08:19:14 +00:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network tst_QLocalSocket: Fix not showing error output in processConnection 2018-03-01 09:37:58 +00:00
opengl Remove tst_QGLThreads::textureUploadInThread 2018-03-02 07:20:32 +00:00
other Update the Unicode BiDi algorithm to be compliant with Unicode 10 2018-02-28 17:11:43 +00:00
printsupport Convert features.completer to QT_[REQUIRE_]CONFIG 2017-09-04 11:28:02 +00:00
shared Remove workaround for potentially unavailable pasteboard in macOS 2017-03-07 01:04:46 +00:00
sql psql: Add expected failures where the table name is case sensitive 2018-02-21 07:07:26 +00:00
testlib QTestlib/selftests: Fix failures due to logging system output 2018-03-02 08:16:21 +00:00
tools Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
widgets Blacklist tst_QApplication::touchEventPropagation on openSUSE 2018-03-02 07:21:04 +00:00
xml Don't indefinitely wait for data if it was able to read some data 2018-01-24 05:54:31 +00:00
auto.pro tests/auto/auto.pro: Use correct null device for DBUS check 2017-12-01 09:53:07 +00:00
network-settings.h Merge remote-tracking branch 'origin/5.6' into 5.7 2016-05-06 15:36:44 +02:00