Skip to content
Permalink
Browse files

Don't warn for "System" codec not found

No need to reload a codec that just has not been found. And no reason to
warn the user because in the end we will return the system codec
obtained by a different method in any case.
  • Loading branch information
m-kuhn committed Jul 13, 2016
1 parent cfc1a9d commit 2675c4248beac273ffa9006fa6bdb6be4676439c
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/core/qgsvectordataprovider.cpp
@@ -139,8 +139,11 @@ void QgsVectorDataProvider::setEncoding( const QString& e )
}
else
{
QgsMessageLog::logMessage( tr( "Codec %1 not found. Falling back to system locale" ).arg( e ) );
mEncoding = QTextCodec::codecForName( "System" );
if ( e != "System" )
{
QgsMessageLog::logMessage( tr( "Codec %1 not found. Falling back to system locale" ).arg( e ) );
mEncoding = QTextCodec::codecForName( "System" );
}

if ( !mEncoding )
mEncoding = QTextCodec::codecForLocale();

0 comments on commit 2675c42

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