Skip to content
Permalink
Browse files

Fix some chatty debug messages

  • Loading branch information
nyalldawson committed Oct 4, 2018
1 parent ed35ad9 commit e91e342e6acc5ecacd570426171a99dbb6cf6c40
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/qgsvectorlayer.cpp
@@ -1933,19 +1933,19 @@ bool QgsVectorLayer::readSymbology( const QDomNode &layerNode, QString &errorMes
{
//if it has alias
alias = context.projectTranslator()->translate( QStringLiteral( "project:layers:%1:fieldaliases" ).arg( layerNode.namedItem( QStringLiteral( "id" ) ).toElement().text() ), aliasElem.attribute( QStringLiteral( "name" ) ) );
QgsDebugMsgLevel( "context" + QStringLiteral( "project:layers:%1:fieldaliases" ).arg( layerNode.namedItem( QStringLiteral( "id" ) ).toElement().text() ) + " source " + aliasElem.attribute( QStringLiteral( "name" ) ), 1 );
QgsDebugMsgLevel( "context" + QStringLiteral( "project:layers:%1:fieldaliases" ).arg( layerNode.namedItem( QStringLiteral( "id" ) ).toElement().text() ) + " source " + aliasElem.attribute( QStringLiteral( "name" ) ), 3 );
}
else
{
//if it has no alias, it should be the fields translation
alias = context.projectTranslator()->translate( QStringLiteral( "project:layers:%1:fieldaliases" ).arg( layerNode.namedItem( QStringLiteral( "id" ) ).toElement().text() ), field );
QgsDebugMsgLevel( "context" + QStringLiteral( "project:layers:%1:fieldaliases" ).arg( layerNode.namedItem( QStringLiteral( "id" ) ).toElement().text() ) + " source " + field, 1 );
QgsDebugMsgLevel( "context" + QStringLiteral( "project:layers:%1:fieldaliases" ).arg( layerNode.namedItem( QStringLiteral( "id" ) ).toElement().text() ) + " source " + field, 3 );
//if it gets the exact field value, there has been no translation (or not even translation loaded) - so no alias should be generated;
if ( alias == aliasElem.attribute( QStringLiteral( "field" ) ) )
alias.clear();
}

QgsDebugMsgLevel( "field " + field + " origalias " + aliasElem.attribute( QStringLiteral( "name" ) ) + " trans " + alias, 1 );
QgsDebugMsgLevel( "field " + field + " origalias " + aliasElem.attribute( QStringLiteral( "name" ) ) + " trans " + alias, 3 );
mAttributeAliasMap.insert( field, alias );
}
}

0 comments on commit e91e342

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