Skip to content
Permalink
Browse files

[WFS provider] Display appropriate error message when using a non exi…

…sting typename
  • Loading branch information
rouault committed Jun 6, 2016
1 parent 021da12 commit 3acbe71fa258d786744a6bb6be288d757fc33ef3
Showing with 16 additions and 2 deletions.
  1. +16 −2 src/providers/wfs/qgswfsprovider.cpp
@@ -311,7 +311,14 @@ bool QgsWFSProvider::processSQL( const QString& sqlString, QString& errorMsg )
QString prefixedTypename( mShared->mCaps.addPrefixIfNeeded( table->name() ) );
if ( prefixedTypename.isEmpty() )
{
errorMsg = tr( "Typename '%1' is ambiguous without prefix" ).arg( table->name() );
if ( mShared->mCaps.setAmbiguousUnprefixedTypename.contains( table->name() ) )
{
errorMsg = tr( "Typename '%1' is ambiguous without prefix" ).arg( table->name() );
}
else
{
errorMsg = tr( "Typename '%1' is unknown" ).arg( table->name() );
}
return false;
}
typenameList << prefixedTypename;
@@ -339,7 +346,14 @@ bool QgsWFSProvider::processSQL( const QString& sqlString, QString& errorMsg )
QString prefixedTypename( mShared->mCaps.addPrefixIfNeeded( table->name() ) );
if ( prefixedTypename.isEmpty() )
{
errorMsg = tr( "Typename '%1' is ambiguous without prefix" ).arg( table->name() );
if ( mShared->mCaps.setAmbiguousUnprefixedTypename.contains( table->name() ) )
{
errorMsg = tr( "Typename '%1' is ambiguous without prefix" ).arg( table->name() );
}
else
{
errorMsg = tr( "Typename '%1' is unknown" ).arg( table->name() );
}
return false;
}
typenameList << prefixedTypename;

0 comments on commit 3acbe71

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