A couple of QLocale tests were using setlocale twice to provide a
transient locale tweak in tests; however, if the test in between
fails, that can leave the program running in the "transient" locale
after. So implement a proper class whose destructor ensures the
transient is tidied away. Also change the locale in use by one of
these transient changes: it purported to be checking things didn't
depend on locale, but was using the same local as most of the
test-cases for its test.
Change-Id: I0d954edcc96019a8c2eb12b7a7c568e8b87a41d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>