summaryrefslogtreecommitdiffstats
path: root/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2018-02-05 09:20:20 +0100
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2018-04-04 16:56:36 +0000
commit84cc8d0badb4abc3c9a96d59c61dddce916a216c (patch)
tree67212f2b15e3e4b4a92a5d53325dfbcdef9609e8 /src/printsupport/dialogs/qpagesetupdialog_unix.cpp
parent40a15ecaad98ec7538b4d4b8099d4d9c1061b3b8 (diff)
cups: Support raw printers
They don't have a ppd but we don't *really* need a ppd to just print Change-Id: Idf6b6dafc19420a511b057194488e2170cae4d70 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/printsupport/dialogs/qpagesetupdialog_unix.cpp')
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
index 177e220c89..d9b4a84aa9 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
@@ -424,6 +424,12 @@ void QPageSetupWidget::setPrinter(QPrinter *printer, QPrintDevice *printDevice,
initPageSizes();
updateWidget();
updateSavedValues();
+
+ if (m_ui.pageSizeCombo->currentIndex() == -1) {
+ // This can happen in raw printers that since they don't have a default
+ // page size none will get selected so just default to the first size (A4)
+ m_ui.pageSizeCombo->setCurrentIndex(0);
+ }
}
// Update the widget with the current settings