Skip to content

Commit

Permalink
SQL/ODBC: ignore empty connect options
Browse files Browse the repository at this point in the history
Don'tprint a warning on empty connect options/when no connect option is
set. This ammends 5a03e5c.

Pick-to: 6.8
Change-Id: I83ba8a34a3c08dc596c81ccb494f50af80f9b57c
Reviewed-by: Axel Spoerl <[email protected]>
  • Loading branch information
chehrlic committed Jul 4, 2024
1 parent 73311fb commit 385c939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/sqldrivers/odbc/qsql_odbc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString &connOpts)
{
// Set any connection attributes
SQLRETURN r = SQL_SUCCESS;
for (const auto connOpt : QStringTokenizer{connOpts, u';'}) {
for (const auto connOpt : QStringTokenizer{connOpts, u';', Qt::SkipEmptyParts}) {
int idx;
if ((idx = connOpt.indexOf(u'=')) == -1) {
qSqlWarning(("QODBCDriver::open: Illegal connect option value '%1'"_L1)
Expand Down

0 comments on commit 385c939

Please sign in to comment.