diff --git a/SnapmaticPicture.cpp b/SnapmaticPicture.cpp index 6954d6d..26c7cd5 100755 --- a/SnapmaticPicture.cpp +++ b/SnapmaticPicture.cpp @@ -136,7 +136,6 @@ bool SnapmaticPicture::readingPicture() picFile->deleteLater(); delete picFile; return picOk; - } QString SnapmaticPicture::getSnapmaticPictureString(QByteArray snapmaticHeader) diff --git a/SnapmaticWidget.cpp b/SnapmaticWidget.cpp index 460873e..75a760f 100755 --- a/SnapmaticWidget.cpp +++ b/SnapmaticWidget.cpp @@ -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(); }