Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
  • Loading branch information
2 people authored and nyalldawson committed Jun 19, 2020
1 parent 4b36262 commit e55751b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/core/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -1485,7 +1485,7 @@ QVariant QgsOgrProvider::defaultValue( int fieldId ) const

if ( ! ok )
{
QgsMessageLog::logMessage( tr( "Error retrieving next sequence value for %1" ).arg( QString( mOgrOrigLayer->name() ) ), tr( "OGR" ) );
QgsMessageLog::logMessage( tr( "Error retrieving next sequence value for %1" ).arg( QString::fromUtf8( mOgrOrigLayer->name() ) ), tr( "OGR" ) );
}
}
else // no sequence!
Expand Down Expand Up @@ -6923,4 +6923,3 @@ void QgsOgrProviderMetadata::saveConnection( const QgsAbstractProviderConnection
}

///@endcond

4 changes: 2 additions & 2 deletions src/core/qgssqliteutils.cpp
Expand Up @@ -233,8 +233,8 @@ long long QgsSqliteUtils::nextSequenceValue( sqlite3 *connection, const QString
else // increment
{
if ( dsPtr.exec( QStringLiteral( "UPDATE sqlite_sequence SET seq = %1 WHERE name = %2" )
.arg( QString::number( ++result ) )
.arg( quotedTableName ), errorMessage ) != SQLITE_OK )
.arg( QString::number( ++result ),
quotedTableName ), errorMessage ) != SQLITE_OK )
{
errorMessage = QObject::tr( "Error retrieving default value for %1" ).arg( tableName );
result = -1;
Expand Down

0 comments on commit e55751b

Please sign in to comment.