Force en locale for propertyinfotest
ClosedPublic

Authored by astippich on Apr 7 2019, 4:05 PM.

Details

Summary

Fix CI propertyinfotest

Diff Detail

Repository
R286 KFileMetaData
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
astippich created this revision.Apr 7 2019, 4:05 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptApr 7 2019, 4:05 PM
Restricted Application added subscribers: Baloo, kde-frameworks-devel. · View Herald Transcript
astippich requested review of this revision.Apr 7 2019, 4:05 PM
bruns added inline comments.Apr 7 2019, 6:21 PM
autotests/propertyinfotest.cpp
51

This is somewhat strange ...

According to
https://doc.qt.io/qt-5/qlocale.html#Language-enum

The "C" locale is identical in behavior to English/UnitedStates.

So either "en" is not "en_US", or the Qt documentation is wrong ...

astippich added inline comments.Apr 7 2019, 6:44 PM
autotests/propertyinfotest.cpp
51

"en_US" also fixes the test for me...

bruns added inline comments.Apr 7 2019, 6:47 PM
autotests/propertyinfotest.cpp
51

Can you open a upstream Qt bug for the differences you see between C and en_US?

astippich updated this revision to Diff 55760.Apr 8 2019, 6:04 PM
  • use enum

There already was a bug report some time ago
https://bugreports.qt.io/browse/QTBUG-15488

looks like it regressed. The given test in the bug report also does not work here.
I will open a new one.

It is a documentation bug.

bruns added a comment.Apr 10 2019, 6:38 PM

otherwise, good to go.

autotests/propertyinfotest.cpp
95

Can you add a comment for "expected", telling the expected value uses the English/UnitedState locale?

astippich updated this revision to Diff 56002.Apr 11 2019, 5:19 PM
  • add comment
bruns accepted this revision.Apr 11 2019, 6:34 PM
This revision is now accepted and ready to land.Apr 11 2019, 6:34 PM
This revision was automatically updated to reflect the committed changes.