Skip to content

Commit

Permalink
indentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 6, 2012
1 parent 30c7ec4 commit 5603cc0
Show file tree
Hide file tree
Showing 18 changed files with 399 additions and 393 deletions.
6 changes: 3 additions & 3 deletions src/app/qgisapp.cpp
Expand Up @@ -511,9 +511,9 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,

// create the notification widget for macros
mMacrosWarn = QgsMessageBar::createMessage( tr( "Security warning:" ),
tr( "macros have been disabled." ),
QgsApplication::getThemeIcon( "/mIconWarn.png" ),
mInfoBar );
tr( "macros have been disabled." ),
QgsApplication::getThemeIcon( "/mIconWarn.png" ),
mInfoBar );

QToolButton *btnEnableMacros = new QToolButton( mMacrosWarn );
btnEnableMacros->setText( tr( "Enable" ) );
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsattributetypedialog.cpp
Expand Up @@ -607,7 +607,7 @@ void QgsAttributeTypeDialog::accept()
mValueRelationData.mAllowNull = valueRelationAllowNull->isChecked();
mValueRelationData.mOrderByValue = valueRelationOrderByValue->isChecked();
mValueRelationData.mAllowMulti = valueRelationAllowMulti->isChecked();
if( valueRelationFilterColumn->currentIndex() == 0 )
if ( valueRelationFilterColumn->currentIndex() == 0 )
{
mValueRelationData.mFilterAttributeColumn = QString::null;
mValueRelationData.mFilterAttributeValue = QString::null;
Expand Down Expand Up @@ -655,7 +655,7 @@ void QgsAttributeTypeDialog::updateLayerColumns( int idx )
valueRelationKeyColumn->setCurrentIndex( valueRelationKeyColumn->findText( mValueRelationData.mKey ) );
valueRelationValueColumn->setCurrentIndex( valueRelationValueColumn->findText( mValueRelationData.mValue ) );

if( mValueRelationData.mFilterAttributeColumn.isNull() )
if ( mValueRelationData.mFilterAttributeColumn.isNull() )
{
valueRelationFilterColumn->setCurrentIndex( 0 );
}
Expand Down Expand Up @@ -683,7 +683,7 @@ void QgsAttributeTypeDialog::updateFilterColumn( int idx )
QList<QVariant> uniqueValues;
vl->uniqueValues( fidx, uniqueValues );

foreach( const QVariant &v, uniqueValues )
foreach ( const QVariant &v, uniqueValues )
{
valueRelationFilterValue->addItem( v.toString(), v );
}
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdiagramproperties.cpp
Expand Up @@ -376,6 +376,7 @@ void QgsDiagramProperties::on_mAddCategoryPushButton_clicked()

void QgsDiagramProperties::on_mAttributesTreeWidget_itemDoubleClicked( QTreeWidgetItem * item, int column )
{
Q_UNUSED( column );
addAttribute( item );
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmeasuretool.h
Expand Up @@ -40,7 +40,7 @@ class QgsMeasureTool : public QgsMapTool
//! returns whether measuring distance or area
bool measureArea() { return mMeasureArea; }

//! When we hvae added our last point, and not following
//! When we have added our last point, and not following
// Added in 2.0
bool done() { return mDone; }

Expand Down
10 changes: 5 additions & 5 deletions src/core/composer/qgscomposerscalebar.cpp
Expand Up @@ -242,15 +242,15 @@ void QgsComposerScaleBar::applyDefaultSize()
int nUnitsPerSegment = widthMeter / 10.0; //default scalebar width equals half the map width
setNumUnitsPerSegment( nUnitsPerSegment );

if( nUnitsPerSegment > 1000 )
if ( nUnitsPerSegment > 1000 )
{
setNumUnitsPerSegment( (int)( numUnitsPerSegment() / 1000.0 + 0.5 ) * 1000 );
setUnitLabeling( tr("km") );
setNumMapUnitsPerScaleBarUnit( 1000 );
setNumUnitsPerSegment(( int )( numUnitsPerSegment() / 1000.0 + 0.5 ) * 1000 );
setUnitLabeling( tr( "km" ) );
setNumMapUnitsPerScaleBarUnit( 1000 );
}
else
{
setUnitLabeling( tr("m") );
setUnitLabeling( tr( "m" ) );
}

setNumSegments( 4 );
Expand Down
4 changes: 3 additions & 1 deletion src/core/composer/qgscomposition.h
Expand Up @@ -158,7 +158,9 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene

/**Load a template document
@param doc template document
@param substitutionMap map with text to replace. Text needs to be enclosed by brackets (e.g. '[text]' )*/
@param substitutionMap map with text to replace. Text needs to be enclosed by brackets (e.g. '[text]' )
@param addUndoCommands whether or not to add undo commands
*/
bool loadFromTemplate( const QDomDocument& doc, QMap<QString, QString>* substitutionMap = 0, bool addUndoCommands = false );

/**Add items from XML representation to the graphics scene (for project file reading, pasting items from clipboard)
Expand Down
12 changes: 6 additions & 6 deletions src/core/diagram/qgstextdiagram.cpp
Expand Up @@ -40,7 +40,7 @@ QSizeF QgsTextDiagram::diagramSize( const QgsAttributeMap& attributes, const Qgs
{
return QSizeF(); //zero size if attribute is missing
}

double scaledValue = attIt.value().toDouble();
double scaledLowerValue = is.lowerValue;
double scaledUpperValue = is.upperValue;
Expand Down Expand Up @@ -77,11 +77,11 @@ QSizeF QgsTextDiagram::diagramSize( const QgsAttributeMap& attributes, const Qgs
}

QSizeF QgsTextDiagram::diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s )
{
{
Q_UNUSED( c );
Q_UNUSED( attributes );
Q_UNUSED( attributes );

return s.size;
return s.size;
}

void QgsTextDiagram::renderDiagram( const QgsAttributeMap& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position )
Expand Down Expand Up @@ -218,11 +218,11 @@ void QgsTextDiagram::renderDiagram( const QgsAttributeMap& att, QgsRenderContext
mPen.setColor( s.categoryColors.at( i ) );
p->setPen( mPen );
QPointF position = textPositions.at( i );

// Calculate vertical placement
double xOffset = 0;

switch( s.labelPlacementMethod )
switch ( s.labelPlacementMethod )
{
case QgsDiagramSettings::Height:
xOffset = textHeight / 2.0;
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsapplication.cpp
Expand Up @@ -91,10 +91,10 @@ void QgsApplication::init( QString customConfigPath )

// check if QGIS is run from build directory (not the install directory)
QFile f;
foreach( QString path, QStringList() << "" << "/.." << "/bin" )
foreach ( QString path, QStringList() << "" << "/.." << "/bin" )
{
f.setFileName( prefixPath + path + "/path.txt" );
if( f.exists() )
if ( f.exists() )
break;
}
if ( f.exists() && f.open( QIODevice::ReadOnly ) )
Expand Down

0 comments on commit 5603cc0

Please sign in to comment.