Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.0 Alpha
-
None
-
Linux and Windows platforms with non "en" localization
-
Change-Id: Iac08a5c18514c605265aad875b30f7cb5307b420 Change-Id: I39f3a891e55ee47a57afc394e849ea02b0c76ad5
Description
tst_loadFail.qml auto test fails on Windows and Linux with localization settings with non English settings.
Actual result:
FAIL! : qmltests::WebEngineViewLoadFail::test_error_page() Compared values are not the same Actual (): file:///home/stampho/Qt/qt5-55-src/qtwebengine/tests/auto/quick/qmltests/data/file_that_does_not_exist.html nem található Expected (): file:///home/stampho/Qt/qt5-55-src/qtwebengine/tests/auto/quick/qmltests/data/file_that_does_not_exist.html is not found
Expected result:
Test pass: the title should not be translated -> "... is not found"
Proposed solution:
Force en_US locale for QML Tests:
diff --git a/tests/auto/quick/qmltests/tst_qmltests.cpp b/tests/auto/quick/qmltests/tst_qmltests.cpp index 4f4f847..f95580b 100644 --- a/tests/auto/quick/qmltests/tst_qmltests.cpp +++ b/tests/auto/quick/qmltests/tst_qmltests.cpp @@ -49,6 +49,9 @@ int main(int argc, char **argv) qputenv("QML2_IMPORT_PATH", QByteArray(TESTS_SOURCE_DIR "qmltests/mock-delegates")); QScopedPointer<Application> app; + QLocale curLocale(QLocale("en")); + QLocale::setDefault(curLocale); + if (!QCoreApplication::instance()) app.reset(new Application(argc, argv)); QtWebEngine::initialize();
This solution does not work yet due to other problems:
- Glib code path is used in chromium that overrides the preferred language settings in the test's main entry point
- The browser process does not pass the custom localization settings to child process thus the zygote process initialize the Resource Bundle with the system-wide localization setting instead of the preferred one
Attachments
For Gerrit Dashboard: QTBUG-45715 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
111003,4 | Update snapshot SHA1 | 5.5 | qt/qtwebengine | Status: MERGED | +2 | 0 |
111004,5 | Force to use English language for QML auto tests | 5.5 | qt/qtwebengine | Status: MERGED | +2 | 0 |