less memory allocation at delete picture
This commit is contained in:
parent
2c6a0fa2a5
commit
4922ce7173
2 changed files with 1 additions and 3 deletions
|
@ -136,7 +136,6 @@ bool SnapmaticPicture::readingPicture()
|
||||||
picFile->deleteLater();
|
picFile->deleteLater();
|
||||||
delete picFile;
|
delete picFile;
|
||||||
return picOk;
|
return picOk;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString SnapmaticPicture::getSnapmaticPictureString(QByteArray snapmaticHeader)
|
QString SnapmaticPicture::getSnapmaticPictureString(QByteArray snapmaticHeader)
|
||||||
|
|
|
@ -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);
|
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)
|
if (uchoice == QMessageBox::Yes)
|
||||||
{
|
{
|
||||||
QFile pictureFile(picPath);
|
if (!QFile::exists(picPath))
|
||||||
if (!pictureFile.exists())
|
|
||||||
{
|
{
|
||||||
emit pictureDeleted();
|
emit pictureDeleted();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue