From 0b5823a77372924025fb24bf245839393dbe3f70 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 15 Mar 2022 06:57:48 +0100 Subject: [PATCH] Use KWindowStateSaver directly --- src/mainwidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp index 440f0ff1..1372efa1 100644 --- a/src/mainwidget.cpp +++ b/src/mainwidget.cpp @@ -76,7 +76,7 @@ #include #include -#include +#include #include #include #include @@ -694,7 +694,9 @@ void MainWidget::printPreview() printer.setOutputFormat(QPrinter::PdfFormat); printer.setCollateCopies(true); - QPointer previewdlg = new PimCommon::KPimPrintPreviewDialog(&printer, this); + QPointer previewdlg = new QPrintPreviewDialog(&printer, this); + new KWindowStateSaver(previewdlg.data(), "KAddressBookPrintPreviewDialog"); + KABPrinting::PrintingWizard wizard(&printer, mItemView->selectionModel(), this); wizard.setDefaultAddressBook(currentAddressBook()); connect(previewdlg.data(), &QPrintPreviewDialog::paintRequested, this, [&wizard]() { -- GitLab