diff options
Diffstat (limited to 'src/plugins/sqldrivers/odbc/qsql_odbc.cpp')
| -rw-r--r-- | src/plugins/sqldrivers/odbc/qsql_odbc.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp index 22493f60290..2a6d5cbb694 100644 --- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp +++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp @@ -10,6 +10,7 @@ #include <qcoreapplication.h> #include <qdatetime.h> #include <qlist.h> +#include <qloggingcategory.h> #include <qmath.h> #include <qsqlerror.h> #include <qsqlfield.h> @@ -26,6 +27,8 @@ QT_BEGIN_NAMESPACE +static Q_LOGGING_CATEGORY(lcOdbc, "qt.sql.odbc") + using namespace Qt::StringLiterals; // non-standard ODBC SQL data type from SQL Server sometimes used instead of SQL_TIME @@ -321,9 +324,9 @@ static void qSqlWarning(const QString &message, T &&val) { const auto addMsg = errorStringFromDiagRecords(qODBCWarn(val)); if (addMsg.isEmpty()) - qWarning() << message; + qCWarning(lcOdbc) << message; else - qWarning() << message << "\tError:" << addMsg; + qCWarning(lcOdbc) << message << "\tError:" << addMsg; } static QSqlError qMakeError(const QString &err, |
