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();
|
||||
delete picFile;
|
||||
return picOk;
|
||||
|
||||
}
|
||||
|
||||
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);
|
||||
if (uchoice == QMessageBox::Yes)
|
||||
{
|
||||
QFile pictureFile(picPath);
|
||||
if (!pictureFile.exists())
|
||||
if (!QFile::exists(picPath))
|
||||
{
|
||||
emit pictureDeleted();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue