Skip to content

Commit

Permalink
fix ogr provider's createEmptyDataSource()
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 27, 2012
1 parent e6c591f commit 84625ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/providers/ogr/qgsogrprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ QGISEXTERN bool createEmptyDataSource( const QString &uri,
const QString &format,
const QString &encoding,
QGis::WkbType vectortype,
const std::list<std::pair<QString, QString> > &attributes,
const QList< QPair<QString, QString> > &attributes,
const QgsCoordinateReferenceSystem *srs = NULL )
{
QgsDebugMsg( QString( "Creating empty vector layer with format: %1" ).arg( format ) );
Expand All @@ -1957,7 +1957,7 @@ QGISEXTERN bool createEmptyDataSource( const QString &uri,

// check for duplicate fieldnames
QSet<QString> fieldNames;
std::list<std::pair<QString, QString> >::const_iterator fldIt;
QList<QPair<QString, QString> >::const_iterator fldIt;
for ( fldIt = attributes.begin(); fldIt != attributes.end(); ++fldIt )
{
QString name = fldIt->first.left( 10 );
Expand Down Expand Up @@ -2052,7 +2052,7 @@ QGISEXTERN bool createEmptyDataSource( const QString &uri,
Q_ASSERT( codec );
}

for ( std::list<std::pair<QString, QString> >::const_iterator it = attributes.begin(); it != attributes.end(); ++it )
for ( QList<QPair<QString, QString> >::const_iterator it = attributes.begin(); it != attributes.end(); ++it )
{
QStringList fields = it->second.split( ";" );

Expand Down

0 comments on commit 84625ee

Please sign in to comment.