Skip to content

Commit

Permalink
Rename QgsSqlite3Mprintf to qgs_sqlite3_mprintf
Browse files Browse the repository at this point in the history
It's not a class name
  • Loading branch information
m-kuhn authored and nyalldawson committed Aug 18, 2020
1 parent fbd80cc commit 97fd45a
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 87 deletions.
6 changes: 3 additions & 3 deletions src/core/qgssqliteutils.cpp
Expand Up @@ -127,7 +127,7 @@ QSet<QString> QgsSqliteUtils::uniqueFields( sqlite3 *connection, const QString &
char *zErrMsg = 0;
std::vector<std::string> rows;
QByteArray tableNameUtf8 = quotedIdentifier( tableName ).toUtf8();
QString sql = QgsSqlite3Mprintf( "select sql from sqlite_master "
QString sql = qgs_sqlite3_mprintf( "select sql from sqlite_master "
"where type='table' and name=%q", tableNameUtf8.constData() );
auto cb = [ ](
void *data /* Data provided in the 4th argument of sqlite3_exec() */,
Expand Down Expand Up @@ -173,7 +173,7 @@ QSet<QString> QgsSqliteUtils::uniqueFields( sqlite3 *connection, const QString &
rows.clear();

// Search indexes:
sql = QgsSqlite3Mprintf( "SELECT sql FROM sqlite_master WHERE type='index' AND"
sql = qgs_sqlite3_mprintf( "SELECT sql FROM sqlite_master WHERE type='index' AND"
" tbl_name='%q' AND sql LIKE 'CREATE UNIQUE INDEX%%'", tableNameUtf8.constData() );
rc = sqlite3_exec( connection, sql.toUtf8(), cb, ( void * )&rows, &zErrMsg );
if ( rc != SQLITE_OK )
Expand Down Expand Up @@ -309,7 +309,7 @@ QStringList QgsSqliteUtils::systemTables()
<< QStringLiteral( "ElementaryGeometries" );
}

QString QgsSqlite3Mprintf( const char *format, ... )
QString qgs_sqlite3_mprintf( const char *format, ... )
{
va_list ap;
va_start( ap, format );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgssqliteutils.h
Expand Up @@ -161,7 +161,7 @@ class CORE_EXPORT sqlite3_database_unique_ptr : public std::unique_ptr< sqlite3,
* \note not available in Python bindings.
* \since QGIS 3.2
*/
QString CORE_EXPORT QgsSqlite3Mprintf( const char *format, ... );
QString CORE_EXPORT qgs_sqlite3_mprintf( const char *format, ... );

#endif

Expand Down

0 comments on commit 97fd45a

Please sign in to comment.