Fix encoding mismatches in tst_QSqlQuery
authorThiago Macieira <thiago.macieira@intel.com>
Sun, 6 May 2012 21:48:46 +0000 (14:48 -0700)
committerQt by Nokia <qt-info@nokia.com>
Mon, 7 May 2012 03:03:17 +0000 (05:03 +0200)
commitf28ba2be974eab5397f6b9d554c3a56b01fed33c
treeeb7d8bf078e6060bfa49d093d5aa28e7f614c84d
parentd0e7014429ff40b535a07801679f5fc66cf7cf12
Fix encoding mismatches in tst_QSqlQuery

The file has been UTF-8 encoded for years, which means that the line:
    QString longerBLOB( "abcdefghijklmnopqrstuvxyz¿äëïöü¡  " );

Loaded a mojibake into QString. Then, this data was stored as a blob
in the database by calling longerBLOB.toLatin1() (a QByteArray), and
reloaded for check using toString().

Once the QString default codec changes to UTF-8, the mojibake would
get fixed, and the test would fail. Make sure it doesn't happen.

Change-Id: If12d6124c973e4a1c1b7978d90fffb9aa5545c66
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp