Skip to content
Permalink
Browse files

Fix some leaks in QgisApp

  • Loading branch information
nyalldawson committed Aug 28, 2015
1 parent dec4f5c commit a8f85fb10347ce58080c1ba9a1c2b6bfee2b5474
@@ -1041,6 +1041,7 @@ QgisApp::~QgisApp()
delete mComposerManager;

delete mVectorLayerTools;
delete mWelcomePage;

deletePrintComposers();
removeAnnotationItems();
@@ -185,6 +185,12 @@ QgsAdvancedDigitizingDockWidget::QgsAdvancedDigitizingDockWidget( QgsMapCanvas*
QgsAdvancedDigitizingDockWidget::~QgsAdvancedDigitizingDockWidget()
{
delete mErrorMessage;
delete mCadPaintItem;
delete mAngleConstraint;

This comment has been minimized.

Copy link
@3nids

3nids Aug 28, 2015

Member

had to remove this

This comment has been minimized.

Copy link
@nyalldawson

nyalldawson Aug 28, 2015

Author Collaborator

Sorry about that.... A bit overzealous!

delete mDistanceConstraint;
delete mXConstraint;
delete mYConstraint;

}

void QgsAdvancedDigitizingDockWidget::hideEvent( QHideEvent* )
@@ -44,7 +44,7 @@ QgsBookmarks::QgsBookmarks( QWidget *parent ) : QDockWidget( parent )
btnImpExp->setIcon( QgsApplication::getThemeIcon( "/mActionSharing.svg" ) );
btnImpExp->setPopupMode( QToolButton::InstantPopup );

QMenu *share = new QMenu();
QMenu *share = new QMenu( this );
QAction *btnExport = share->addAction( tr( "&Export" ) );
QAction *btnImport = share->addAction( tr( "&Import" ) );
btnExport->setIcon( QgsApplication::getThemeIcon( "/mActionSharingExport.svg" ) );
@@ -88,13 +88,18 @@ QgsWelcomePage::QgsWelcomePage( QWidget* parent )
mainLayout->addWidget( mVersionInformation );
mVersionInformation->setVisible( false );

QgsVersionInfo* versionInfo = new QgsVersionInfo();
connect( versionInfo, SIGNAL( versionInfoAvailable() ), this, SLOT( versionInfoReceived() ) );
versionInfo->checkVersion();
mVersionInfo = new QgsVersionInfo();
connect( mVersionInfo, SIGNAL( versionInfoAvailable() ), this, SLOT( versionInfoReceived() ) );
mVersionInfo->checkVersion();

connect( recentProjectsListView, SIGNAL( activated( QModelIndex ) ), this, SLOT( itemActivated( QModelIndex ) ) );
}

QgsWelcomePage::~QgsWelcomePage()
{
delete mVersionInfo;
}

void QgsWelcomePage::setRecentProjects( const QList<QgsWelcomePageItemsModel::RecentProjectData>& recentProjects )
{
mModel->setRecentProjects( recentProjects );
@@ -22,13 +22,17 @@

#include "qgswelcomepageitemsmodel.h"

class QgsVersionInfo;

class QgsWelcomePage : public QTabWidget
{
Q_OBJECT

public:
QgsWelcomePage( QWidget* parent = 0 );

~QgsWelcomePage();

void setRecentProjects( const QList<QgsWelcomePageItemsModel::RecentProjectData>& recentProjects );

private slots:
@@ -39,6 +43,7 @@ class QgsWelcomePage : public QTabWidget
private:
QgsWelcomePageItemsModel* mModel;
QLabel* mVersionInformation;
QgsVersionInfo* mVersionInfo;
};

#endif // QGSWELCOMEDIALOG_H

0 comments on commit a8f85fb

Please sign in to comment.
You can’t perform that action at this time.