Skip to content

Commit

Permalink
Optimise destructors (pt 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 30, 2016
1 parent 2daaff3 commit 2a34af8
Show file tree
Hide file tree
Showing 181 changed files with 35 additions and 668 deletions.
4 changes: 0 additions & 4 deletions src/core/composer/qgsatlascomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ QgsAtlasComposition::QgsAtlasComposition( QgsComposition* composition )
connect( QgsProject::instance(), SIGNAL( layersWillBeRemoved( QStringList ) ), this, SLOT( removeLayers( QStringList ) ) );
}

QgsAtlasComposition::~QgsAtlasComposition()
{
}

void QgsAtlasComposition::setEnabled( bool enabled )
{
if ( enabled == mEnabled )
Expand Down
1 change: 0 additions & 1 deletion src/core/composer/qgsatlascomposition.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class CORE_EXPORT QgsAtlasComposition : public QObject
Q_OBJECT
public:
QgsAtlasComposition( QgsComposition* composition );
~QgsAtlasComposition();

/** Returns whether the atlas generation is enabled
* @returns true if atlas is enabled
Expand Down
11 changes: 0 additions & 11 deletions src/core/composer/qgscomposerattributetablemodelv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@
QgsComposerAttributeTableColumnModelV2::QgsComposerAttributeTableColumnModelV2( QgsComposerAttributeTableV2 *composerTable, QObject *parent ) : QAbstractTableModel( parent )
, mComposerTable( composerTable )
{

}

QgsComposerAttributeTableColumnModelV2::~QgsComposerAttributeTableColumnModelV2()
{

}

QModelIndex QgsComposerAttributeTableColumnModelV2::index( int row, int column, const QModelIndex &parent ) const
Expand Down Expand Up @@ -451,11 +445,6 @@ QgsComposerTableSortColumnsProxyModelV2::QgsComposerTableSortColumnsProxyModelV2
setDynamicSortFilter( true );
}

QgsComposerTableSortColumnsProxyModelV2::~QgsComposerTableSortColumnsProxyModelV2()
{

}

bool QgsComposerTableSortColumnsProxyModelV2::filterAcceptsRow( int source_row, const QModelIndex &source_parent ) const
{
//get QgsComposerTableColumn corresponding to row
Expand Down
3 changes: 0 additions & 3 deletions src/core/composer/qgscomposerattributetablemodelv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class CORE_EXPORT QgsComposerAttributeTableColumnModelV2: public QAbstractTableM
* @param parent optional parent
*/
QgsComposerAttributeTableColumnModelV2( QgsComposerAttributeTableV2 *composerTable, QObject *parent = nullptr );
virtual ~QgsComposerAttributeTableColumnModelV2();

virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const override;
int columnCount( const QModelIndex &parent = QModelIndex() ) const override;
Expand Down Expand Up @@ -150,8 +149,6 @@ class CORE_EXPORT QgsComposerTableSortColumnsProxyModelV2: public QSortFilterPro
*/
QgsComposerTableSortColumnsProxyModelV2( QgsComposerAttributeTableV2 *composerTable, ColumnFilterType filterType, QObject *parent = nullptr );

virtual ~QgsComposerTableSortColumnsProxyModelV2();

bool lessThan( const QModelIndex &left, const QModelIndex &right ) const override;
int columnCount( const QModelIndex &parent = QModelIndex() ) const override;
virtual QVariant data( const QModelIndex &index, int role ) const override;
Expand Down
4 changes: 0 additions & 4 deletions src/core/composer/qgscomposerattributetablev2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ QgsComposerAttributeTableV2::QgsComposerAttributeTableV2( QgsComposition* compos
refreshAttributes();
}

QgsComposerAttributeTableV2::~QgsComposerAttributeTableV2()
{
}

QString QgsComposerAttributeTableV2::displayName() const
{
return tr( "<attribute table>" );
Expand Down
1 change: 0 additions & 1 deletion src/core/composer/qgscomposerattributetablev2.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class CORE_EXPORT QgsComposerAttributeTableV2: public QgsComposerTableV2
};

QgsComposerAttributeTableV2( QgsComposition* composition, bool createUndoCommands );
~QgsComposerAttributeTableV2();

virtual QString displayName() const override;

Expand Down
4 changes: 0 additions & 4 deletions src/core/composer/qgscomposereffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ QgsComposerEffect::QgsComposerEffect()
{
}

QgsComposerEffect::~QgsComposerEffect()
{
}

void QgsComposerEffect::draw( QPainter *painter )
{
QPoint offset;
Expand Down
1 change: 0 additions & 1 deletion src/core/composer/qgscomposereffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class CORE_EXPORT QgsComposerEffect : public QGraphicsEffect

public:
QgsComposerEffect();
~QgsComposerEffect();

void setCompositionMode( QPainter::CompositionMode compositionMode );

Expand Down
4 changes: 0 additions & 4 deletions src/core/composer/qgscomposerframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ QgsComposerFrame::QgsComposerFrame()
setBackgroundEnabled( false );
}

QgsComposerFrame::~QgsComposerFrame()
{
}

bool QgsComposerFrame::writeXml( QDomElement& elem, QDomDocument & doc ) const
{
QDomElement frameElem = doc.createElement( QStringLiteral( "ComposerFrame" ) );
Expand Down
2 changes: 0 additions & 2 deletions src/core/composer/qgscomposerframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class CORE_EXPORT QgsComposerFrame: public QgsComposerItem
public:
QgsComposerFrame( QgsComposition* c, QgsComposerMultiFrame* mf, qreal x, qreal y, qreal width, qreal height );

~QgsComposerFrame();

/** Sets the visible part of the multiframe's content which is visible within
* this frame (relative to the total multiframe extent in mm).
* @param section visible portion of content
Expand Down
8 changes: 0 additions & 8 deletions src/core/composer/qgscomposeritemcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ QgsComposerItemCommand::QgsComposerItemCommand( QgsComposerItem* item, const QSt
}
}

QgsComposerItemCommand::~QgsComposerItemCommand()
{
}

void QgsComposerItemCommand::undo()
{
restoreState( mPreviousState );
Expand Down Expand Up @@ -131,10 +127,6 @@ QgsComposerMergeCommand::QgsComposerMergeCommand( Context c, QgsComposerItem* it
{
}

QgsComposerMergeCommand::~QgsComposerMergeCommand()
{
}

bool QgsComposerMergeCommand::mergeWith( const QUndoCommand * command )
{
QgsComposerItem* thisItem = item();
Expand Down
2 changes: 0 additions & 2 deletions src/core/composer/qgscomposeritemcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class CORE_EXPORT QgsComposerItemCommand: public QUndoCommand
{
public:
QgsComposerItemCommand( QgsComposerItem* item, const QString& text, QUndoCommand* parent = nullptr );
virtual ~QgsComposerItemCommand();

//! Reverses the command
void undo() override;
Expand Down Expand Up @@ -157,7 +156,6 @@ class CORE_EXPORT QgsComposerMergeCommand: public QgsComposerItemCommand
};

QgsComposerMergeCommand( Context c, QgsComposerItem* item, const QString& text );
~QgsComposerMergeCommand();

bool mergeWith( const QUndoCommand * command ) override;
int id() const override { return static_cast< int >( mContext ); }
Expand Down
4 changes: 0 additions & 4 deletions src/core/composer/qgscomposermapgrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ QgsComposerMapGridStack::QgsComposerMapGridStack( QgsComposerMap* map )

}

QgsComposerMapGridStack::~QgsComposerMapGridStack()
{
}

void QgsComposerMapGridStack::addGrid( QgsComposerMapGrid* grid )
{
QgsComposerMapItemStack::addItem( grid );
Expand Down
2 changes: 0 additions & 2 deletions src/core/composer/qgscomposermapgrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ class CORE_EXPORT QgsComposerMapGridStack : public QgsComposerMapItemStack
*/
QgsComposerMapGridStack( QgsComposerMap* map );

virtual ~QgsComposerMapGridStack();

/** Adds a new map grid to the stack and takes ownership of the grid.
* The grid will be added to the end of the stack, and rendered
* above any existing map grids already present in the stack.
Expand Down
5 changes: 0 additions & 5 deletions src/core/composer/qgscomposermapitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ QgsComposerMapItem::QgsComposerMapItem( const QString &name, QgsComposerMap *map

}

QgsComposerMapItem::~QgsComposerMapItem()
{

}

bool QgsComposerMapItem::writeXml( QDomElement &elem, QDomDocument &doc ) const
{
Q_UNUSED( doc );
Expand Down
2 changes: 0 additions & 2 deletions src/core/composer/qgscomposermapitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ class CORE_EXPORT QgsComposerMapItem : public QgsComposerObject
*/
QgsComposerMapItem( const QString& name, QgsComposerMap* map );

virtual ~QgsComposerMapItem();

/** Draws the item on to a painter
* @param painter destination QPainter
*/
Expand Down
5 changes: 0 additions & 5 deletions src/core/composer/qgscomposermapoverview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,6 @@ QgsComposerMapOverviewStack::QgsComposerMapOverviewStack( QgsComposerMap *map )

}

QgsComposerMapOverviewStack::~QgsComposerMapOverviewStack()
{

}

void QgsComposerMapOverviewStack::addOverview( QgsComposerMapOverview *overview )
{
QgsComposerMapItemStack::addItem( overview );
Expand Down
2 changes: 0 additions & 2 deletions src/core/composer/qgscomposermapoverview.h