Skip to content

Commit

Permalink
resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Jul 6, 2018
1 parent 870d078 commit 1a8f06e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/core/qgsvectordataprovider.cpp
Expand Up @@ -297,22 +297,22 @@ bool QgsVectorDataProvider::supportedType( const QgsField &field ) const
QVariant::typeToName( field.type() ) ) QVariant::typeToName( field.type() ) )
.arg( field.length() ) .arg( field.length() )
.arg( field.precision() ), 2 ); .arg( field.precision() ), 2 );
for ( i = 0; i < mNativeTypes.size(); i++ ) Q_FOREACH ( const NativeType &nativeType, mNativeTypes )
{ {
QgsDebugMsgLevel( QString( "native field type = %1 min length = %2 max length = %3 min precision = %4 max precision = %5" ) QgsDebugMsgLevel( QString( "native field type = %1 min length = %2 max length = %3 min precision = %4 max precision = %5" )
.arg( QVariant::typeToName( mNativeTypes[i].mType ) ) .arg( QVariant::typeToName( nativeType.mType ) )
.arg( mNativeTypes[i].mMinLen ) .arg( nativeType.mMinLen )
.arg( mNativeTypes[i].mMaxLen ) .arg( nativeType.mMaxLen )
.arg( mNativeTypes[i].mMinPrec ) .arg( nativeType.mMinPrec )
.arg( mNativeTypes[i].mMaxPrec ), 2 ); .arg( nativeType.mMaxPrec ), 2 );


if ( field.type() != mNativeTypes[i].mType ) if ( field.type() != nativeType.mType )
continue; continue;


if ( field.length() == -1 ) if ( field.length() == -1 )
{ {
// source length unlimited // source length unlimited
if ( mNativeTypes[i].mMinLen > -1 || mNativeTypes[i].mMaxLen > -1 ) if ( nativeType.mMinLen > -1 || nativeType.mMaxLen > -1 )
{ {
// destination limited // destination limited
continue; continue;
Expand All @@ -321,8 +321,8 @@ bool QgsVectorDataProvider::supportedType( const QgsField &field ) const
else else
{ {
// source length limited // source length limited
if ( mNativeTypes[i].mMinLen > -1 && mNativeTypes[i].mMaxLen > -1 && if ( nativeType.mMinLen > -1 && nativeType.mMaxLen > -1 &&
( field.length() < mNativeTypes[i].mMinLen || field.length() > mNativeTypes[i].mMaxLen ) ) ( field.length() < nativeType.mMinLen || field.length() > nativeType.mMaxLen ) )
{ {
// source length exceeds destination limits // source length exceeds destination limits
continue; continue;
Expand All @@ -332,7 +332,7 @@ bool QgsVectorDataProvider::supportedType( const QgsField &field ) const
if ( field.precision() == -1 ) if ( field.precision() == -1 )
{ {
// source precision unlimited / n/a // source precision unlimited / n/a
if ( mNativeTypes[i].mMinPrec > -1 || mNativeTypes[i].mMaxPrec > -1 ) if ( nativeType.mMinPrec > -1 || nativeType.mMaxPrec > -1 )
{ {
// destination limited // destination limited
continue; continue;
Expand All @@ -341,8 +341,8 @@ bool QgsVectorDataProvider::supportedType( const QgsField &field ) const
else else
{ {
// source precision unlimited / n/a // source precision unlimited / n/a
if ( mNativeTypes[i].mMinPrec > -1 && mNativeTypes[i].mMaxPrec > -1 && if ( nativeType.mMinPrec > -1 && nativeType.mMaxPrec > -1 &&
( field.precision() < mNativeTypes[i].mMinPrec || field.precision() > mNativeTypes[i].mMaxPrec ) ) ( field.precision() < nativeType.mMinPrec || field.precision() > nativeType.mMaxPrec ) )
{ {
// source precision exceeds destination limits // source precision exceeds destination limits
continue; continue;
Expand Down

0 comments on commit 1a8f06e

Please sign in to comment.