Commit 32878677 authored by Volker Krause's avatar Volker Krause
Browse files

Use KWindowStateSaver for the print preview dialog

This obsoletes KPimPrintPreviewDialog, and even allows us to remove the
dependency to pimcommon here.
parent 1b92e2e5
Pipeline #150301 passed with stage
in 1 minute and 40 seconds
......@@ -14,5 +14,4 @@ Dependencies:
'pim/kidentitymanagement' : '@same'
'pim/kimap' : '@same'
'pim/kmime' : '@same'
'pim/pimcommon' : '@same'
'pim/akonadi-notes' : '@same'
......@@ -43,7 +43,6 @@ set(KMIME_LIB_VERSION "5.19.80")
set(CALENDARUTILS_LIB_VERSION "5.19.80")
set(IDENTITYMANAGEMENT_LIB_VERSION "5.19.80")
set(AKONADICALENDAR_LIB_VERSION "5.19.80")
set(PIMCOMMON_LIB_VERSION "5.19.80")
set(AKONADI_VERSION "5.19.80")
set(AKONADI_NOTES_VERSION "5.19.80")
find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
......@@ -59,7 +58,6 @@ find_package(KF5CalendarCore ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5IdentityManagement ${IDENTITYMANAGEMENT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Holidays ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiCalendar ${AKONADICALENDAR_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiNotes ${AKONADI_NOTES_VERSION} CONFIG REQUIRED)
ecm_setup_version(PROJECT VARIABLE_PREFIX CALENDARSUPPORT
......
......@@ -116,7 +116,6 @@ PRIVATE
KF5::AkonadiCore
KF5::CalendarCore
KF5::CalendarUtils
KF5::PimCommon
)
set_target_properties(KF5CalendarSupport PROPERTIES
......
......@@ -10,11 +10,11 @@
#include "journalprint.h"
#include "yearprint.h"
#include <KConfigGroup>
#include <KMessageBox>
#include <KStandardGuiItem>
#include <QVBoxLayout>
#include <KWindowStateSaver>
#include <KConfigGroup>
#include <QButtonGroup>
#include <QDialogButtonBox>
#include <QGridLayout>
......@@ -23,8 +23,7 @@
#include <QPrintPreviewDialog>
#include <QSplitter>
#include <QStackedWidget>
#include <PimCommon/KPimPrintPreviewDialog>
#include <QVBoxLayout>
using namespace CalendarSupport;
......@@ -132,7 +131,8 @@ void CalPrinter::doPrint(PrintPlugin *selectedStyle, CalPrinter::ePrintOrientati
}
if (preview) {
QPointer<PimCommon::KPimPrintPreviewDialog> printPreview = new PimCommon::KPimPrintPreviewDialog(&printer);
QPointer<QPrintPreviewDialog> printPreview = new QPrintPreviewDialog(&printer);
new KWindowStateSaver(printPreview.data(), "CalendarPrintPreviewDialog");
connect(printPreview.data(), &QPrintPreviewDialog::paintRequested, this, [selectedStyle, &printer]() {
selectedStyle->doPrint(&printer);
});
......
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