mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
indentation update
This commit is contained in:
parent
67376d14d9
commit
ed286eb198
@ -162,4 +162,3 @@ class RUtils:
|
||||
def getRequiredPackages(code):
|
||||
regex = re.compile('library\("?(.*?)"?\)')
|
||||
return regex.findall(code)
|
||||
|
@ -46,24 +46,24 @@ QgsMimeDataUtils::Uri::Uri( QString& encData )
|
||||
QChar escape = '\\';
|
||||
QString part;
|
||||
bool inEscape = false;
|
||||
for (int i = 0; i < encData.length(); ++i)
|
||||
for ( int i = 0; i < encData.length(); ++i )
|
||||
{
|
||||
if (encData.at(i) == escape && !inEscape)
|
||||
if ( encData.at( i ) == escape && !inEscape )
|
||||
{
|
||||
inEscape = true;
|
||||
}
|
||||
else if (encData.at(i) == split && !inEscape)
|
||||
else if ( encData.at( i ) == split && !inEscape )
|
||||
{
|
||||
parts << part;
|
||||
part = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
part += encData.at(i);
|
||||
part += encData.at( i );
|
||||
inEscape = false;
|
||||
}
|
||||
}
|
||||
if (!part.isEmpty())
|
||||
if ( !part.isEmpty() )
|
||||
{
|
||||
parts << part;
|
||||
}
|
||||
@ -82,8 +82,8 @@ QString QgsMimeDataUtils::Uri::data() const
|
||||
{
|
||||
QString escapedName = name;
|
||||
QString escapeUri = uri;
|
||||
escapedName.replace(":", "\\:");
|
||||
escapeUri.replace(":", "\\:");
|
||||
escapedName.replace( ":", "\\:" );
|
||||
escapeUri.replace( ":", "\\:" );
|
||||
return layerType + ":" + providerKey + ":" + escapedName + ":" + escapeUri;
|
||||
}
|
||||
|
||||
|
@ -820,7 +820,7 @@ int QgsProjectFileTransform::rasterBandNumber( const QDomElement& rasterProperti
|
||||
|
||||
if ( re.indexIn( rasterBandElem.text() ) >= 0 )
|
||||
{
|
||||
return re.cap(1).toInt();
|
||||
return re.cap( 1 ).toInt();
|
||||
}
|
||||
}
|
||||
return band;
|
||||
|
@ -267,7 +267,7 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
|
||||
commitErrors << tr( "ERROR: %n attribute(s) not deleted.", "not deleted attributes count", mDeletedAttributeIds.size() );
|
||||
#if 0
|
||||
QString list = "ERROR: Pending attribute deletes:";
|
||||
foreach( int idx, mDeletedAttributeIds )
|
||||
foreach ( int idx, mDeletedAttributeIds )
|
||||
{
|
||||
list.append( " " + L->pendingFields()[idx].name() );
|
||||
}
|
||||
@ -296,7 +296,7 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
|
||||
commitErrors << tr( "ERROR: %n new attribute(s) not added", "not added attributes count", mAddedAttributes.size() );
|
||||
#if 0
|
||||
QString list = "ERROR: Pending adds:";
|
||||
foreach( QgsField f, mAddedAttributes )
|
||||
foreach ( QgsField f, mAddedAttributes )
|
||||
{
|
||||
list.append( " " + f.name() );
|
||||
}
|
||||
@ -353,10 +353,10 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
|
||||
commitErrors << tr( "ERROR: %n attribute value change(s) not applied.", "not changed attribute values count", mChangedAttributeValues.size() );
|
||||
#if 0
|
||||
QString list = "ERROR: pending changes:";
|
||||
foreach( QgsFeatureId id, mChangedAttributeValues.keys() )
|
||||
foreach ( QgsFeatureId id, mChangedAttributeValues.keys() )
|
||||
{
|
||||
list.append( "\n " + FID_TO_STRING( id ) + "[" );
|
||||
foreach( int idx, mChangedAttributeValues[ id ].keys() )
|
||||
foreach ( int idx, mChangedAttributeValues[ id ].keys() )
|
||||
{
|
||||
list.append( QString( " %1:%2" ).arg( L->pendingFields()[idx].name() ).arg( mChangedAttributeValues[id][idx].toString() ) );
|
||||
}
|
||||
@ -392,7 +392,7 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
|
||||
commitErrors << tr( "ERROR: %n feature(s) not deleted.", "not deleted features count", mDeletedFeatureIds.size() );
|
||||
#if 0
|
||||
QString list = "ERROR: pending deletes:";
|
||||
foreach( QgsFeatureId id, mDeletedFeatureIds )
|
||||
foreach ( QgsFeatureId id, mDeletedFeatureIds )
|
||||
{
|
||||
list.append( " " + FID_TO_STRING( id ) );
|
||||
}
|
||||
@ -441,10 +441,10 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
|
||||
commitErrors << tr( "ERROR: %n feature(s) not added.", "not added features count", mAddedFeatures.size() );
|
||||
#if 0
|
||||
QString list = "ERROR: pending adds:";
|
||||
foreach( QgsFeature f, mAddedFeatures )
|
||||
foreach ( QgsFeature f, mAddedFeatures )
|
||||
{
|
||||
list.append( " " + FID_TO_STRING( f.id() ) + "[" );
|
||||
for( int i = 0; i < L->pendingFields().size(); i++ )
|
||||
for ( int i = 0; i < L->pendingFields().size(); i++ )
|
||||
{
|
||||
list.append( QString( " %1:%2" ).arg( L->pendingFields()[i].name() ).arg( f.attributes()[i].toString() ) );
|
||||
}
|
||||
|
@ -651,7 +651,7 @@ void QgsSpatiaLiteProvider::loadFieldsAbstractInterface( gaiaVectorLayerPtr lyr
|
||||
if ( pk.toInt() == 0 )
|
||||
continue;
|
||||
|
||||
if( mPrimaryKey.isEmpty() )
|
||||
if ( mPrimaryKey.isEmpty() )
|
||||
mPrimaryKey = name;
|
||||
mPrimaryKeyAttrs << i - 1;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ void TestQgsRubberband::testAddSingleMultiGeometries()
|
||||
QgsGeometry* geomSinglePart = QgsGeometry::fromWkt( "POLYGON((-0.00022418 -0.00000279,-0.0001039 0.00002395,-0.00008677 -0.00005313,-0.00020705 -0.00007987,-0.00022418 -0.00000279))" );
|
||||
QgsGeometry* geomMultiPart = QgsGeometry::fromWkt( "MULTIPOLYGON(((-0.00018203 0.00012178,-0.00009444 0.00014125,-0.00007861 0.00007001,-0.00016619 0.00005054,-0.00018203 0.00012178)),((-0.00030957 0.00009464,-0.00021849 0.00011489,-0.00020447 0.00005184,-0.00029555 0.00003158,-0.00030957 0.00009464)))" );
|
||||
|
||||
mCanvas->setExtent(QgsRectangle(-1e-3,-1e-3,1e-3,1e-3)); // otherwise point cannot be converted to canvas coord
|
||||
mCanvas->setExtent( QgsRectangle( -1e-3, -1e-3, 1e-3, 1e-3 ) ); // otherwise point cannot be converted to canvas coord
|
||||
|
||||
mRubberband->addGeometry( geomSinglePart, mPolygonLayer );
|
||||
mRubberband->addGeometry( geomMultiPart, mPolygonLayer );
|
||||
|
Loading…
x
Reference in New Issue
Block a user