Skip to content

Commit ba0a1eb

Browse files
author
jef
committed
automatic indentation update (r10488-r10594)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10595 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent cbf5ee4 commit ba0a1eb

10 files changed

+113
-113
lines changed

src/app/qgsabout.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ void QgsAbout::init()
164164
if ( translatorFile.open( QIODevice::ReadOnly ) )
165165
{
166166
QString translatorHTML = ""
167-
+ tr( "<p>The following have contributed to QGIS"
168-
" by translating the user interface or documentation</p>" )
169-
+ "<hr>"
170-
"<table width='100%'>"
171-
"<tr><th>" + tr( "Language" ) + "</th>"
172-
"<th>" + tr( "Names" ) + "</th></tr>";
167+
+ tr( "<p>The following have contributed to QGIS"
168+
" by translating the user interface or documentation</p>" )
169+
+ "<hr>"
170+
"<table width='100%'>"
171+
"<tr><th>" + tr( "Language" ) + "</th>"
172+
"<th>" + tr( "Names" ) + "</th></tr>";
173173
QString website;
174174
QTextStream translatorStream( &translatorFile );
175175
// Always use UTF-8

src/app/qgsattributeactiondialog.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ void QgsAttributeActionDialog::insert( int pos )
184184

185185
if ( actionName->text().isEmpty() || actionAction->text().isEmpty() )
186186
{
187-
QMessageBox::warning( this, tr( "Missing Information" ),
188-
tr( "To create an attribute action, you must provide both a name and the action to perform." ) );
187+
QMessageBox::warning( this, tr( "Missing Information" ),
188+
tr( "To create an attribute action, you must provide both a name and the action to perform." ) );
189189

190190
}
191191
else
@@ -216,7 +216,7 @@ void QgsAttributeActionDialog::insert( int pos )
216216
attributeActionTable->item( pos, 0 )->setText( name );
217217
attributeActionTable->item( pos, 1 )->setText( actionAction->text() );
218218
attributeActionTable->item( pos, 2 )->setCheckState(
219-
captureCB->isChecked() ? Qt::Checked : Qt::Unchecked );
219+
captureCB->isChecked() ? Qt::Checked : Qt::Unchecked );
220220
}
221221
}
222222
}

src/app/qgsmaptooladdvertex.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,20 @@ void QgsMapToolAddVertex::canvasReleaseEvent( QMouseEvent * e )
9999
//ignore the snapping results that are on features / segments already considered in mRecentSnappingResults
100100
QList<QgsSnappingResult> filteredSnapResults = snapResults;
101101
QList<QgsSnappingResult>::iterator recentIt = mRecentSnappingResults.begin();
102-
for(; recentIt != mRecentSnappingResults.end(); ++recentIt)
102+
for ( ; recentIt != mRecentSnappingResults.end(); ++recentIt )
103103
{
104-
QList<QgsSnappingResult>::iterator filterIt = filteredSnapResults.begin();
105-
for(; filterIt != filteredSnapResults.end(); ++filterIt)
104+
QList<QgsSnappingResult>::iterator filterIt = filteredSnapResults.begin();
105+
for ( ; filterIt != filteredSnapResults.end(); ++filterIt )
106+
{
107+
if ( filterIt->snappedAtGeometry == recentIt->snappedAtGeometry \
108+
&& filterIt->snappedVertexNr == recentIt->snappedVertexNr \
109+
&& filterIt->beforeVertexNr == recentIt->beforeVertexNr )
106110
{
107-
if(filterIt->snappedAtGeometry == recentIt->snappedAtGeometry \
108-
&& filterIt->snappedVertexNr == recentIt->snappedVertexNr \
109-
&& filterIt->beforeVertexNr == recentIt->beforeVertexNr )
110-
{
111-
filteredSnapResults.erase(filterIt);
112-
continue;
113-
}
114-
111+
filteredSnapResults.erase( filterIt );
112+
continue;
115113
}
114+
115+
}
116116
}
117117
insertSegmentVerticesForSnap( filteredSnapResults, vlayer );
118118
}

src/core/qgsdatasourceuri.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CORE_EXPORT QgsDataSourceURI
4949
QString quotedTablename() const;
5050

5151
//! Set all connection related members at once
52-
//! \note This optional sslmode parameter has been added in version 1.1
52+
//! \note This optional sslmode parameter has been added in version 1.1
5353
void setConnection( const QString& aHost,
5454
const QString& aPort,
5555
const QString& aDatabase,

src/core/qgsmaprenderer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ void QgsMapRenderer::render( QPainter* painter )
471471
overlayManager->removeLayers();
472472
}
473473

474-
delete overlayManager;
474+
delete overlayManager;
475475
// make sure progress bar arrives at 100%!
476476
emit drawingProgress( 1, 1 );
477477

src/core/qgstolerance.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ double QgsTolerance::computeMapUnitPerPixel( QgsMapLayer* layer, QgsMapRenderer*
6060
// the layer is projected. Find out how many pixels are in one map unit - either horizontal and vertical direction
6161
// this check might not work correctly in some cases
6262
// (on a large area the pixels projected around "0,0" can have different properties from the actual point)
63-
QgsPoint p1 = toLayerCoordinates(layer, renderer, QPoint(0,1));
64-
QgsPoint p2 = toLayerCoordinates(layer, renderer, QPoint(0,2));
65-
QgsPoint p3 = toLayerCoordinates(layer, renderer, QPoint(1,0));
66-
QgsPoint p4 = toLayerCoordinates(layer, renderer, QPoint(2,0));
67-
double x = p1.sqrDist(p2);
68-
double y = p3.sqrDist(p4);
69-
if (x > y)
63+
QgsPoint p1 = toLayerCoordinates( layer, renderer, QPoint( 0, 1 ) );
64+
QgsPoint p2 = toLayerCoordinates( layer, renderer, QPoint( 0, 2 ) );
65+
QgsPoint p3 = toLayerCoordinates( layer, renderer, QPoint( 1, 0 ) );
66+
QgsPoint p4 = toLayerCoordinates( layer, renderer, QPoint( 2, 0 ) );
67+
double x = p1.sqrDist( p2 );
68+
double y = p3.sqrDist( p4 );
69+
if ( x > y )
7070
{
71-
return sqrt(x);
71+
return sqrt( x );
7272
}
7373
else
7474
{
75-
return sqrt(y);
75+
return sqrt( y );
7676
}
7777
}
7878

src/core/qgsvectorlayer.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -2117,12 +2117,12 @@ bool QgsVectorLayer::readXml( QDomNode & layer_node )
21172117
}
21182118

21192119
QDomElement pkeyElem = pkeyNode.toElement();
2120-
if(!pkeyElem.isNull())
2120+
if ( !pkeyElem.isNull() )
21212121
{
2122-
QString encodingString = pkeyElem.attribute("encoding");
2123-
if(!encodingString.isEmpty())
2122+
QString encodingString = pkeyElem.attribute( "encoding" );
2123+
if ( !encodingString.isEmpty() )
21242124
{
2125-
mDataProvider->setEncoding(encodingString);
2125+
mDataProvider->setEncoding( encodingString );
21262126
}
21272127
}
21282128

@@ -2255,14 +2255,14 @@ bool QgsVectorLayer::writeXml( QDomNode & layer_node,
22552255
mapLayerNode.setAttribute( "geometry", QGis::qgisVectorGeometryType[geometryType()] );
22562256

22572257
// add provider node
2258-
if(mDataProvider)
2259-
{
2260-
QDomElement provider = document.createElement( "provider" );
2261-
provider.setAttribute("encoding", mDataProvider->encoding());
2262-
QDomText providerText = document.createTextNode( providerType() );
2263-
provider.appendChild( providerText );
2264-
layer_node.appendChild( provider );
2265-
}
2258+
if ( mDataProvider )
2259+
{
2260+
QDomElement provider = document.createElement( "provider" );
2261+
provider.setAttribute( "encoding", mDataProvider->encoding() );
2262+
QDomText providerText = document.createTextNode( providerType() );
2263+
provider.appendChild( providerText );
2264+
layer_node.appendChild( provider );
2265+
}
22662266

22672267
// renderer specific settings
22682268

src/gui/qgsmapcanvas.cpp

+35-35
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
8585
setScene( mScene );
8686
setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
8787
setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
88-
mLastExtentIndex=-1;
88+
mLastExtentIndex = -1;
8989
mCurrentLayer = NULL;
9090
mMapOverview = NULL;
9191
mMapTool = NULL;
@@ -436,7 +436,7 @@ void QgsMapCanvas::saveAsImage( QString theFileName, QPixmap * theQPixmap, QStri
436436
// allow dotted names
437437
QString myWorldFileName = myInfo.absolutePath() + QDir::separator() + myInfo.completeBaseName() + "." + theFormat + "w";
438438
QFile myWorldFile( myWorldFileName );
439-
if ( !myWorldFile.open( QIODevice::WriteOnly ) ) //don't use QIODevice::Text
439+
if ( !myWorldFile.open( QIODevice::WriteOnly ) ) //don't use QIODevice::Text
440440
{
441441
return;
442442
}
@@ -495,17 +495,17 @@ void QgsMapCanvas::setExtent( QgsRectangle const & r )
495495
updateScale();
496496
if ( mMapOverview )
497497
mMapOverview->drawExtentRect();
498-
if (mLastExtent.size()>20) mLastExtent.removeAt(0);
498+
if ( mLastExtent.size() > 20 ) mLastExtent.removeAt( 0 );
499499

500500
//clear all extent items after current index
501-
for (int i=mLastExtent.size()-1; i>mLastExtentIndex; i--)
501+
for ( int i = mLastExtent.size() - 1; i > mLastExtentIndex; i-- )
502502
{
503-
mLastExtent.removeAt(i);
503+
mLastExtent.removeAt( i );
504504
}
505505

506506

507-
mLastExtent.append(extent()) ;
508-
mLastExtentIndex=mLastExtent.size()-1;
507+
mLastExtent.append( extent() ) ;
508+
mLastExtentIndex = mLastExtent.size() - 1;
509509
// notify canvas items of change
510510
updateCanvasItemPositions();
511511

@@ -552,40 +552,40 @@ void QgsMapCanvas::zoomToFullExtent()
552552

553553
void QgsMapCanvas::zoomToPreviousExtent()
554554
{
555-
if ( mDrawing )
556-
{
557-
return;
558-
}
559-
560-
if (mLastExtentIndex>1)
561-
{
562-
mLastExtentIndex--;
563-
mMapRenderer->setExtent(mLastExtent[mLastExtentIndex]);
564-
emit extentsChanged();
565-
updateScale();
566-
if ( mMapOverview )
567-
mMapOverview->drawExtentRect();
568-
}
555+
if ( mDrawing )
556+
{
557+
return;
558+
}
559+
560+
if ( mLastExtentIndex > 1 )
561+
{
562+
mLastExtentIndex--;
563+
mMapRenderer->setExtent( mLastExtent[mLastExtentIndex] );
564+
emit extentsChanged();
565+
updateScale();
566+
if ( mMapOverview )
567+
mMapOverview->drawExtentRect();
568+
}
569569

570570
refresh();
571571
} // zoomToPreviousExtent
572572

573573
void QgsMapCanvas::zoomToNextExtent()
574574
{
575-
if ( mDrawing )
576-
{
577-
return;
578-
}
579-
if (mLastExtentIndex<mLastExtent.size()-1)
580-
{
581-
mLastExtentIndex++;
582-
mMapRenderer->setExtent(mLastExtent[mLastExtentIndex]);
583-
emit extentsChanged();
584-
updateScale();
585-
if ( mMapOverview )
586-
mMapOverview->drawExtentRect();
587-
}
588-
refresh();
575+
if ( mDrawing )
576+
{
577+
return;
578+
}
579+
if ( mLastExtentIndex < mLastExtent.size() - 1 )
580+
{
581+
mLastExtentIndex++;
582+
mMapRenderer->setExtent( mLastExtent[mLastExtentIndex] );
583+
emit extentsChanged();
584+
updateScale();
585+
if ( mMapOverview )
586+
mMapOverview->drawExtentRect();
587+
}
588+
refresh();
589589
}// zoomToNextExtent
590590

591591

src/providers/postgres/qgspostgresprovider.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ QgsPostgresProvider::Conn *QgsPostgresProvider::Conn::connectDb( const QString &
315315
if ( conn->postgisVersion().isNull() )
316316
{
317317
showMessageBox( tr( "No PostGIS Support!" ),
318-
tr( "Your database has no working PostGIS support.\n") );
318+
tr( "Your database has no working PostGIS support.\n" ) );
319319
conn->PQfinish();
320320
delete conn;
321321
return NULL;
@@ -1743,7 +1743,7 @@ bool QgsPostgresProvider::Conn::hasGEOS()
17431743
QString QgsPostgresProvider::Conn::postgisVersion()
17441744
{
17451745
Result result = PQexec( "select postgis_version()" );
1746-
if( PQntuples( result ) != 1 )
1746+
if ( PQntuples( result ) != 1 )
17471747
{
17481748
QgsDebugMsg( "Retrieval of postgis version failed" );
17491749
return QString::null;
@@ -1757,7 +1757,7 @@ QString QgsPostgresProvider::Conn::postgisVersion()
17571757

17581758
// Get major and minor version
17591759
QStringList postgisVersionParts = postgisParts[0].split( ".", QString::SkipEmptyParts );
1760-
if( postgisVersionParts.size() < 2 )
1760+
if ( postgisVersionParts.size() < 2 )
17611761
{
17621762
QgsDebugMsg( "Could not parse postgis version" );
17631763
return QString::null;

0 commit comments

Comments
 (0)