--- a/src/sql/kernel/qsqlresult.cpp Tue Feb 02 00:43:10 2010 +0200
+++ b/src/sql/kernel/qsqlresult.cpp Wed Mar 31 11:06:36 2010 +0300
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -136,7 +136,7 @@
i >>= 4;
}
- return QString::fromUtf16(arr, int(ptr - arr) + 1);
+ return QString(reinterpret_cast<const QChar *>(arr), int(ptr - arr) + 1);
}
static bool qIsAlnum(QChar ch)
@@ -564,6 +564,9 @@
scrollable. isForwardOnly() will always return the correct status of
the result set.
+ \note Calling setForwardOnly after execution of the query will result
+ in unexpected results at best, and crashes at worst.
+
\sa isForwardOnly(), fetchNext(), QSqlQuery::setForwardOnly()
*/
void QSqlResult::setForwardOnly(bool forward)
@@ -707,7 +710,15 @@
Binds the value \a val of parameter type \a paramType to the \a
placeholder name in the current record (row).
- Note that binding an undefined placeholder will result in undefined behavior.
+ Values cannot be bound to multiple locations in the query, eg:
+ \code
+ INSERT INTO testtable (id, name, samename) VALUES (:id, :name, :name)
+ \endcode
+ Binding to name will bind to the first :name, but not the second.
+
+ \note Binding an undefined placeholder will result in undefined behavior.
+
+ \sa QSqlQuery::bindValue()
*/
void QSqlResult::bindValue(const QString& placeholder, const QVariant& val,
QSql::ParamType paramType)