summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-08-10 23:47:57 (GMT)
committerBill King <bill.king@nokia.com>2009-08-10 23:47:57 (GMT)
commit3b3c23bc6d7edebcdb2803859024cec9ffb86440 (patch)
treed7023208ee1d1a52092a558e3e4a258309b78472 /src
parent6e699850938527bb25a5453f66d950fa95a8789b (diff)
downloadQt-3b3c23bc6d7edebcdb2803859024cec9ffb86440.zip
Qt-3b3c23bc6d7edebcdb2803859024cec9ffb86440.tar.gz
Qt-3b3c23bc6d7edebcdb2803859024cec9ffb86440.tar.bz2
Fixes formatting of date strings in psql driver
After the coverity fix, the proper code path executed, which failed to enquote the date field properly, so this fix fixes that issue.
Diffstat (limited to 'src')
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index 8e90a06..12711bb 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -1133,7 +1133,7 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const
case QVariant::Time:
#ifndef QT_NO_DATESTRING
if (field.value().toTime().isValid()) {
- r = field.value().toTime().toString(Qt::ISODate);
+ r = QLatin1Char('\'') + field.value().toTime().toString(Qt::ISODate) + QLatin1Char('\'');
} else
#endif
{