Skip to content
Permalink
Browse files

fix windows build

  • Loading branch information
jef-n committed Nov 22, 2018
1 parent b6d9e0b commit 5a8c9bf52e640f5391ef2e219075893c45055a9a
@@ -44,6 +44,7 @@ class APP_EXPORT QgsDatumTransformTableModel : public QAbstractTableModel
};

QgsDatumTransformTableModel( QObject *parent = nullptr );
~QgsDatumTransformTableModel() {}

void setTransformContext( const QgsCoordinateTransformContext &context );

@@ -743,6 +743,12 @@ bool QgsGeoPackageAbstractLayerItem::executeDeleteLayer( QString &errCause )
return false;
}

static int collect_strings( void *names, int argc, char **argv, char ** )
{
*static_cast<QList<QString>*>( names ) << QString::fromUtf8( argv[ 0 ] );
return 0;
}

QList<QString> QgsGeoPackageAbstractLayerItem::tableNames()
{
QList<QString> names;
@@ -758,15 +764,11 @@ QList<QString> QgsGeoPackageAbstractLayerItem::tableNames()
{
char *sql = sqlite3_mprintf( "SELECT table_name FROM gpkg_contents;" );
status = sqlite3_exec(
database.get(), /* An open database */
sql, /* SQL to be evaluated */
+[]( void *names, int, char **argv, char ** )
{
*static_cast<QList<QString>*>( names ) << QString( argv[ 0 ] );
return 0;
}, /* Callback function */
&names, /* 1st argument to callback */
&errmsg /* Error msg written here */
database.get(), /* An open database */
sql, /* SQL to be evaluated */
collect_strings, /* Callback function */
&names, /* 1st argument to callback */
&errmsg /* Error msg written here */
);
sqlite3_free( sql );
if ( status != SQLITE_OK )
@@ -646,7 +646,7 @@ datasets with maximum width and height specified below.</string>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<spacer name="horizontalSpacer1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -407,7 +407,7 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="horizontalLayout1">
<item>
<widget class="QDialogButtonBox" name="mHelpButtonBox">
<property name="orientation">

0 comments on commit 5a8c9bf

Please sign in to comment.
You can’t perform that action at this time.