summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2017-12-27 11:12:19 +0100
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2018-01-12 12:04:35 +0000
commitd94ccf310a9ca01593750a34f743ec652f6a344e (patch)
tree433bb5afded8f1ab5c9070f0062a98fd879e318a /src/printsupport/kernel
parent114f7952217c9cbe7d0054bdcbef775a5923e4a0 (diff)
Unix: Fix usability of the print properties dialog
Previous behavior: * Open, change setting, cancel, open again, setting was as originally (i.e. unchanged) * Open, change setting, accept, open, change setting, cancel, open again, the setting would be as before pressing cancel * Open, change setting, accept, open, press cancel without changing anything, print, the initially changed setting is not applied New behavior: * Pressing cancel just cancels the changes since you opened the dialog, everything you accepted previously stays correctly selected Change-Id: I483647504682f26d3d21c5229cc6530bf14fe519 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/printsupport/kernel')
-rw-r--r--src/printsupport/kernel/qcups_p.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/printsupport/kernel/qcups_p.h b/src/printsupport/kernel/qcups_p.h
index afddfdbf22..4b27632a60 100644
--- a/src/printsupport/kernel/qcups_p.h
+++ b/src/printsupport/kernel/qcups_p.h
@@ -145,13 +145,19 @@ public:
struct JobSheets
{
- BannerPage startBannerPage = QCUPSSupport::NoBanner;
- BannerPage endBannerPage = QCUPSSupport::NoBanner;
+ JobSheets(BannerPage s = NoBanner, BannerPage e = NoBanner)
+ : startBannerPage(s), endBannerPage(e) {}
+
+ BannerPage startBannerPage;
+ BannerPage endBannerPage;
};
static JobSheets parseJobSheets(const QString &jobSheets);
struct JobHoldUntilWithTime
{
+ JobHoldUntilWithTime(JobHoldUntil jh = NoHold, const QTime &t = QTime())
+ : jobHold(jh), time(t) {}
+
JobHoldUntil jobHold;
QTime time;
};