Skip to content

Commit 1fdb6cb

Browse files
author
jef
committed
update indentation and fix a warning
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9158 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3e7e1d3 commit 1fdb6cb

File tree

5 files changed

+164
-166
lines changed

5 files changed

+164
-166
lines changed

src/app/composer/qgscomposer.cpp

+20-20
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow()
7676

7777
toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionGroupItems.png" ) ), tr( "&Group Items" ), this, SLOT( groupItems() ) );
7878
toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionUngroupItems.png" ) ), tr( "&Ungroup Items" ), this, SLOT( ungroupItems() ) );
79-
toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionRaiseItems.png")), tr("Raise selected items"), this, SLOT(raiseSelectedItems()));
80-
toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionLowerItems.png")), tr("Lower selected items"), this, SLOT(lowerSelectedItems()));
81-
toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionMoveItemsToTop.png")), tr("Move selected items to top"), this, SLOT(moveSelectedItemsToTop()));
82-
toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionMoveItemsToBottom.png")), tr("Move selected items to bottom"), this, SLOT(moveSelectedItemsToBottom()));
79+
toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionRaiseItems.png" ) ), tr( "Raise selected items" ), this, SLOT( raiseSelectedItems() ) );
80+
toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionLowerItems.png" ) ), tr( "Lower selected items" ), this, SLOT( lowerSelectedItems() ) );
81+
toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionMoveItemsToTop.png" ) ), tr( "Move selected items to top" ), this, SLOT( moveSelectedItemsToTop() ) );
82+
toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionMoveItemsToBottom.png" ) ), tr( "Move selected items to bottom" ), this, SLOT( moveSelectedItemsToBottom() ) );
8383

8484
QActionGroup* toggleActionGroup = new QActionGroup( this );
8585
toggleActionGroup->addAction( moveItemContentAction );
@@ -1034,34 +1034,34 @@ void QgsComposer::ungroupItems( void )
10341034

10351035
void QgsComposer::raiseSelectedItems()
10361036
{
1037-
if(mComposition)
1038-
{
1039-
mComposition->raiseSelectedItems();
1040-
}
1037+
if ( mComposition )
1038+
{
1039+
mComposition->raiseSelectedItems();
1040+
}
10411041
}
10421042

10431043
void QgsComposer::lowerSelectedItems()
10441044
{
1045-
if(mComposition)
1046-
{
1047-
mComposition->lowerSelectedItems();
1048-
}
1045+
if ( mComposition )
1046+
{
1047+
mComposition->lowerSelectedItems();
1048+
}
10491049
}
10501050

10511051
void QgsComposer::moveSelectedItemsToTop()
10521052
{
1053-
if(mComposition)
1054-
{
1055-
mComposition->moveSelectedItemsToTop();
1056-
}
1053+
if ( mComposition )
1054+
{
1055+
mComposition->moveSelectedItemsToTop();
1056+
}
10571057
}
10581058

10591059
void QgsComposer::moveSelectedItemsToBottom()
10601060
{
1061-
if(mComposition)
1062-
{
1063-
mComposition->moveSelectedItemsToBottom();
1064-
}
1061+
if ( mComposition )
1062+
{
1063+
mComposition->moveSelectedItemsToBottom();
1064+
}
10651065
}
10661066

10671067
void QgsComposer::moveEvent( QMoveEvent *e ) { saveWindowState(); }

src/app/qgisapp.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -4658,14 +4658,12 @@ bool QgisApp::saveDirty()
46584658

46594659
void QgisApp::changeEvent( QEvent* event )
46604660
{
4661-
switch ( event->type() )
4662-
{
4663-
case QEvent::WindowTitleChange:
46644661
#ifdef Q_WS_MAC
4665-
mWindowAction->setText( windowTitle() );
4666-
#endif
4667-
break;
4662+
if ( event->type() == QEvent::WindowTitleChange )
4663+
{
4664+
mWindowAction->setText( windowTitle() );
46684665
}
4666+
#endif
46694667
QWidget::changeEvent( event );
46704668
}
46714669

src/core/composer/qgscomposeritem.cpp

+13-13
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ QgsComposerItem::QgsComposerItem( QgsComposition* composition ): QGraphicsRectIt
3939
setPen( defaultPen );
4040

4141
//let z-Value be managed by composition
42-
if(mComposition)
43-
{
44-
mComposition->addItemToZList(this);
45-
}
42+
if ( mComposition )
43+
{
44+
mComposition->addItemToZList( this );
45+
}
4646
}
4747

4848
QgsComposerItem::QgsComposerItem( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition ): QGraphicsRectItem( 0, 0, width, height, 0 ), mComposition( composition ), mBoundingResizeRectangle( 0 ), mFrame( true )
@@ -60,19 +60,19 @@ QgsComposerItem::QgsComposerItem( qreal x, qreal y, qreal width, qreal height, Q
6060
defaultPen.setWidth( 1 );
6161
setPen( defaultPen );
6262

63-
//let z-Value be managed by composition
64-
if(mComposition)
65-
{
66-
mComposition->addItemToZList(this);
67-
}
63+
//let z-Value be managed by composition
64+
if ( mComposition )
65+
{
66+
mComposition->addItemToZList( this );
67+
}
6868
}
6969

7070
QgsComposerItem::~QgsComposerItem()
7171
{
72-
if(mComposition)
73-
{
74-
mComposition->removeItemFromZList(this);
75-
}
72+
if ( mComposition )
73+
{
74+
mComposition->removeItemFromZList( this );
75+
}
7676
}
7777

7878
void QgsComposerItem::setSelected( bool s )

0 commit comments

Comments
 (0)