Change QtSql documentation to recommend QString::toUtf8

Change-Id: I604166677ea182553adffc4835050f2964f2aef9
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
bb10
Thiago Macieira 2012-05-02 14:45:37 +02:00 committed by Qt by Nokia
parent 0c2d643e01
commit afbdf3b1cc
1 changed files with 3 additions and 3 deletions

View File

@ -202,8 +202,8 @@ void QSqlQuery_snippets()
QMapIterator<QString, QVariant> i(query.boundValues());
while (i.hasNext()) {
i.next();
cout << i.key().toAscii().data() << ": "
<< i.value().toString().toAscii().data() << endl;
cout << i.key().toUtf8().data() << ": "
<< i.value().toString().toUtf8().data() << endl;
}
//! [14]
}
@ -213,7 +213,7 @@ void QSqlQuery_snippets()
//! [15]
QList<QVariant> list = query.boundValues().values();
for (int i = 0; i < list.size(); ++i)
cout << i << ": " << list.at(i).toString().toAscii().data() << endl;
cout << i << ": " << list.at(i).toString().toUtf8().data() << endl;
//! [15]
}
}