Commit d97413b5 authored by Laurent Montel's avatar Laurent Montel 😁

Astyle kdelibs

parent f45a073f
......@@ -66,8 +66,9 @@ void PrintConfigureWidget::slotSelectPrintLayout()
qCDebug(WEBENGINEVIEWER_LOG) << "Print Setup unsupported";
}
QPageSetupDialog dlg(&printer, this);
if (dlg.exec() != QDialog::Accepted)
if (dlg.exec() != QDialog::Accepted) {
return;
}
mCurrentPageLayout = printer.pageLayout();
updatePageLayoutLabel();
}
......@@ -80,8 +81,8 @@ QPageLayout PrintConfigureWidget::currentPageLayout() const
void PrintConfigureWidget::updatePageLayoutLabel()
{
mPrintLayoutLabel->setText(i18n("Print Layout: %1, %2",
mCurrentPageLayout.pageSize().name(),
mCurrentPageLayout.orientation() == QPageLayout::Portrait
? i18n("Portrait") : i18n("Landscape")));
mCurrentPageLayout.pageSize().name(),
mCurrentPageLayout.orientation() == QPageLayout::Portrait
? i18n("Portrait") : i18n("Landscape")));
}
......@@ -80,8 +80,9 @@ void PrintWebEngineViewJob::start()
void PrintWebEngineViewJob::slotHandlePdfPrinted(const QByteArray &result)
{
if (result.isEmpty())
if (result.isEmpty()) {
return;
}
QFile file(mTemporaryFile.fileName());
if (!file.open(QFile::WriteOnly)) {
......
......@@ -37,7 +37,6 @@ public:
QWebEngineView *engineView() const;
void setEngineView(QWebEngineView *engineView);
void setPageLayout(const QPageLayout &pageLayout);
QPageLayout pageLayout() const;
......
......@@ -15,13 +15,11 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "printwebenginetest_gui.h"
#include "../printwebengineviewjob.h"
#include "../printconfiguredialog.h"
#include "../printpreviewdialog.h"
#include <QApplication>
#include <QStandardPaths>
#include <QVBoxLayout>
......
......@@ -15,7 +15,6 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef PRINTWEBENGINETEST_GUI_H
#define PRINTWEBENGINETEST_GUI_H
......@@ -29,7 +28,7 @@ public:
~PrintWebEngineTest_Gui();
private Q_SLOTS:
void slotPrint();
void slotPrint();
void slotPdfFailed();
void slotPdfCreated(const QString &filename);
private:
......
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