Commit c2d9397b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove this code

parent 757437d2
......@@ -42,11 +42,6 @@
#include <WebEngineViewer/WebEnginePrintMessageBox>
#include <KContacts/VCardConverter>
#include <webengineviewer/config-webengineviewer.h>
#ifdef WEBENGINEVIEWER_PRINTPREVIEW_SUPPORT
#include <WebEngineViewer/PrintPreviewDialog>
#include <WebEngineViewer/PrintWebEngineViewJob>
#include <WebEngineViewer/PrintConfigureDialog>
#endif
#ifdef MESSAGEVIEWER_READER_HTML_DEBUG
#include <MimeMessagePart/FileHtmlWriter>
#include "htmlwriter/teehtmlwriter.h"
......@@ -2215,7 +2210,6 @@ void ViewerPrivate::slotPrintPreview()
}
QPointer<WebEngineViewer::WebEnginePrintMessageBox> dialog = new WebEngineViewer::WebEnginePrintMessageBox(q);
connect(dialog.data(), &WebEngineViewer::WebEnginePrintMessageBox::openInBrowser, this, &ViewerPrivate::slotOpenInBrowser);
connect(dialog.data(), &WebEngineViewer::WebEnginePrintMessageBox::openPrintPreview, this, &ViewerPrivate::slotOpenPrintPreviewDialog);
dialog->exec();
delete dialog;
}
......@@ -2240,39 +2234,6 @@ void ViewerPrivate::slotExportHtmlPageFailed()
qCDebug(MESSAGEVIEWER_LOG) << " Export HTML failed";
}
void ViewerPrivate::slotOpenPrintPreviewDialog()
{
#ifdef WEBENGINEVIEWER_PRINTPREVIEW_SUPPORT
QPointer<WebEngineViewer::PrintConfigureDialog> dlg = new WebEngineViewer::PrintConfigureDialog(q);
if (dlg->exec()) {
const QPageLayout pageLayout = dlg->currentPageLayout();
WebEngineViewer::PrintWebEngineViewJob *job = new WebEngineViewer::PrintWebEngineViewJob(q);
job->setEngineView(mViewer);
job->setPageLayout(pageLayout);
connect(job, &WebEngineViewer::PrintWebEngineViewJob::failed, this, &ViewerPrivate::slotPdfFailed);
connect(job, &WebEngineViewer::PrintWebEngineViewJob::success, this, &ViewerPrivate::slotPdfCreated);
job->start();
}
delete dlg;
#endif
}
void ViewerPrivate::slotPdfCreated(const QString &filename)
{
#ifdef WEBENGINEVIEWER_PRINTPREVIEW_SUPPORT
WebEngineViewer::PrintPreviewDialog dlg(q);
dlg.loadFile(filename, true);
dlg.exec();
#else
Q_UNUSED(filename);
#endif
}
void ViewerPrivate::slotPdfFailed()
{
qCDebug(MESSAGEVIEWER_LOG) << "Print to pdf Failed";
}
void ViewerPrivate::slotPrintMessage()
{
disconnect(mPartHtmlWriter.data(), &WebEnginePartHtmlWriter::finished, this, &ViewerPrivate::slotPrintMessage);
......
......@@ -460,10 +460,7 @@ private Q_SLOTS:
void slotStyleChanged(MessageViewer::HeaderStylePlugin *plugin);
void slotStyleUpdated();
void slotWheelZoomChanged(int numSteps);
void slotOpenPrintPreviewDialog();
void slotOpenInBrowser();
void slotPdfCreated(const QString &filename);
void slotPdfFailed();
void slotExportHtmlPageFailed();
void slotExportHtmlPageSuccess(const QString &filename);
public Q_SLOTS:
......
......@@ -84,7 +84,6 @@ target_link_libraries(KF5WebEngineViewer
KF5::PimCommon
KF5::WidgetsAddons
KF5::ConfigCore
${poppler_lib}
)
set_target_properties(KF5WebEngineViewer PROPERTIES
......
Supports Markdown
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