[QGIS Commit] r10993 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Jul 1 06:24:16 EDT 2009


Author: jef
Date: 2009-07-01 06:24:16 -0400 (Wed, 01 Jul 2009)
New Revision: 10993

Modified:
   trunk/qgis/src/core/qgsvectorlayer.cpp
Log:
reindent qgsvectorlayer.cpp - PLEASE run scripts/prepare-commit.sh before commit

Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2009-07-01 10:11:33 UTC (rev 10992)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2009-07-01 10:24:16 UTC (rev 10993)
@@ -2402,20 +2402,20 @@
   }
 
   mAttributeAliasMap.clear();
-  QDomNode aliasesNode = node.namedItem("aliases");
-  if(!aliasesNode.isNull())
+  QDomNode aliasesNode = node.namedItem( "aliases" );
+  if ( !aliasesNode.isNull() )
   {
     QDomElement aliasElem;
     int index;
     QString name;
 
-    QDomNodeList aliasNodeList = aliasesNode.toElement().elementsByTagName("alias");
-    for(int i = 0; i < aliasNodeList.size(); ++i)
+    QDomNodeList aliasNodeList = aliasesNode.toElement().elementsByTagName( "alias" );
+    for ( int i = 0; i < aliasNodeList.size(); ++i )
     {
-      aliasElem = aliasNodeList.at(i).toElement();
-      index = aliasElem.attribute("index").toInt();
-      name = aliasElem.attribute("name");
-      mAttributeAliasMap.insert(index, name);
+      aliasElem = aliasNodeList.at( i ).toElement();
+      index = aliasElem.attribute( "index" ).toInt();
+      name = aliasElem.attribute( "name" );
+      mAttributeAliasMap.insert( index, name );
     }
   }
 
@@ -2553,18 +2553,18 @@
   }
 
   //attribute aliases
-  if(mAttributeAliasMap.size() > 0)
+  if ( mAttributeAliasMap.size() > 0 )
   {
-    QDomElement aliasElem = doc.createElement("aliases");
+    QDomElement aliasElem = doc.createElement( "aliases" );
     QMap<int, QString>::const_iterator a_it = mAttributeAliasMap.constBegin();
-    for(; a_it != mAttributeAliasMap.constEnd(); ++a_it)
+    for ( ; a_it != mAttributeAliasMap.constEnd(); ++a_it )
     {
-      QDomElement aliasEntryElem = doc.createElement("alias");
-      aliasEntryElem.setAttribute("index", QString::number(a_it.key()));
-      aliasEntryElem.setAttribute("name", a_it.value());
-      aliasElem.appendChild(aliasEntryElem);
+      QDomElement aliasEntryElem = doc.createElement( "alias" );
+      aliasEntryElem.setAttribute( "index", QString::number( a_it.key() ) );
+      aliasEntryElem.setAttribute( "name", a_it.value() );
+      aliasElem.appendChild( aliasEntryElem );
     }
-    node.appendChild(aliasElem);
+    node.appendChild( aliasElem );
   }
 
   // add the display field
@@ -2713,16 +2713,16 @@
   return addAttribute( QgsField( name, map[ type ], type ) );
 }
 
-void QgsVectorLayer::addAttributeAlias(int attIndex, QString aliasString)
+void QgsVectorLayer::addAttributeAlias( int attIndex, QString aliasString )
 {
-  mAttributeAliasMap.insert(attIndex, aliasString);
-  emit layerModified(false);
+  mAttributeAliasMap.insert( attIndex, aliasString );
+  emit layerModified( false );
 }
 
-QString QgsVectorLayer::attributeAlias(int attributeIndex) const
+QString QgsVectorLayer::attributeAlias( int attributeIndex ) const
 {
-  QMap<int, QString>::const_iterator alias_it = mAttributeAliasMap.find(attributeIndex);
-  if(alias_it != mAttributeAliasMap.constEnd())
+  QMap<int, QString>::const_iterator alias_it = mAttributeAliasMap.find( attributeIndex );
+  if ( alias_it != mAttributeAliasMap.constEnd() )
   {
     return alias_it.value();
   }
@@ -2732,10 +2732,10 @@
   }
 }
 
-QString QgsVectorLayer::attributeDisplayName(int attributeIndex) const
+QString QgsVectorLayer::attributeDisplayName( int attributeIndex ) const
 {
-  QString displayName = attributeAlias(attributeIndex);
-  if(displayName.isEmpty())
+  QString displayName = attributeAlias( attributeIndex );
+  if ( displayName.isEmpty() )
   {
     const QgsFieldMap& fields = pendingFields();
     QgsFieldMap::const_iterator fieldIt = fields.find( attributeIndex );
@@ -2767,7 +2767,7 @@
   mDeletedAttributeIds.insert( index );
   mAddedAttributeIds.remove( index );
   mUpdatedFields.remove( index );
-  mAttributeAliasMap.remove(index);
+  mAttributeAliasMap.remove( index );
 
   setModified( true, false );
 



More information about the QGIS-commit mailing list