mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Encryption tool
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user