From 3b3c23bc6d7edebcdb2803859024cec9ffb86440 Mon Sep 17 00:00:00 2001
From: Bill King <bill.king@nokia.com>
Date: Tue, 11 Aug 2009 09:47:57 +1000
Subject: 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.
---
 src/sql/drivers/psql/qsql_psql.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
             {
-- 
cgit v0.12