summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers/tds
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-09 17:17:57 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-10 21:18:26 +0000
commit8247ce9766594cc740bb15415b162ec7f1b00f6a (patch)
treef66030f3ecf7d5711d348818af417102e239e1ab /src/plugins/sqldrivers/tds
parent344acfb9fed285f4f822c0fdc1b2ba22887c0f04 (diff)
SQL plugins: Fix warnings about deprecated constructor of QSqlError
Use the constructor taking a string and convert number unless it is -1. Change-Id: I18d1ba2c8e0d3f4af01b7955863967f75051746b Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers/tds')
-rw-r--r--src/plugins/sqldrivers/tds/qsql_tds.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/sqldrivers/tds/qsql_tds.cpp b/src/plugins/sqldrivers/tds/qsql_tds.cpp
index 5fc34da407..ad95b097ef 100644
--- a/src/plugins/sqldrivers/tds/qsql_tds.cpp
+++ b/src/plugins/sqldrivers/tds/qsql_tds.cpp
@@ -132,7 +132,8 @@ QT_BEGIN_NAMESPACE
QSqlError qMakeError(const QString& err, QSqlError::ErrorType type, int errNo = -1)
{
- return QSqlError(QLatin1String("QTDS: ") + err, QString(), type, errNo);
+ return QSqlError(QLatin1String("QTDS: ") + err, QString(), type,
+ errNo != -1 ? QString::number(errNo) : QString());
}
class QTDSDriverPrivate : public QSqlDriverPrivate