Skip to content
Permalink
Browse files

Fix a memory leak

  • Loading branch information
m-kuhn committed Aug 19, 2015
1 parent 23edcdb commit 9bce9eda9822374f948a310487bbd3ce2b694db9
Showing with 4 additions and 4 deletions.
  1. +1 −2 src/app/qgswelcomepage.cpp
  2. +2 −1 src/app/qgswelcomepageitemsmodel.cpp
  3. +1 −1 src/app/qgswelcomepageitemsmodel.h
@@ -43,7 +43,7 @@ QgsWelcomePage::QgsWelcomePage( QWidget* parent )
recentProjctsContainer->layout()->addWidget( recentProjectsTitle );

QListView* welcomeScreenListView = new QListView();
mModel = new QgsWelcomePageItemsModel();
mModel = new QgsWelcomePageItemsModel( welcomeScreenListView );
welcomeScreenListView->setModel( mModel );
welcomeScreenListView->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::MinimumExpanding );
welcomeScreenListView->setStyleSheet( "QListView::item {"
@@ -65,7 +65,6 @@ QgsWelcomePage::QgsWelcomePage( QWidget* parent )

layout->addWidget( recentProjctsContainer );


QWidget* whatsNewContainer = new QWidget;
whatsNewContainer->setLayout( new QVBoxLayout );
QLabel* whatsNewTitle = new QLabel( QString( "<h1>%1</h1>").arg( tr( "QGIS News" ) ) );
@@ -17,7 +17,8 @@

#include <QPixmap>

QgsWelcomePageItemsModel::QgsWelcomePageItemsModel()
QgsWelcomePageItemsModel::QgsWelcomePageItemsModel(QObject* parent)
: QAbstractListModel( parent )
{

}
@@ -31,7 +31,7 @@ class QgsWelcomePageItemsModel : public QAbstractListModel
QString previewImagePath;
};

QgsWelcomePageItemsModel();
QgsWelcomePageItemsModel( QObject* parent = 0 );

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

0 comments on commit 9bce9ed

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