Commit 84b568e1 authored by Laurent Montel's avatar Laurent Montel 😁

Warn about impossible to open temporary file

parent 0b6dd107
......@@ -17,6 +17,7 @@
#include "printwebengineviewjob.h"
#include <QWebEngineView>
#include <QDebug>
using namespace WebEngineViewer;
......@@ -79,12 +80,12 @@ void PrintWebEngineViewJob::start()
void PrintWebEngineViewJob::slotHandlePdfPrinted(const QByteArray &result)
{
if (!result.size())
if (result.isEmpty())
return;
QFile file(mTemporaryFile.fileName());
if (!file.open(QFile::WriteOnly)) {
//TODO warning.
qDebug() << "unable to open temporary file";
unableToPrint();
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment