From 5e89420482da4f24ca4b0555562a9160cf259de4 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 15 Mar 2022 06:49:17 +0100 Subject: [PATCH] Use KWindowStateSaver directly --- src/ksieveui/editor/sieveeditortextmodewidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ksieveui/editor/sieveeditortextmodewidget.cpp b/src/ksieveui/editor/sieveeditortextmodewidget.cpp index 7d7c385d..a9857d54 100644 --- a/src/ksieveui/editor/sieveeditortextmodewidget.cpp +++ b/src/ksieveui/editor/sieveeditortextmodewidget.cpp @@ -33,10 +33,11 @@ #include #include #include +#include -#include #include #include +#include #include #include #include @@ -442,7 +443,8 @@ void SieveEditorTextModeWidget::printPreview() if (w == mEditorWidget) { bool restoreSpellCheck = mTextEdit->checkSpellingEnabled(); mTextEdit->setCheckSpellingEnabled(false); - QPointer previewdlg = new PimCommon::KPimPrintPreviewDialog(this); + QPointer previewdlg = new QPrintPreviewDialog(this); + new KWindowStateSaver(previewdlg.data(), "SieveEditorPrintPreviewDialog"); connect(previewdlg.data(), &QPrintPreviewDialog::paintRequested, this, [this](QPrinter *printer) { mTextEdit->print(printer); }); -- GitLab