Skip to content

Commit 94b31cb

Browse files
author
jef
committedOct 22, 2008

26 files changed

+329
-329
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4187,8 +4187,8 @@ void QgisApp::loadPythonSupport()
41874187

41884188
if ( mPythonUtils && mPythonUtils->isEnabled() )
41894189
{
4190-
QgsPluginRegistry::instance()->setPythonUtils(mPythonUtils);
4191-
4190+
QgsPluginRegistry::instance()->setPythonUtils( mPythonUtils );
4191+
41924192
mActionShowPythonDialog = new QAction( tr( "Python Console" ), this );
41934193
connect( mActionShowPythonDialog, SIGNAL( triggered() ), this, SLOT( showPythonDialog() ) );
41944194

@@ -5224,7 +5224,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
52245224

52255225
//NOTE: This check does not really add any protection, as it is called on load not on layer select/activate
52265226
//If you load a layer with a provider and idenitfy ability then load another without, the tool would be disabled for both
5227-
5227+
52285228
//Enable the Identify tool ( GDAL datasets draw without a provider )
52295229
//but turn off if data provider exists and has no Identify capabilities
52305230
mActionIdentify->setEnabled( true );

‎src/app/qgsgraduatedsymboldialog.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ void QgsGraduatedSymbolDialog::adjustClassification()
297297

298298
if ( provider )
299299
{
300-
if ( modeComboBox->currentText() == tr( "Equal Interval" ) ||
301-
modeComboBox->currentText() == tr( "Quantiles" ) )
300+
if ( modeComboBox->currentText() == tr( "Equal Interval" ) ||
301+
modeComboBox->currentText() == tr( "Quantiles" ) )
302302
{
303303
minimum = provider->minimumValue( field ).toDouble();
304304
maximum = provider->maximumValue( field ).toDouble();
@@ -590,11 +590,11 @@ void QgsGraduatedSymbolDialog::updateEntryIcon( QgsSymbol * thepSymbol,
590590
switch ( myType )
591591
{
592592
case QGis::Point:
593-
{
594-
int myWidthScale = 4; //magick no to try to make vector props dialog preview look same as legend
595-
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getPointSymbolAsImage( myWidthScale ) ) ) );
596-
}
597-
break;
593+
{
594+
int myWidthScale = 4; //magick no to try to make vector props dialog preview look same as legend
595+
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getPointSymbolAsImage( myWidthScale ) ) ) );
596+
}
597+
break;
598598
case QGis::Line:
599599
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getLineSymbolAsImage() ) ) );
600600
break;

‎src/app/qgsmaptooladdvertex.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ void QgsMapToolAddVertex::canvasReleaseEvent( QMouseEvent * e )
9595
//add segment points in case of topological editing
9696
int topologicalEditing = QgsProject::instance()->readNumEntry( "Digitizing", "/TopologicalEditing", 0 );
9797
if ( topologicalEditing )
98-
{
99-
insertSegmentVerticesForSnap( snapResults, vlayer );
100-
}
98+
{
99+
insertSegmentVerticesForSnap( snapResults, vlayer );
100+
}
101101

102102
snappedPointMapCoord = snapPointFromResults( snapResults, e->pos() );
103103
snappedPointLayerCoord = toLayerCoordinates( vlayer, snappedPointMapCoord );

‎src/app/qgsmaptoolsplitfeatures.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ void QgsMapToolSplitFeatures::canvasReleaseEvent( QMouseEvent * e )
8080
//bring up dialog if a split was not possible (polygon) or only done once (line)
8181
int topologicalEditing = QgsProject::instance()->readNumEntry( "Digitizing", "/TopologicalEditing", 0 );
8282
int returnCode = vlayer->splitFeatures( mCaptureList, topologicalEditing );
83-
if(returnCode == 4)
84-
{
85-
QMessageBox::warning(0, tr("No feature split done"), tr("If there are selected features, the split tool only applies to the selected ones. If you like to split all features under the split line, clear the selection"));
86-
}
83+
if ( returnCode == 4 )
84+
{
85+
QMessageBox::warning( 0, tr( "No feature split done" ), tr( "If there are selected features, the split tool only applies to the selected ones. If you like to split all features under the split line, clear the selection" ) );
86+
}
8787
else if ( returnCode != 0 )
8888
{
8989
//several intersections but only one split (most likely line)

‎src/app/qgspluginregistry.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ QgsPluginRegistry *QgsPluginRegistry::instance()
3434
}
3535

3636
QgsPluginRegistry::QgsPluginRegistry()
37-
: mPythonUtils(NULL)
37+
: mPythonUtils( NULL )
3838
{
3939
// constructor does nothing
4040
}
4141

42-
void QgsPluginRegistry::setPythonUtils(QgsPythonUtils* pythonUtils)
42+
void QgsPluginRegistry::setPythonUtils( QgsPythonUtils* pythonUtils )
4343
{
4444
mPythonUtils = pythonUtils;
4545
}
@@ -102,19 +102,19 @@ void QgsPluginRegistry::unloadAll()
102102
it != plugins.end();
103103
it++ )
104104
{
105-
if (isPythonPlugin(it->second->name()))
105+
if ( isPythonPlugin( it->second->name() ) )
106106
{
107-
if (mPythonUtils)
108-
mPythonUtils->unloadPlugin(it->second->library());
107+
if ( mPythonUtils )
108+
mPythonUtils->unloadPlugin( it->second->library() );
109109
else
110-
QgsDebugMsg("warning: python utils is NULL");
110+
QgsDebugMsg( "warning: python utils is NULL" );
111111
}
112112
else
113113
{
114114
if ( it->second->plugin() )
115115
it->second->plugin()->unload();
116116
else
117-
QgsDebugMsg("warning: plugin is NULL:" + it->second->name());
117+
QgsDebugMsg( "warning: plugin is NULL:" + it->second->name() );
118118
}
119119
}
120120
}

‎src/app/qgspluginregistry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class QgsPluginRegistry
5151
//! Unload plugins
5252
void unloadAll();
5353
//! Save pointer for python utils (needed for unloading python plugins)
54-
void setPythonUtils(QgsPythonUtils* pythonUtils);
54+
void setPythonUtils( QgsPythonUtils* pythonUtils );
5555
protected:
5656
//! protected constructor
5757
QgsPluginRegistry();

‎src/app/qgsuniquevaluedialog.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -438,11 +438,11 @@ void QgsUniqueValueDialog::updateEntryIcon( QgsSymbol * thepSymbol,
438438
switch ( myType )
439439
{
440440
case QGis::Point:
441-
{
442-
int myWidthScale = 4; //magick no to try to make vector props dialog preview look same as legend
443-
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getPointSymbolAsImage( myWidthScale ) ) ) );
444-
}
445-
break;
441+
{
442+
int myWidthScale = 4; //magick no to try to make vector props dialog preview look same as legend
443+
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getPointSymbolAsImage( myWidthScale ) ) ) );
444+
}
445+
break;
446446
case QGis::Line:
447447
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getLineSymbolAsImage() ) ) );
448448
break;

‎src/core/qgscoordinatereferencesystem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ bool QgsCoordinateReferenceSystem::createFromEpsg( long id )
180180

181181
bool QgsCoordinateReferenceSystem::createFromSrsId( long id )
182182
{
183-
return loadFromDb( id < 100000 ? QgsApplication::srsDbFilePath() :
184-
QgsApplication::qgisUserDbFilePath(), "srs_id", id );
183+
return loadFromDb( id < 100000 ? QgsApplication::srsDbFilePath() :
184+
QgsApplication::qgisUserDbFilePath(), "srs_id", id );
185185
}
186186

187187
bool QgsCoordinateReferenceSystem::loadFromDb( QString db, QString field, long id )

‎src/core/qgscoordinatereferencesystem.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -242,54 +242,54 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
242242
* @return long theSrsId The internal sqlite3 srs.db primary key for this srs
243243
*/
244244
long srsid() const;
245-
245+
246246
/*! Get the postgis srid for this srs
247247
* @return long theSRID the Postgis spatial_ref_sys identifier for this srs (defaults to 0)
248248
*/
249249
long postgisSrid() const;
250-
250+
251251
/*! Get the EpsgCrsId identifier for this srs
252252
* @return long theEpsg the ESPG identifier for this srs (defaults to 0)
253253
*/
254254
long epsg() const;
255-
255+
256256
/*! Get the Description
257257
* @return QString the Description A textual description of the srs.
258258
* @note A zero length string will be returned if the description is uninitialised
259259
*/
260260
QString description() const;
261-
261+
262262
/*! Get the Projection Acronym
263263
* @return QString theProjectionAcronym The official proj4 acronym for the projection family
264264
* @note A zero length string will be returned if the projectionAcronym is uninitialised
265265
*/
266266
QString projectionAcronym() const;
267-
267+
268268
/*! Get the Ellipsoid Acronym
269269
* @return QString theEllipsoidAcronym The official proj4 acronym for the ellipoid
270270
* @note A zero length string will be returned if the ellipsoidAcronym is uninitialised
271271
*/
272272
QString ellipsoidAcronym() const;
273-
273+
274274
/*! A helper to get an wkt representation of this srs
275275
* @return string containing Wkt of the srs
276276
*/
277277
QString toWkt() const;
278278

279-
/** Get the Proj Proj4 string representation of this srs.
279+
/** Get the Proj Proj4 string representation of this srs.
280280
* If proj and ellps keys are found in the parameters,
281281
* they will be stripped out and the Projection and ellipsoid acronyms will be
282282
* overridden with these.
283283
* @return QString theProj4String Proj4 format specifies that define this srs.
284284
* @note A zero length string will be returned if the toProj4 is uninitialised
285285
*/
286286
QString toProj4() const;
287-
287+
288288
/*! Get this Geographic? flag
289289
* @return bool theGeoFlag Whether this is a geographic or projected coordinate system
290290
*/
291291
bool geographicFlag() const;
292-
292+
293293
/*! Get the units that the projection is in
294294
* @return QGis::UnitType that gives the units for the coordinate system
295295
*/
@@ -305,7 +305,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
305305
*/
306306
QString validationHint();
307307
// Mutators -----------------------------------
308-
// We dont want to expose these to the public api since they wont create
308+
// We dont want to expose these to the public api since they wont create
309309
// a fully valid crs. Programmers should use the createFrom* methods rather
310310
private:
311311
/** A static helper function to find out the proj4 string for a srsid

‎src/core/qgsgeometry.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4883,24 +4883,24 @@ int QgsGeometry::splitPolygonGeometry( GEOSGeometry* splitLine, QList<QgsGeometr
48834883
}
48844884

48854885
bool splitDone = true;
4886-
int nGeometriesThis = GEOSGetNumGeometries(mGeos); //original number of geometries
4887-
if(testedGeometries.size() == nGeometriesThis)
4888-
{
4889-
splitDone = false;
4890-
}
4886+
int nGeometriesThis = GEOSGetNumGeometries( mGeos ); //original number of geometries
4887+
if ( testedGeometries.size() == nGeometriesThis )
4888+
{
4889+
splitDone = false;
4890+
}
48914891

48924892
mergeGeometriesMultiTypeSplit( testedGeometries );
48934893

48944894
//no split done, preserve original geometry
4895-
if(!splitDone)
4895+
if ( !splitDone )
4896+
{
4897+
for ( int i = 0; i < testedGeometries.size(); ++i )
48964898
{
4897-
for(int i = 0; i < testedGeometries.size(); ++i)
4898-
{
4899-
GEOSGeom_destroy(testedGeometries[i]);
4900-
}
4901-
return 1;
4899+
GEOSGeom_destroy( testedGeometries[i] );
49024900
}
4903-
else if(testedGeometries.size() > 0) //split successfull
4901+
return 1;
4902+
}
4903+
else if ( testedGeometries.size() > 0 ) //split successfull
49044904
{
49054905
GEOSGeom_destroy( mGeos );
49064906
mGeos = testedGeometries[0];

‎src/core/qgsgeometry.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,10 @@ class CORE_EXPORT QgsGeometry
245245
@param topological true if topological editing is enabled
246246
@topologyTestPoints OUT: points that need to be tested for topological completeness in the dataset
247247
@return 0 in case of success, 1 if geometry has not been split, error else*/
248-
int splitGeometry( const QList<QgsPoint>& splitLine,
249-
QList<QgsGeometry*>&newGeometries,
250-
bool topological,
251-
QList<QgsPoint>& topologyTestPoints );
248+
int splitGeometry( const QList<QgsPoint>& splitLine,
249+
QList<QgsGeometry*>&newGeometries,
250+
bool topological,
251+
QList<QgsPoint>& topologyTestPoints );
252252

253253
/**Changes this geometry such that it does not intersect the other geometry
254254
@param other geometry that should not be intersect

‎src/core/qgsvectorlayer.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,12 +1758,12 @@ int QgsVectorLayer::splitFeatures( const QList<QgsPoint>& splitLine, bool topolo
17581758
}
17591759
}
17601760

1761-
if(numberOfSplitedFeatures == 0 && selectedIds.size() > 0)
1762-
{
1763-
//There is a selection but no feature has been split.
1764-
//Maybe user forgot that only the selected features are split
1765-
returnCode = 4;
1766-
}
1761+
if ( numberOfSplitedFeatures == 0 && selectedIds.size() > 0 )
1762+
{
1763+
//There is a selection but no feature has been split.
1764+
//Maybe user forgot that only the selected features are split
1765+
returnCode = 4;
1766+
}
17671767

17681768

17691769
//now add the new features to this vectorlayer
@@ -1918,15 +1918,15 @@ int QgsVectorLayer::addTopologicalPoints( const QgsPoint& p )
19181918

19191919
//work with a tolerance because coordinate projection may introduce some rounding
19201920
double threshold = 0.0000001;
1921-
if(mCRS && mCRS->mapUnits() == QGis::Meters)
1922-
{
1923-
threshold = 0.001;
1924-
}
1925-
else if(mCRS && mCRS->mapUnits() == QGis::Feet)
1926-
{
1927-
threshold = 0.0001;
1928-
}
1929-
1921+
if ( mCRS && mCRS->mapUnits() == QGis::Meters )
1922+
{
1923+
threshold = 0.001;
1924+
}
1925+
else if ( mCRS && mCRS->mapUnits() == QGis::Feet )
1926+
{
1927+
threshold = 0.0001;
1928+
}
1929+
19301930

19311931
if ( snapWithContext( p, threshold, snapResults, QgsSnapper::SNAP_TO_SEGMENT ) != 0 )
19321932
{

‎src/core/renderer/qgsgraduatedsymbolrenderer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ QgsGraduatedSymbolRenderer::~QgsGraduatedSymbolRenderer()
7777
QgsGraduatedSymbolRenderer::Mode QgsGraduatedSymbolRenderer::mode() const
7878
{
7979
//mode is only really used to be able to reinstate
80-
//the graduated dialog properties properly, so we
80+
//the graduated dialog properties properly, so we
8181
//dont do anything else besides accessors and mutators in
8282
//this class
8383
return mMode;
@@ -86,7 +86,7 @@ QgsGraduatedSymbolRenderer::Mode QgsGraduatedSymbolRenderer::mode() const
8686
void QgsGraduatedSymbolRenderer::setMode( QgsGraduatedSymbolRenderer::Mode theMode )
8787
{
8888
//mode is only really used to be able to reinstate
89-
//the graduated dialog properties properly, so we
89+
//the graduated dialog properties properly, so we
9090
//dont do anything else besides accessors and mutators in
9191
//this class
9292
mMode = theMode;
@@ -183,7 +183,7 @@ void QgsGraduatedSymbolRenderer::renderFeature( QPainter * p, QgsFeature & f, QI
183183
brush.setColor( mSelectionColor );
184184
p->setBrush( brush );
185185
}
186-
else //dont draw outlines in selection colour for polys otherwise they appear merged
186+
else //dont draw outlines in selection colour for polys otherwise they appear merged
187187
{
188188
pen.setColor( mSelectionColor );
189189
}
@@ -310,12 +310,12 @@ bool QgsGraduatedSymbolRenderer::writeXML( QDomNode & layer_node, QDomDocument &
310310
// Mode field first ...
311311
//
312312

313-
QString modeValue="";
313+
QString modeValue = "";
314314
if ( mMode == QgsGraduatedSymbolRenderer::Empty )
315315
{
316-
modeValue == "Empty";
316+
modeValue == "Empty";
317317
}
318-
else if ( QgsGraduatedSymbolRenderer::Quantile )
318+
else if ( QgsGraduatedSymbolRenderer::Quantile )
319319
{
320320
modeValue = "Quantile";
321321
}

‎src/core/renderer/qgsgraduatedsymbolrenderer.h

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class QgsVectorLayer;
2727
class CORE_EXPORT QgsGraduatedSymbolRenderer: public QgsRenderer
2828
{
2929
public:
30-
enum Mode
30+
enum Mode
3131
{
3232
EqualInterval,
3333
Quantile,
@@ -37,85 +37,85 @@ class CORE_EXPORT QgsGraduatedSymbolRenderer: public QgsRenderer
3737
QgsGraduatedSymbolRenderer( const QgsGraduatedSymbolRenderer& other );
3838
QgsGraduatedSymbolRenderer& operator=( const QgsGraduatedSymbolRenderer& other );
3939
virtual ~QgsGraduatedSymbolRenderer();
40-
40+
4141
/** Get the mode - which is only really used to be able to reinstate
42-
* the graduated dialog properties properly, so we
42+
* the graduated dialog properties properly, so we
4343
* dont do anything else besides accessors and mutators in
4444
* this class.
4545
*/
4646
Mode mode() const;
4747

4848
/** Set the mode - which is only really used to be able to reinstate
49-
* the graduated dialog properties properly, so we
49+
* the graduated dialog properties properly, so we
5050
* dont do anything else besides accessors and mutators in
5151
* this class.
5252
*/
5353
void setMode( Mode theMode );
54-
54+
5555
/**Adds a new item
5656
\param sy a pointer to the QgsSymbol to be inserted. It has to be created using the new operator and is automatically destroyed when 'removeItems' is called or when this object is destroyed*/
5757
void addSymbol( QgsSymbol* sy );
58-
58+
5959
/**Returns the indes of the classification field*/
6060
int classificationField() const;
61-
61+
6262
/**Removes all symbols*/
6363
void removeSymbols();
64-
64+
6565
/** Determines if a feature will be rendered or not
6666
@param f a pointer to the feature to determine if rendering will happen*/
6767
virtual bool willRenderFeature( QgsFeature *f );
68-
68+
6969
/**Renders an OGRFeature
7070
\param p a painter (usually the one from the current map canvas)
7171
\param f a pointer to a feature to render
7272
\param t the transform object containing the information how to transform the map coordinates to screen coordinates*/
7373
void renderFeature( QPainter* p, QgsFeature& f, QImage* img, bool selected, double widthScale = 1.0, double rasterScaleFactor = 1.0 );
74-
74+
7575
/**Sets the classicifation field by index
7676
\param field the number of the field to classify*/
7777
void setClassificationField( int );
78-
78+
7979
/**Reads the renderer configuration from an XML file
8080
@param rnode the Dom node to read
8181
@param vl the vector layer which will be associated with the renderer
8282
@return 0 in case of success, 1 if vector layer has no renderer, 2 if classification field not found
8383
*/
8484
virtual int readXML( const QDomNode& rnode, QgsVectorLayer& vl );
85-
85+
8686
/**Writes the contents of the renderer to a configuration file
8787
@ return true in case of success*/
8888
virtual bool writeXML( QDomNode & layer_node, QDomDocument & document, const QgsVectorLayer& vl ) const;
89-
89+
9090
/** Returns true*/
9191
bool needsAttributes() const;
92-
92+
9393
/**Returns a list of all needed attributes*/
9494
QgsAttributeList classificationAttributes() const;
95-
95+
9696
void updateSymbolAttributes();
97-
97+
9898
/**Returns the renderers name*/
9999
QString name() const;
100-
100+
101101
/**Returns the symbols of the items*/
102102
const QList<QgsSymbol*> symbols() const;
103-
103+
104104
/**Returns a copy of the renderer (a deep copy on the heap)*/
105105
QgsRenderer* clone() const;
106106

107107
protected:
108108
/** The graduation mode */
109109
Mode mMode;
110-
110+
111111
/**Index of the classification field (it must be a numerical field)*/
112112
int mClassificationField;
113-
113+
114114
/**List holding the symbols for the individual classes*/
115115
QList<QgsSymbol*> mSymbols;
116-
116+
117117
QgsSymbol *symbolForFeature( const QgsFeature* f );
118-
118+
119119
/**Cached copy of all underlying symbols required attribute fields*/
120120
QgsAttributeList mSymbolAttributes;
121121

‎src/core/symbology/qgsmarkercatalogue.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ QImage QgsMarkerCatalogue::imageMarker( QString fullName, double size, QPen pen,
106106
{
107107
size = 4;
108108
}
109-
109+
110110
QImage myImage;
111111
if ( fullName.left( 5 ) == "hard:" )
112112
{
@@ -225,7 +225,7 @@ void QgsMarkerCatalogue::hardMarker( QPainter * thepPainter, QString name, doubl
225225
QgsDebugMsg( QString( "Hard marker radius %1" ).arg( r ) );
226226

227227
// If radius is 0, draw a circle, so it wont disappear.
228-
if ( name == "circle" || r < 1)
228+
if ( name == "circle" || r < 1 )
229229
{
230230
// "A stroked ellipse has a size of rectangle.size() plus the pen width."
231231
// (from Qt doc)

‎src/core/symbology/qgssymbol.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -349,16 +349,16 @@ QImage QgsSymbol::getPointSymbolAsImage( double widthScale, bool selected, QColo
349349
pen.setColor( selectionColor );
350350
QBrush brush = mBrush;
351351
preRotateImage = QgsMarkerCatalogue::instance()->imageMarker(
352-
mPointSymbolName, ( float )( mPointSize * scale * widthScale *
353-
rasterScaleFactor ),
354-
pen, mBrush );
352+
mPointSymbolName, ( float )( mPointSize * scale * widthScale *
353+
rasterScaleFactor ),
354+
pen, mBrush );
355355
}
356356
else
357357
{
358358
preRotateImage = QgsMarkerCatalogue::instance()->imageMarker(
359-
mPointSymbolName, ( float )( mPointSize * scale * widthScale *
360-
rasterScaleFactor ),
361-
pen, mBrush );
359+
mPointSymbolName, ( float )( mPointSize * scale * widthScale *
360+
rasterScaleFactor ),
361+
pen, mBrush );
362362
}
363363

364364
QMatrix rotationMatrix;

‎src/gui/qgsmapcanvassnapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void QgsMapCanvasSnapper::setMapCanvas( QgsMapCanvas* canvas )
5454
mSnapper = new QgsSnapper( canvas->mapRenderer() );
5555
}
5656
else
57-
{
57+
{
5858
mSnapper = 0;
5959
}
6060
}

‎src/plugins/coordinate_capture/coordinatecapture.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class CoordinateCapture: public QObject, public QgisPlugin
120120
//!epsg id for showin in geoedit box
121121
long mEpsgId;
122122
//!proj4 string for coordinate translation
123-
QString mProj4Str;
123+
QString mProj4Str;
124124

125125
////////////////////////////////////////////////////////////////////
126126
//

‎src/plugins/georeferencer/mapcoordsdialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ void MapCoordsDialog::on_buttonCancel_clicked()
7070
reject();
7171
}
7272

73-
void MapCoordsDialog::maybeSetXY( QgsPoint & xy, Qt::MouseButton button)
73+
void MapCoordsDialog::maybeSetXY( QgsPoint & xy, Qt::MouseButton button )
7474
{
7575
// Only LeftButton should set point
76-
if( Qt::LeftButton == button )
76+
if ( Qt::LeftButton == button )
7777
{
7878
leXCoord->clear();
7979
leYCoord->clear();

‎src/plugins/georeferencer/qgspointdialog.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ class QgsGeorefTool : public QgsMapTool
5151
// Only add point on Qt:LeftButton
5252
if ( Qt::LeftButton == e->button() )
5353
{
54-
QgsPoint pnt = toMapCoordinates( e->pos() );
54+
QgsPoint pnt = toMapCoordinates( e->pos() );
5555

56-
if ( mAddPoint )
57-
mDlg->showCoordDialog( pnt );
58-
else
59-
mDlg->deleteDataPoint( pnt );
56+
if ( mAddPoint )
57+
mDlg->showCoordDialog( pnt );
58+
else
59+
mDlg->deleteDataPoint( pnt );
6060
}
6161
}
6262

‎src/providers/wfs/qgswfsdata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ int QgsWFSData::getWFSData()
9191
}
9292

9393
//mHttp.get( mUri );
94-
mHttp.get(requestUrl.path() + "?" + QString(requestUrl.encodedQuery()));
94+
mHttp.get( requestUrl.path() + "?" + QString( requestUrl.encodedQuery() ) );
9595

9696

9797
//loop to read the data

‎src/providers/wms/qgswmsprovider.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ QgsWmsProvider::QgsWmsProvider( QString const & uri )
7272
// 2) http://xxx.xxx.xx/yyy/yyy?
7373
// 3) http://xxx.xxx.xx/yyy/yyy?zzz=www
7474

75-
baseUrl = prepareUri(httpuri);
75+
baseUrl = prepareUri( httpuri );
7676

7777
QgsDebugMsg( "baseUrl = " + baseUrl );
7878

@@ -98,7 +98,7 @@ QgsWmsProvider::QgsWmsProvider( QString const & uri )
9898
QgsDebugMsg( "QgsWmsProvider: exiting constructor." );
9999
}
100100

101-
QString QgsWmsProvider::prepareUri(QString uri)
101+
QString QgsWmsProvider::prepareUri( QString uri )
102102
{
103103
if ( !( uri.contains( "?" ) ) )
104104
{
@@ -379,7 +379,7 @@ QImage* QgsWmsProvider::draw( QgsRect const & viewExtent, int pixelWidth, int p
379379
crsKey = "CRS";
380380
}
381381

382-
QString url = prepareUri(mCapabilities.capability.request.getMap.dcpType.front().http.get.onlineResource.xlinkHref);
382+
QString url = prepareUri( mCapabilities.capability.request.getMap.dcpType.front().http.get.onlineResource.xlinkHref );
383383

384384
url += "SERVICE=WMS";
385385
url += "&";

‎src/providers/wms/qgswmsprovider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ class QgsWmsProvider : public QgsRasterDataProvider
689689
* \param uri uri to prepare
690690
* \retval prepared uri
691691
*/
692-
QString prepareUri(QString uri);
692+
QString prepareUri( QString uri );
693693

694694
//! Data source URI of the WMS for this layer
695695
QString httpuri;

‎tests/src/core/regression1141.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@
4646
*/
4747
class Regression1141: public QObject
4848
{
49-
Q_OBJECT;
49+
Q_OBJECT;
5050
private slots:
5151
void initTestCase();// will be called before the first testfunction is executed.
5252
void cleanupTestCase();// will be called after the last testfunction was executed.
53-
void init(){};// will be called before each testfunction is executed.
54-
void cleanup(){};// will be called after every testfunction.
53+
void init() {};// will be called before each testfunction is executed.
54+
void cleanup() {};// will be called after every testfunction.
5555

5656
/** This method tests that we can create a shpfile with diacriticals in its name
5757
* and with fields that have diacriticals in their names*/
5858
void diacriticalTest();
59-
59+
6060
private:
6161
QString mEncoding;
6262
QgsVectorFileWriter::WriterError mError;
@@ -71,11 +71,11 @@ void Regression1141::initTestCase()
7171
// Runs once before any tests are run
7272
//
7373
// init QGIS's paths - true means that all path will be inited from prefix
74-
QString qgisPath = QCoreApplication::applicationDirPath ();
75-
QgsApplication::setPrefixPath(INSTALL_PREFIX, true);
74+
QString qgisPath = QCoreApplication::applicationDirPath();
75+
QgsApplication::setPrefixPath( INSTALL_PREFIX, true );
7676
QgsApplication::showSettings();
7777
// Instantiate the plugin directory so that providers are loaded
78-
QgsProviderRegistry::instance(QgsApplication::pluginPath());
78+
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
7979
// compute our test file name:
8080
QString myTmpDir = QDir::tempPath() + QDir::separator() ;
8181
mFileName = myTmpDir + "ąęćń.shp";
@@ -143,13 +143,13 @@ void Regression1141::diacriticalTest()
143143

144144
QVERIFY( mError == QgsVectorFileWriter::NoError );
145145
// Now check we can delete it again ok
146-
QVERIFY(QgsVectorFileWriter::deleteShapeFile(mFileName));
146+
QVERIFY( QgsVectorFileWriter::deleteShapeFile( mFileName ) );
147147

148148
} //file exists
149149
}
150150

151151

152-
QTEST_MAIN(Regression1141)
153-
152+
QTEST_MAIN( Regression1141 )
153+
154154
#include "moc_regression1141.cxx"
155-
155+

‎tests/src/core/testqgsmaprenderer.cpp

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
#include <qgsapplication.h> //search path for srs.db
3636
#include <qgsfield.h>
3737
#include <qgis.h> //defines GEOWkt
38-
#include <qgsmaprenderer.h>
39-
#include <qgsmaplayer.h>
40-
#include <qgsvectorlayer.h>
38+
#include <qgsmaprenderer.h>
39+
#include <qgsmaplayer.h>
40+
#include <qgsvectorlayer.h>
4141
#include <qgsapplication.h>
4242
#include <qgsproviderregistry.h>
4343
#include <qgsmaplayerregistry.h>
@@ -52,16 +52,16 @@
5252
*/
5353
class TestQgsMapRenderer: public QObject
5454
{
55-
Q_OBJECT;
55+
Q_OBJECT;
5656
private slots:
5757
void initTestCase();// will be called before the first testfunction is executed.
5858
void cleanupTestCase();// will be called after the last testfunction was executed.
59-
void init(){};// will be called before each testfunction is executed.
60-
void cleanup(){};// will be called after every testfunction.
59+
void init() {};// will be called before each testfunction is executed.
60+
void cleanup() {};// will be called after every testfunction.
6161

6262
/** This method tests render perfomance */
6363
void performanceTest();
64-
64+
6565
private:
6666
QString mEncoding;
6767
QgsVectorFileWriter::WriterError mError;
@@ -78,136 +78,136 @@ void TestQgsMapRenderer::initTestCase()
7878
// Runs once before any tests are run
7979
//
8080
// init QGIS's paths - true means that all path will be inited from prefix
81-
QString qgisPath = QCoreApplication::applicationDirPath ();
82-
QgsApplication::setPrefixPath(INSTALL_PREFIX, true);
81+
QString qgisPath = QCoreApplication::applicationDirPath();
82+
QgsApplication::setPrefixPath( INSTALL_PREFIX, true );
8383
QgsApplication::showSettings();
8484
// Instantiate the plugin directory so that providers are loaded
85-
QgsProviderRegistry::instance(QgsApplication::pluginPath());
85+
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
8686

8787

8888
//create some objects that will be used in all tests...
8989
mEncoding = "UTF-8";
90-
QgsField myField1("Value",QVariant::Int,"int",10,0,"Value on lon");
91-
mFields.insert(0, myField1);
92-
mCRS = QgsCoordinateReferenceSystem(GEOWkt);
90+
QgsField myField1( "Value", QVariant::Int, "int", 10, 0, "Value on lon" );
91+
mFields.insert( 0, myField1 );
92+
mCRS = QgsCoordinateReferenceSystem( GEOWkt );
9393
//
9494
// Create the test dataset if it doesnt exist
9595
//
96-
QString myDataDir (TEST_DATA_DIR); //defined in CmakeLists.txt
96+
QString myDataDir( TEST_DATA_DIR ); //defined in CmakeLists.txt
9797
QString myTestDataDir = myDataDir + QDir::separator();
9898
QString myTmpDir = QDir::tempPath() + QDir::separator() ;
9999
QString myFileName = myTmpDir + "maprender_testdata.shp";
100100
//copy over the default qml for our generated layer
101101
QString myQmlFileName = myTestDataDir + "maprender_testdata.qml";
102-
QFile::copy(myQmlFileName, myTmpDir + "maprender_testdata.qml");
103-
qDebug ( "Checking test dataset exists...");
104-
qDebug ( myFileName.toLocal8Bit() );
105-
if (!QFile::exists(myFileName))
102+
QFile::copy( myQmlFileName, myTmpDir + "maprender_testdata.qml" );
103+
qDebug( "Checking test dataset exists..." );
104+
qDebug( myFileName.toLocal8Bit() );
105+
if ( !QFile::exists( myFileName ) )
106106
{
107-
qDebug ( "Creating test dataset: ");
108-
109-
QgsVectorFileWriter myWriter (myFileName,
110-
mEncoding,
111-
mFields,
112-
QGis::WKBPolygon,
113-
&mCRS);
114-
double myInterval=0.5;
115-
for (double i=-180.0;i<=180.0;i+=myInterval)
107+
qDebug( "Creating test dataset: " );
108+
109+
QgsVectorFileWriter myWriter( myFileName,
110+
mEncoding,
111+
mFields,
112+
QGis::WKBPolygon,
113+
&mCRS );
114+
double myInterval = 0.5;
115+
for ( double i = -180.0;i <= 180.0;i += myInterval )
116116
{
117-
for (double j=-90.0;j<=90.0;j+=myInterval)
117+
for ( double j = -90.0;j <= 90.0;j += myInterval )
118118
{
119119
//
120120
// Create a polygon feature
121121
//
122122
QgsPolyline myPolyline;
123-
QgsPoint myPoint1 = QgsPoint(i,j);
124-
QgsPoint myPoint2 = QgsPoint(i+myInterval,j);
125-
QgsPoint myPoint3 = QgsPoint(i+myInterval,j+myInterval);
126-
QgsPoint myPoint4 = QgsPoint(i,j+myInterval);
123+
QgsPoint myPoint1 = QgsPoint( i, j );
124+
QgsPoint myPoint2 = QgsPoint( i + myInterval, j );
125+
QgsPoint myPoint3 = QgsPoint( i + myInterval, j + myInterval );
126+
QgsPoint myPoint4 = QgsPoint( i, j + myInterval );
127127
myPolyline << myPoint1 << myPoint2 << myPoint3 << myPoint4 << myPoint1;
128128
QgsPolygon myPolygon;
129129
myPolygon << myPolyline;
130-
//polygon: first item of the list is outer ring,
131-
// inner rings (if any) start from second item
130+
//polygon: first item of the list is outer ring,
131+
// inner rings (if any) start from second item
132132
//
133-
// NOTE: dont delete this pointer again -
133+
// NOTE: dont delete this pointer again -
134134
// ownership is passed to the feature which will
135135
// delete it in its dtor!
136-
QgsGeometry * mypPolygonGeometry = QgsGeometry::fromPolygon(myPolygon);
136+
QgsGeometry * mypPolygonGeometry = QgsGeometry::fromPolygon( myPolygon );
137137
QgsFeature myFeature;
138-
myFeature.setTypeName("WKBPolygon");
139-
myFeature.setGeometry(mypPolygonGeometry);
140-
myFeature.addAttribute(0,i);
138+
myFeature.setTypeName( "WKBPolygon" );
139+
myFeature.setGeometry( mypPolygonGeometry );
140+
myFeature.addAttribute( 0, i );
141141
//
142142
// Write the feature to the filewriter
143143
// and check for errors
144144
//
145-
QVERIFY(myWriter.addFeature(myFeature));
145+
QVERIFY( myWriter.addFeature( myFeature ) );
146146
mError = myWriter.hasError();
147-
if(mError==QgsVectorFileWriter::ErrDriverNotFound)
147+
if ( mError == QgsVectorFileWriter::ErrDriverNotFound )
148148
{
149149
std::cout << "Driver not found error" << std::endl;
150150
}
151-
else if (mError==QgsVectorFileWriter::ErrCreateDataSource)
151+
else if ( mError == QgsVectorFileWriter::ErrCreateDataSource )
152152
{
153153
std::cout << "Create data source error" << std::endl;
154154
}
155-
else if (mError==QgsVectorFileWriter::ErrCreateLayer)
155+
else if ( mError == QgsVectorFileWriter::ErrCreateLayer )
156156
{
157157
std::cout << "Create layer error" << std::endl;
158158
}
159-
QVERIFY(mError==QgsVectorFileWriter::NoError);
159+
QVERIFY( mError == QgsVectorFileWriter::NoError );
160160
}
161161
}
162162
} //file exists
163163
//
164164
//create a poly layer that will be used in all tests...
165165
//
166-
QFileInfo myPolyFileInfo ( myFileName );
167-
mpPolysLayer = new QgsVectorLayer ( myPolyFileInfo.filePath(),
168-
myPolyFileInfo.completeBaseName(), "ogr" );
166+
QFileInfo myPolyFileInfo( myFileName );
167+
mpPolysLayer = new QgsVectorLayer( myPolyFileInfo.filePath(),
168+
myPolyFileInfo.completeBaseName(), "ogr" );
169169
// Register the layer with the registry
170-
QgsMapLayerRegistry::instance()->addMapLayer(mpPolysLayer);
170+
QgsMapLayerRegistry::instance()->addMapLayer( mpPolysLayer );
171171
// add the test layer to the maprender
172172
mpMapRenderer = new QgsMapRenderer();
173173
QStringList myLayers;
174174
myLayers << mpPolysLayer->getLayerID();
175-
mpMapRenderer->setLayerSet(myLayers);
175+
mpMapRenderer->setLayerSet( myLayers );
176176
mReport += "<h1>Map Render Tests</h1>\n";
177177
}
178178

179179

180180
void TestQgsMapRenderer::cleanupTestCase()
181181
{
182182
QString myReportFile = QDir::tempPath() + QDir::separator() + "maprendertest.html";
183-
QFile myFile ( myReportFile);
184-
if ( myFile.open ( QIODevice::WriteOnly ) )
183+
QFile myFile( myReportFile );
184+
if ( myFile.open( QIODevice::WriteOnly ) )
185185
{
186-
QTextStream myQTextStream ( &myFile );
186+
QTextStream myQTextStream( &myFile );
187187
myQTextStream << mReport;
188188
myFile.close();
189-
QDesktopServices::openUrl("file://"+myReportFile);
189+
QDesktopServices::openUrl( "file://" + myReportFile );
190190
}
191-
191+
192192
}
193193

194194

195195

196196
void TestQgsMapRenderer::performanceTest()
197197
{
198-
mpMapRenderer->setExtent(mpPolysLayer->extent());
199-
QString myDataDir (TEST_DATA_DIR); //defined in CmakeLists.txt
198+
mpMapRenderer->setExtent( mpPolysLayer->extent() );
199+
QString myDataDir( TEST_DATA_DIR ); //defined in CmakeLists.txt
200200
QString myTestDataDir = myDataDir + QDir::separator();
201201
QgsRenderChecker myChecker;
202-
myChecker.setExpectedImage ( myTestDataDir + "expected_maprender.png" );
203-
myChecker.setMapRenderer ( mpMapRenderer );
204-
bool myResultFlag = myChecker.runTest("maprender");
202+
myChecker.setExpectedImage( myTestDataDir + "expected_maprender.png" );
203+
myChecker.setMapRenderer( mpMapRenderer );
204+
bool myResultFlag = myChecker.runTest( "maprender" );
205205
mReport += myChecker.report();
206-
QVERIFY(myResultFlag);
206+
QVERIFY( myResultFlag );
207207
}
208208

209209

210-
QTEST_MAIN(TestQgsMapRenderer)
210+
QTEST_MAIN( TestQgsMapRenderer )
211211
#include "moc_testqgsmaprenderer.cxx"
212212

213213

‎tests/src/core/testqgsvectorfilewriter.cpp

Lines changed: 134 additions & 134 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.