summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers/tds/qsql_tds.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-05-29 15:09:04 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-05-29 18:24:29 +0200
commit2f542dd99636bbfbf0f3fad861dfd292efe81b01 (patch)
tree4104423b87489a0e89ca237cea560ac0cadb789b /src/plugins/sqldrivers/tds/qsql_tds.cpp
parentdd8131e3b25a4ac60eb55022b69b374f0b9a476c (diff)
Use QStringView overloads of <QDate/Time>::toString()
There are no QLatin1String overloads, so using QLatin1String as the format string produced a temporary QString. Use QStringViewLiteral instead. Change-Id: I682eb8cfaa98fdcfb491edd290460db636a98a9f Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers/tds/qsql_tds.cpp')
-rw-r--r--src/plugins/sqldrivers/tds/qsql_tds.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/sqldrivers/tds/qsql_tds.cpp b/src/plugins/sqldrivers/tds/qsql_tds.cpp
index ad95b097ef..603372230d 100644
--- a/src/plugins/sqldrivers/tds/qsql_tds.cpp
+++ b/src/plugins/sqldrivers/tds/qsql_tds.cpp
@@ -813,7 +813,7 @@ QString QTDSDriver::formatValue(const QSqlField &field,
r = QLatin1String("NULL");
else if (field.type() == QVariant::DateTime) {
if (field.value().toDateTime().isValid()){
- r = field.value().toDateTime().toString(QLatin1String("yyyyMMdd hh:mm:ss"));
+ r = field.value().toDateTime().toString(QStringViewLiteral("yyyyMMdd hh:mm:ss"));
r.prepend(QLatin1String("'"));
r.append(QLatin1String("'"));
} else