less memory allocation at delete picture

This commit is contained in:
Rafael 2016-03-28 15:32:02 +02:00
parent 2c6a0fa2a5
commit 4922ce7173
2 changed files with 1 additions and 3 deletions

View file

@ -136,7 +136,6 @@ bool SnapmaticPicture::readingPicture()
picFile->deleteLater();
delete picFile;
return picOk;
}
QString SnapmaticPicture::getSnapmaticPictureString(QByteArray snapmaticHeader)

View file

@ -75,8 +75,7 @@ void SnapmaticWidget::on_cmdDelete_clicked()
int uchoice = QMessageBox::question(this, tr("Delete picture"), tr("You're sure to delete %1 from your Snapmatic pictures?").arg(picStr), QMessageBox::No | QMessageBox::Yes, QMessageBox::No);
if (uchoice == QMessageBox::Yes)
{
QFile pictureFile(picPath);
if (!pictureFile.exists())
if (!QFile::exists(picPath))
{
emit pictureDeleted();
}