Skip to content

Commit 0a782f5

Browse files
committed
indentation update
1 parent 0c5930f commit 0a782f5

11 files changed

+65
-64
lines changed

src/app/composer/qgscomposer.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,12 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
235235
mComposition->setParent( mView );
236236
mView->setComposition( mComposition );
237237

238-
setTabPosition( Qt::AllDockWidgetAreas, QTabWidget::North);
239-
mGeneralDock = new QDockWidget(tr("Composition"),this);
238+
setTabPosition( Qt::AllDockWidgetAreas, QTabWidget::North );
239+
mGeneralDock = new QDockWidget( tr( "Composition" ), this );
240240
mGeneralDock->setObjectName( "CompositionDock" );
241-
mItemDock = new QDockWidget(tr("Item Properties"));
242-
mItemDock->setObjectName( "ItemDock");
243-
mUndoDock = new QDockWidget(tr("Command history"),this);
241+
mItemDock = new QDockWidget( tr( "Item Properties" ) );
242+
mItemDock->setObjectName( "ItemDock" );
243+
mUndoDock = new QDockWidget( tr( "Command history" ), this );
244244
mUndoDock->setObjectName( "CommandDock" );
245245

246246

@@ -261,8 +261,8 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
261261
mGeneralDock->show();
262262
mUndoDock->hide();
263263

264-
tabifyDockWidget(mGeneralDock, mUndoDock);
265-
tabifyDockWidget(mGeneralDock, mItemDock);
264+
tabifyDockWidget( mGeneralDock, mUndoDock );
265+
tabifyDockWidget( mGeneralDock, mItemDock );
266266

267267
mGeneralDock->raise();
268268

@@ -1099,10 +1099,10 @@ void QgsComposer::on_mActionRedo_triggered()
10991099
}
11001100
}
11011101

1102-
void QgsComposer::closeEvent(QCloseEvent *e)
1102+
void QgsComposer::closeEvent( QCloseEvent *e )
11031103
{
1104-
Q_UNUSED( e );
1105-
saveWindowState();
1104+
Q_UNUSED( e );
1105+
saveWindowState();
11061106
}
11071107

11081108
void QgsComposer::moveEvent( QMoveEvent *e )
@@ -1156,9 +1156,9 @@ void QgsComposer::saveWindowState()
11561156
void QgsComposer::restoreWindowState()
11571157
{
11581158
QSettings settings;
1159-
if (! restoreState( settings.value( "/ComposerUI/state" ).toByteArray() ))
1159+
if ( ! restoreState( settings.value( "/ComposerUI/state" ).toByteArray() ) )
11601160
{
1161-
QgsDebugMsg("RESTORE STATE FAILED!!");
1161+
QgsDebugMsg( "RESTORE STATE FAILED!!" );
11621162
}
11631163
restoreGeometry( settings.value( "/Composer/geometry" ).toByteArray() );
11641164
}

src/app/composer/qgscomposer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
8787
//! Move event
8888
virtual void moveEvent( QMoveEvent * );
8989

90-
virtual void closeEvent(QCloseEvent * );
90+
virtual void closeEvent( QCloseEvent * );
9191

9292
//! Resize event
9393
virtual void resizeEvent( QResizeEvent * );

src/app/ogr/qgsogrhelperfunctions.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ QString createDatabaseURI( QString connectionType, QString host, QString databas
104104
uri += QString( ";pwd=%1" ).arg( password );
105105
}
106106
else
107-
uri += ";trusted_connection=yes";
107+
uri += ";trusted_connection=yes";
108108

109109
if ( !database.isEmpty() )
110-
uri += QString( ";database=%1" ).arg( database );
110+
uri += QString( ";database=%1" ).arg( database );
111111
}
112112
else if ( connectionType == "Oracle Spatial" )
113113
{

src/app/ogr/qgsopenvectorlayerdialog.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,10 @@ void QgsOpenVectorLayerDialog::accept()
320320
makeConnection = true;
321321
else
322322
pass = QInputDialog::getText( this,
323-
tr( "Password for " ) + user,
324-
tr( "Please enter your password:" ),
325-
QLineEdit::Password, QString::null,
326-
&makeConnection );
323+
tr( "Password for " ) + user,
324+
tr( "Please enter your password:" ),
325+
QLineEdit::Password, QString::null,
326+
&makeConnection );
327327
}
328328

329329
if ( makeConnection || !pass.isEmpty() )

src/app/qgsbookmarks.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void QgsBookmarks::deleteClicked()
175175
}
176176
}
177177

178-
if( rows.size() == 0 )
178+
if ( rows.size() == 0 )
179179
return;
180180

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

187-
int i=0;
187+
int i = 0;
188188
foreach( int row, rows )
189189
{
190-
lstBookmarks->model()->removeRow( row-i );
190+
lstBookmarks->model()->removeRow( row - i );
191191
i++;
192192
}
193193
}
@@ -217,9 +217,9 @@ void QgsBookmarks::zoomToBookmark()
217217
srid != QgisApp::instance()->mapCanvas()->mapRenderer()->destinationCrs().srsid() )
218218
{
219219
QgsCoordinateTransform ct( QgsCoordinateReferenceSystem( srid, QgsCoordinateReferenceSystem::InternalCrsId ),
220-
QgisApp::instance()->mapCanvas()->mapRenderer()->destinationCrs() );
220+
QgisApp::instance()->mapCanvas()->mapRenderer()->destinationCrs() );
221221
rect = ct.transform( rect );
222-
if( rect.isEmpty() )
222+
if ( rect.isEmpty() )
223223
{
224224
QMessageBox::warning( this, tr( "Empty extent" ), tr( "Reprojected extent is empty." ) );
225225
return;

src/app/qgsfieldcalculator.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -269,16 +269,16 @@ void QgsFieldCalculator::populateFields()
269269
void QgsFieldCalculator::setOkButtonState()
270270
{
271271
QPushButton* okButton = mButtonBox->button( QDialogButtonBox::Ok );
272-
okButton->setToolTip("");
272+
okButton->setToolTip( "" );
273273

274274
bool emptyFieldName = mOutputFieldNameLineEdit->text().isEmpty();
275275
bool expressionValid = builder->isExpressionValid();
276276

277277
if ( emptyFieldName )
278-
okButton->setToolTip( tr("Please enter a field name") );
278+
okButton->setToolTip( tr( "Please enter a field name" ) );
279279

280280
if ( !expressionValid )
281-
okButton->setToolTip( okButton->toolTip() + tr("\n The expression is invalid see (more info) for details") );
281+
okButton->setToolTip( okButton->toolTip() + tr( "\n The expression is invalid see (more info) for details" ) );
282282

283283
bool okEnabled = ( !emptyFieldName || mUpdateExistingGroupBox->isChecked() ) && expressionValid;
284284

src/app/qgsmaptoolidentify.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ bool QgsMapToolIdentify::identifyRasterLayer( QgsRasterLayer *layer, int x, int
328328
{
329329
idPoint = toLayerCoordinates( layer, idPoint );
330330
}
331-
catch( QgsCsException &cse )
331+
catch ( QgsCsException &cse )
332332
{
333333
Q_UNUSED( cse );
334334
QgsDebugMsg( QString( "coordinate not reprojectable: %1" ).arg( cse.what() ) );

src/core/symbology-ng/qgsrendererv2.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ class CORE_EXPORT QgsFeatureRendererV2
7878
//! for debugging
7979
virtual QString dump();
8080

81-
enum Capabilities {
81+
enum Capabilities
82+
{
8283
SymbolLevels = 1 // rendering with symbol levels (i.e. implements symbols(), symbolForFeature())
8384
};
8485

src/gui/qgscomposerview.cpp

+24-24
Original file line numberDiff line numberDiff line change
@@ -206,33 +206,33 @@ void QgsComposerView::mousePressEvent( QMouseEvent* e )
206206
}
207207
}
208208

209-
void QgsComposerView::addShape(Tool currentTool)
209+
void QgsComposerView::addShape( Tool currentTool )
210210
{
211-
QgsComposerShape::Shape shape = QgsComposerShape::Ellipse;
211+
QgsComposerShape::Shape shape = QgsComposerShape::Ellipse;
212212

213-
if ( currentTool == AddRectangle )
214-
shape = QgsComposerShape::Rectangle;
215-
else if ( currentTool == AddTriangle )
216-
shape = QgsComposerShape::Triangle;
213+
if ( currentTool == AddRectangle )
214+
shape = QgsComposerShape::Rectangle;
215+
else if ( currentTool == AddTriangle )
216+
shape = QgsComposerShape::Triangle;
217217

218-
if ( !mRubberBandItem || mRubberBandItem->rect().width() < 0.1 || mRubberBandItem->rect().width() < 0.1 )
219-
{
220-
scene()->removeItem( mRubberBandItem );
221-
delete mRubberBandItem;
222-
mRubberBandItem = 0;
223-
return;
224-
}
225-
if ( composition() )
226-
{
227-
QgsComposerShape* composerShape = new QgsComposerShape( mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), mRubberBandItem->rect().height(), composition() );
228-
composerShape->setShapeType( shape );
229-
composition()->addComposerShape( composerShape );
230-
scene()->removeItem( mRubberBandItem );
231-
delete mRubberBandItem;
232-
mRubberBandItem = 0;
233-
emit actionFinished();
234-
composition()->pushAddRemoveCommand( composerShape, tr( "Shape added" ) );
235-
}
218+
if ( !mRubberBandItem || mRubberBandItem->rect().width() < 0.1 || mRubberBandItem->rect().width() < 0.1 )
219+
{
220+
scene()->removeItem( mRubberBandItem );
221+
delete mRubberBandItem;
222+
mRubberBandItem = 0;
223+
return;
224+
}
225+
if ( composition() )
226+
{
227+
QgsComposerShape* composerShape = new QgsComposerShape( mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), mRubberBandItem->rect().height(), composition() );
228+
composerShape->setShapeType( shape );
229+
composition()->addComposerShape( composerShape );
230+
scene()->removeItem( mRubberBandItem );
231+
delete mRubberBandItem;
232+
mRubberBandItem = 0;
233+
emit actionFinished();
234+
composition()->pushAddRemoveCommand( composerShape, tr( "Shape added" ) );
235+
}
236236
}
237237

238238
void QgsComposerView::mouseReleaseEvent( QMouseEvent* e )

src/gui/qgsexpressionbuilderwidget.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ void QgsExpressionBuilderWidget::currentChanged( const QModelIndex &index, const
114114
if ( item->getItemType() != QgsExpressionItem::Field )
115115
{
116116

117-
mValueGroupBox->hide();
118-
mValueListWidget->clear();
117+
mValueGroupBox->hide();
118+
mValueListWidget->clear();
119119
}
120120
// Show the help for the current item.
121121
QString help = loadFunctionHelp( item );
@@ -401,18 +401,18 @@ QString QgsExpressionBuilderWidget::loadFunctionHelp( QgsExpressionItem* functio
401401
QString name = functionName->text();
402402

403403
if ( functionName->getItemType() == QgsExpressionItem::Field )
404-
name = "Field";
404+
name = "Field";
405405

406406
QString fullHelpPath = helpFilesPath + name + "-" + lang;
407407
// get the help content and title from the localized file
408408
QString helpContents;
409409
QFile file( fullHelpPath );
410410
// check to see if the localized version exists
411411

412-
QString missingError = tr("<h3>Oops! QGIS can't find help for this function.</h3>"
413-
"The help file for %1 was not found for your language<br>"
414-
"If you would like to create it, contact the QGIS development team"
415-
).arg( name );
412+
QString missingError = tr( "<h3>Oops! QGIS can't find help for this function.</h3>"
413+
"The help file for %1 was not found for your language<br>"
414+
"If you would like to create it, contact the QGIS development team"
415+
).arg( name );
416416
if ( !file.exists() )
417417
{
418418
// change the file name to the en_US version (default)

src/helpviewer/qgshelpviewer.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ void QgsHelpViewer::loadContext( const QString &contextId )
128128
QString helpContents;
129129
QFile file( fullHelpPath );
130130

131-
QString missingError = tr("<h3>Oops! QGIS can't find help for this form.</h3>"
132-
"The help file for %1 was not found for your language<br>"
133-
"If you would like to create it, contact the QGIS development team"
134-
).arg( contextId );
131+
QString missingError = tr( "<h3>Oops! QGIS can't find help for this form.</h3>"
132+
"The help file for %1 was not found for your language<br>"
133+
"If you would like to create it, contact the QGIS development team"
134+
).arg( contextId );
135135

136136
// check to see if the localized version exists
137137
if ( !file.exists() )

0 commit comments

Comments
 (0)