Commit 01f23849 authored by Edric Milaret's avatar Edric Milaret Committed by Guillaume Roguez

fix some memory leaks

Refs #76119

Change-Id: I516d471ec23deeb4bde8eb87bea03f83a7e1a55e
parent 5927d04a
......@@ -32,8 +32,6 @@
#include "wizarddialog.h"
#include "windowscontactbackend.h"
#include "historydelegate.h"
#include "contactdelegate.h"
CallWidget::CallWidget(QWidget *parent) :
NavWidget(Main ,parent),
......@@ -92,7 +90,8 @@ CallWidget::CallWidget(QWidget *parent) :
ui->historyList->setModel(CategorizedHistoryModel::SortedProxy::instance()->model());
CategorizedHistoryModel::SortedProxy::instance()->model()->sort(0, Qt::DescendingOrder);
ui->historyList->setHeaderHidden(true);
ui->historyList->setItemDelegate(new HistoryDelegate());
historyDelegate_ = new HistoryDelegate();
ui->historyList->setItemDelegate(historyDelegate_);
auto idx = CategorizedHistoryModel::SortedProxy::instance()->model()->index(0,0);
if (idx.isValid())
ui->historyList->setExpanded(idx, true);
......@@ -101,7 +100,8 @@ CallWidget::CallWidget(QWidget *parent) :
CategorizedContactModel::instance()->setSortAlphabetical(false);
ui->contactView->setModel(CategorizedContactModel::instance());
ui->contactView->setItemDelegate(new ContactDelegate());
contactDelegate_ = new ContactDelegate();
ui->contactView->setItemDelegate(contactDelegate_);
findRingAccount();
......@@ -115,6 +115,8 @@ CallWidget::~CallWidget()
delete ui;
delete spinner_;
delete menu_;
delete historyDelegate_;
delete contactDelegate_;
}
void
......
......@@ -28,6 +28,8 @@
#include "navwidget.h"
#include "instantmessagingwidget.h"
#include "historydelegate.h"
#include "contactdelegate.h"
#include "callmodel.h"
#include "video/renderer.h"
......@@ -73,6 +75,9 @@ private:
int inputVolume_;
QMenu *menu_;
QMovie *spinner_;
HistoryDelegate *historyDelegate_;
ContactDelegate *contactDelegate_;
private:
void findRingAccount();
void setActualCall(Call *value);
......
......@@ -28,7 +28,6 @@
#include "video/previewmanager.h"
#include "accountserializationadapter.h"
#include "accountstatedelegate.h"
#include "accountmodel.h"
#include "protocolmodel.h"
......@@ -49,7 +48,8 @@ ConfigurationWidget::ConfigurationWidget(QWidget *parent) :
ui->setupUi(this);
ui->accountView->setModel(accountModel_);
ui->accountView->setItemDelegate(new AccountStateDelegate());
accountStateDelegate_ = new AccountStateDelegate();
ui->accountView->setItemDelegate(accountStateDelegate_);
isLoading_ = true;
ui->deviceBox->setModel(deviceModel_);
......@@ -81,6 +81,7 @@ void ConfigurationWidget::atExit() {
ConfigurationWidget::~ConfigurationWidget()
{
delete ui;
delete accountStateDelegate_;
}
void
......
......@@ -24,6 +24,7 @@
#include "navwidget.h"
#include "accountdetails.h"
#include "accountstatedelegate.h"
#include "accountmodel.h"
#include "video/devicemodel.h"
......@@ -68,6 +69,7 @@ private:
CodecModel* codecModel_;
bool isLoading_;
AccountDetails* accountDetails_;
AccountStateDelegate *accountStateDelegate_;
};
#endif // CONFIGURATIONWIDGET_H
......@@ -51,6 +51,7 @@ MainWindow::MainWindow(QWidget *parent) :
MainWindow::~MainWindow()
{
delete ui;
delete navStack_;
}
void
......
......@@ -42,7 +42,11 @@ NavStack::NavStack(QStackedWidget* bar, QStackedWidget* stack, QWidget *parent)
}
NavStack::~NavStack()
{}
{
for (int i = 0; i < END; i++) {
delete navList_[i];
}
}
void
NavStack::onNavigationRequested(ScreenEnum screen) {
......
......@@ -70,6 +70,9 @@ VideoView::VideoView(QWidget *parent) :
VideoView::~VideoView()
{
delete ui;
delete overlay_;
delete timerLength_;
delete fadeAnim_;
}
void
......
......@@ -48,6 +48,9 @@ WizardDialog::WizardDialog(QWidget *parent) :
WizardDialog::~WizardDialog()
{
if (ui->spinnerLabel->movie()) {
delete ui->spinnerLabel->movie();
}
delete ui;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment