clean RAM after use profile, button focus fixed

This commit is contained in:
Rafael 2016-03-27 13:19:50 +02:00
parent 6e165de9e2
commit fc37a5963c
7 changed files with 72 additions and 10 deletions

View file

@ -40,6 +40,14 @@ ProfileInterface::ProfileInterface(ProfileDatabase *profileDB, CrewDatabase *cre
ProfileInterface::~ProfileInterface()
{
foreach(SavegameData *savegame, savegames)
{
delete savegame;
}
foreach(SnapmaticPicture *picture, pictures)
{
delete picture;
}
delete ui;
}
@ -64,6 +72,7 @@ void ProfileInterface::on_savegameLoaded(SavegameData *savegame, QString savegam
SavegameWidget *sgdWidget = new SavegameWidget();
sgdWidget->setSavegameData(savegame, savegamePath);
ui->vlSavegame->addWidget(sgdWidget);
savegames.append(savegame);
}
void ProfileInterface::on_pictureLoaded(SnapmaticPicture *picture, QString picturePath)
@ -71,6 +80,7 @@ void ProfileInterface::on_pictureLoaded(SnapmaticPicture *picture, QString pictu
SnapmaticWidget *picWidget = new SnapmaticWidget(profileDB);
picWidget->setSnapmaticPicture(picture, picturePath);
ui->vlSnapmatic->addWidget(picWidget);
pictures.append(picture);
}
void ProfileInterface::on_loadingProgress(int value, int maximum)
@ -90,5 +100,5 @@ void ProfileInterface::on_profileLoaded()
void ProfileInterface::on_cmdCloseProfile_clicked()
{
this->close();
emit profileClosed();
}