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
|
else
|
||||||
{
|
{
|
||||||
|
tempfile->deleteLater();
|
||||||
emit failed(tr("Unsupported target format"));
|
emit failed(tr("Unsupported target format"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -344,6 +345,7 @@ void ConvertWorker::convertImage(QNetworkRequest request, QString filename, QTem
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
tempfile->deleteLater();
|
||||||
emit failed(tr("Unsupported target format"));
|
emit failed(tr("Unsupported target format"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -373,6 +375,7 @@ void ConvertWorker::convertImage(QNetworkRequest request, QString filename, QTem
|
||||||
if(!inImage.load(filename))
|
if(!inImage.load(filename))
|
||||||
{
|
{
|
||||||
qDebug() << "failed to load";
|
qDebug() << "failed to load";
|
||||||
|
tempfile->deleteLater();
|
||||||
emit failed(tr("Failed to load image"));
|
emit failed(tr("Failed to load image"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue