Delete tmpfile on all failures
This commit is contained in:
parent
86b580c15f
commit
d6ef26b64e
1 changed files with 3 additions and 0 deletions
|
@ -93,6 +93,7 @@ void ConvertWorker::convertPdf(QNetworkRequest request, QString filename, QTempo
|
|||
}
|
||||
else
|
||||
{
|
||||
tempfile->deleteLater();
|
||||
emit failed(tr("Unsupported target format"));
|
||||
return;
|
||||
}
|
||||
|
@ -344,6 +345,7 @@ void ConvertWorker::convertImage(QNetworkRequest request, QString filename, QTem
|
|||
}
|
||||
else
|
||||
{
|
||||
tempfile->deleteLater();
|
||||
emit failed(tr("Unsupported target format"));
|
||||
return;
|
||||
}
|
||||
|
@ -373,6 +375,7 @@ void ConvertWorker::convertImage(QNetworkRequest request, QString filename, QTem
|
|||
if(!inImage.load(filename))
|
||||
{
|
||||
qDebug() << "failed to load";
|
||||
tempfile->deleteLater();
|
||||
emit failed(tr("Failed to load image"));
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue