Convert Boolean value into integer
authorHonglei Zhang <honglei.zhang@nokia.com>
Wed, 7 Mar 2012 10:02:02 +0000 (12:02 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 2 Apr 2012 21:06:30 +0000 (23:06 +0200)
commit50ad785bdd38fcff9c47125fc545762435aaa158
treea5ff6f76544d0a223a4efe7da87bd2e6f5d1d3e6
parent1967c147373be39f3e9f38967044812ce13ad10e
Convert Boolean value into integer

According to documentation, SQLite doesn't have a separate Boolean
storage class. Instead, values are stored as integers 0(false) and
1(true). In QSqlQuery::bindValue(), if a boolean value is bound
to a placeholder, it is converted to text true and false. This fix
converts boolean value to integer 0 and 1.

Task-number: QTBUG-23895
Change-Id: I4945971172f0b5e5819446700390033a1a4ce301
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
src/sql/drivers/sqlite/qsql_sqlite.cpp
tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp