Skip to content

Commit

Permalink
Fix clang tidy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 24, 2025
1 parent 1ee95d2 commit 3f3fde3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/providers/mssql/qgsmssqldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ QSqlQuery QgsMssqlDatabase::createQuery()
QMetaType::Type QgsMssqlDatabase::decodeSqlType( const QString &sqlTypeName )
{
QMetaType::Type type = QMetaType::Type::UnknownType;
// cloned branches are intentional here for improved readability
// NOLINTBEGIN(bugprone-branch-clone)
if ( sqlTypeName.startsWith( QLatin1String( "decimal" ), Qt::CaseInsensitive ) || sqlTypeName.startsWith( QLatin1String( "numeric" ), Qt::CaseInsensitive ) || sqlTypeName.startsWith( QLatin1String( "real" ), Qt::CaseInsensitive ) || sqlTypeName.startsWith( QLatin1String( "float" ), Qt::CaseInsensitive ) )
{
type = QMetaType::Type::Double;
Expand Down Expand Up @@ -210,6 +212,7 @@ QMetaType::Type QgsMssqlDatabase::decodeSqlType( const QString &sqlTypeName )
// Everything else just dumped as a string.
type = QMetaType::Type::QString;
}
// NOLINTEND(bugprone-branch-clone)

return type;
}
Expand Down

0 comments on commit 3f3fde3

Please sign in to comment.