2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4416,7 +4416,7 @@ bool QgisApp::toggleEditing( QgsMapLayer *layer, bool allowCancel )

if ( !vlayer->isEditable() && !vlayer->isReadOnly() )
{
if ( !(vlayer->dataProvider()->capabilities() & QgsVectorDataProvider::EditingCapabilities ) )
if ( !( vlayer->dataProvider()->capabilities() & QgsVectorDataProvider::EditingCapabilities ) )
{
QMessageBox::information( 0, tr( "Start editing failed" ), tr( "Provider cannot be opened for editing" ) );
return false;
Expand Down
10 changes: 5 additions & 5 deletions src/app/qgsbookmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void QgsBookmarks::deleteClicked()
}
}

if( rows.size() == 0 )
if ( rows.size() == 0 )
return;

// make sure the user really wants to delete these bookmarks
Expand All @@ -184,10 +184,10 @@ void QgsBookmarks::deleteClicked()
QMessageBox::Ok | QMessageBox::Cancel ) )
return;

int i=0;
int i = 0;
foreach( int row, rows )
{
lstBookmarks->model()->removeRow( row-i );
lstBookmarks->model()->removeRow( row - i );
i++;
}
}
Expand Down Expand Up @@ -217,9 +217,9 @@ void QgsBookmarks::zoomToBookmark()
srid != QgisApp::instance()->mapCanvas()->mapRenderer()->destinationCrs().srsid() )
{
QgsCoordinateTransform ct( QgsCoordinateReferenceSystem( srid, QgsCoordinateReferenceSystem::InternalCrsId ),
QgisApp::instance()->mapCanvas()->mapRenderer()->destinationCrs() );
QgisApp::instance()->mapCanvas()->mapRenderer()->destinationCrs() );
rect = ct.transform( rect );
if( rect.isEmpty() )
if ( rect.isEmpty() )
{
QMessageBox::warning( this, tr( "Empty extent" ), tr( "Reprojected extent is empty." ) );
return;
Expand Down
80 changes: 40 additions & 40 deletions src/core/qgsdatasourceuri.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,47 +530,47 @@ QString QgsDataSourceURI::uri() const
{
theUri += " type=";

switch( mWkbType )
switch ( mWkbType )
{
case QGis::WKBPoint:
theUri += "POINT";
break;
case QGis::WKBLineString:
theUri += "LINESTRING";
break;
case QGis::WKBPolygon:
theUri += "POLYGON";
break;
case QGis::WKBMultiPoint:
theUri += "MULTIPOINT";
break;
case QGis::WKBMultiLineString:
theUri += "MULTILINESTRING";
break;
case QGis::WKBMultiPolygon:
theUri += "MULTIPOLYGON";
break;
case QGis::WKBPoint25D:
theUri += "POINTM";
break;
case QGis::WKBLineString25D:
theUri += "LINESTRINGM";
break;
case QGis::WKBPolygon25D:
theUri += "POLYGONM";
break;
case QGis::WKBMultiPoint25D:
theUri += "MULTIPOINTM";
break;
case QGis::WKBMultiLineString25D:
theUri += "MULTILINESTRINGM";
break;
case QGis::WKBMultiPolygon25D:
theUri += "MULTIPOLYGONM";
break;
case QGis::WKBUnknown:
case QGis::WKBNoGeometry:
break;
case QGis::WKBPoint:
theUri += "POINT";
break;
case QGis::WKBLineString:
theUri += "LINESTRING";
break;
case QGis::WKBPolygon:
theUri += "POLYGON";
break;
case QGis::WKBMultiPoint:
theUri += "MULTIPOINT";
break;
case QGis::WKBMultiLineString:
theUri += "MULTILINESTRING";
break;
case QGis::WKBMultiPolygon:
theUri += "MULTIPOLYGON";
break;
case QGis::WKBPoint25D:
theUri += "POINTM";
break;
case QGis::WKBLineString25D:
theUri += "LINESTRINGM";
break;
case QGis::WKBPolygon25D:
theUri += "POLYGONM";
break;
case QGis::WKBMultiPoint25D:
theUri += "MULTIPOINTM";
break;
case QGis::WKBMultiLineString25D:
theUri += "MULTILINESTRINGM";
break;
case QGis::WKBMultiPolygon25D:
theUri += "MULTIPOLYGONM";
break;
case QGis::WKBUnknown:
case QGis::WKBNoGeometry:
break;
}
}

Expand Down
27 changes: 14 additions & 13 deletions src/core/qgsmaplayerregistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,21 @@ QgsMapLayer * QgsMapLayerRegistry::mapLayer( QString theLayerId )

//introduced in 1.8
QList<QgsMapLayer *> QgsMapLayerRegistry::addMapLayers(
QList<QgsMapLayer *> theMapLayers,
bool theEmitSignal )
QList<QgsMapLayer *> theMapLayers,
bool theEmitSignal )
{
QList<QgsMapLayer *> myResultList;
for (int i = 0; i < theMapLayers.size(); ++i)
for ( int i = 0; i < theMapLayers.size(); ++i )
{
QgsMapLayer * myLayer = theMapLayers.at(i);
QgsMapLayer * myLayer = theMapLayers.at( i );
if ( !myLayer || !myLayer->isValid() )
{
QgsDebugMsg( "cannot add invalid layers" );
continue;
}
//check the layer is not already registered!
QMap<QString, QgsMapLayer*>::iterator myIterator =
mMapLayers.find( myLayer->id() );
mMapLayers.find( myLayer->id() );
//if myIterator returns mMapLayers.end() then it
//does not exist in registry and its safe to add it
if ( myIterator == mMapLayers.end() )
Expand All @@ -93,8 +93,8 @@ QgsMapLayerRegistry::addMapLayer( QgsMapLayer * theMapLayer,
bool theEmitSignal )
{
QList<QgsMapLayer *> myList;
myList.append(theMapLayer);
addMapLayers(myList, theEmitSignal);
myList.append( theMapLayer );
addMapLayers( myList, theEmitSignal );

if ( theEmitSignal )
emit layerWasAdded( theMapLayer );
Expand All @@ -104,21 +104,22 @@ QgsMapLayerRegistry::addMapLayer( QgsMapLayer * theMapLayer,

//introduced in 1.8
void QgsMapLayerRegistry::removeMapLayers( QStringList theLayerIds,
bool theEmitSignal )
bool theEmitSignal )
{
if ( theEmitSignal )
emit layersWillBeRemoved( theLayerIds );

foreach (const QString &myId, theLayerIds) {
delete mMapLayers[myId];
mMapLayers.remove( myId );
foreach( const QString &myId, theLayerIds )
{
delete mMapLayers[myId];
mMapLayers.remove( myId );
}
emit layersWillBeRemoved(theLayerIds);
emit layersWillBeRemoved( theLayerIds );
}

//deprecated 1.8 use removeMapLayers rather
void QgsMapLayerRegistry::removeMapLayer( QString theLayerId,
bool theEmitSignal )
bool theEmitSignal )
{
if ( theEmitSignal )
emit layerWillBeRemoved( theLayerId );
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,8 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )

select( attributes, rendererContext.extent() );

if ( ( mRendererV2->capabilities() & QgsFeatureRendererV2::SymbolLevels )
&& mRendererV2->usingSymbolLevels() )
if (( mRendererV2->capabilities() & QgsFeatureRendererV2::SymbolLevels )
&& mRendererV2->usingSymbolLevels() )
drawRendererV2Levels( rendererContext, labeling );
else
drawRendererV2( rendererContext, labeling );
Expand Down
3 changes: 2 additions & 1 deletion src/core/symbology-ng/qgsrendererv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ class CORE_EXPORT QgsFeatureRendererV2
//! for debugging
virtual QString dump();

enum Capabilities {
enum Capabilities
{
SymbolLevels = 1, // rendering with symbol levels (i.e. implements symbols(), symbolForFeature())
RotationField = 1 << 1, // rotate symbols by attribute value
MoreSymbolsPerFeature = 1 << 2 // may use more than one symbol to render a feature: symbolsForFeature() will return them
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/heatmap/heatmapgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ void HeatmapGui::enableOrDisableOkButton()
void HeatmapGui::populateFields()
{
QgsVectorLayer* inputLayer = inputVectorLayer();
if( !inputLayer )
if ( !inputLayer )
return;

// The fields
Expand Down Expand Up @@ -277,7 +277,7 @@ void HeatmapGui::updateBBox()
{
// Set the row/cols and cell sizes here
QgsVectorLayer *inputLayer = inputVectorLayer();
if( !inputLayer )
if ( !inputLayer )
return;

mBBox = inputLayer->extent();
Expand Down
4 changes: 4 additions & 0 deletions src/providers/mssql/qgsmssqldataitems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ QgsMssqlConnectionItem::QgsMssqlConnectionItem( QgsDataItem* parent, QString nam
}

mUseGeometryColumns = settings.value( key + "/geometryColumns", false ).toBool();
mUseEstimatedMetadata = settings.value( key + "/estimatedMetadata", false ).toBool();
mAllowGeometrylessTables = settings.value( key + "/allowGeometrylessTables", true ).toBool();

mConnInfo = "dbname='" + mDatabase + "' host=" + mHost + " user='" + mUsername + "' password='" + mPassword + "'";
if ( !mService.isEmpty() )
mConnInfo += " service='" + mService + "'";
if ( mUseEstimatedMetadata )
mConnInfo += " estimatedmetadata=true";
}

QgsMssqlConnectionItem::~QgsMssqlConnectionItem()
Expand Down
2 changes: 2 additions & 0 deletions src/providers/mssql/qgsmssqldataitems.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ class QgsMssqlConnectionItem : public QgsDataCollectionItem
QString mUsername;
QString mPassword;
bool mUseGeometryColumns;
bool mUseEstimatedMetadata;
bool mAllowGeometrylessTables;
};

class QgsMssqlSchemaItem : public QgsDataCollectionItem
Expand Down
Loading