Encryption tool

This commit is contained in:
Jakub Melka
2021-06-01 16:09:00 +02:00
parent 453a3a24c7
commit c22cba2f50
12 changed files with 320 additions and 13 deletions

View File

@ -21,6 +21,8 @@
#include "pdfutils.h"
#include "pdfsecurityhandler.h"
#include <QMessageBox>
namespace pdfviewer
{
@ -191,6 +193,13 @@ void PDFEncryptionSettingsDialog::accept()
}
}
QString errorMessage;
if (!pdf::PDFSecurityHandlerFactory::validate(settings, &errorMessage))
{
QMessageBox::critical(this, tr("Error"), errorMessage);
return;
}
m_updatedSecurityHandler = pdf::PDFSecurityHandlerFactory::createSecurityHandler(settings);
QDialog::accept();