summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-05-13 14:08:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-23 22:18:41 +0200
commit9a2dbcab7e820c63aac55ba08dc120a56986efac (patch)
treee99a450b0fbb7282fc6ec8c8d1d1a186a515a6bd /tests/manual
parentd3d8ade87b74c541cc3baa67b9972d6471864c25 (diff)
QPrinter/Windows: Fix handling of native paper source ids.
On Windows, it is possible to pass native Windows paper source ids >= DMBIN_USER to QPrinter::setPaperSource() and they are listed by supportedPaperSources(). Task-number: QTBUG-38897 Task-number: QTBUG-38888 Change-Id: I8f1264e80ce5bdddd3873602200b24eabee00502 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/dialogs/printdialogpanel.cpp11
-rw-r--r--tests/manual/dialogs/printdialogpanel.ui18
2 files changed, 24 insertions, 5 deletions
diff --git a/tests/manual/dialogs/printdialogpanel.cpp b/tests/manual/dialogs/printdialogpanel.cpp
index 1a18f94406..e316486fcf 100644
--- a/tests/manual/dialogs/printdialogpanel.cpp
+++ b/tests/manual/dialogs/printdialogpanel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the test suite of the Qt Toolkit.
@@ -474,6 +474,15 @@ void PrintDialogPanel::retrieveSettings(const QPrinter *printer)
setComboBoxValue(m_panel.m_colorModeCombo, printer->colorMode());
m_panel.m_resolution->setValue(printer->resolution());
+#ifdef Q_OS_WIN
+ QString availPaperSources;
+ foreach (QPrinter::PaperSource ps, printer->supportedPaperSources())
+ availPaperSources += QString::number(int(ps)) + QLatin1Char(' ');
+ m_panel.availPaperSourceLabel->setText(availPaperSources);
+#else
+ m_panel.availPaperSourceLabel->setText(QLatin1String("N/A"));
+#endif
+
#if QT_VERSION >= 0x050300
m_pageLayout = printer->pageLayout();
#else
diff --git a/tests/manual/dialogs/printdialogpanel.ui b/tests/manual/dialogs/printdialogpanel.ui
index 2f0fe606a3..f4bab6fd9a 100644
--- a/tests/manual/dialogs/printdialogpanel.ui
+++ b/tests/manual/dialogs/printdialogpanel.ui
@@ -527,24 +527,24 @@
<item row="7" column="1">
<widget class="QComboBox" name="m_paperSourceCombo"/>
</item>
- <item row="8" column="0">
+ <item row="9" column="0">
<widget class="QLabel" name="label_23">
<property name="text">
<string>Color Mode:</string>
</property>
</widget>
</item>
- <item row="8" column="1">
+ <item row="9" column="1">
<widget class="QComboBox" name="m_colorModeCombo"/>
</item>
- <item row="9" column="0">
+ <item row="10" column="0">
<widget class="QLabel" name="label_28">
<property name="text">
<string>Resolution:</string>
</property>
</widget>
</item>
- <item row="9" column="1">
+ <item row="10" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QSpinBox" name="m_resolution">
@@ -584,6 +584,16 @@
<item row="4" column="1">
<widget class="QComboBox" name="m_pageOrderCombo"/>
</item>
+ <item row="8" column="0">
+ <widget class="QLabel" name="availPaperSourceDescLabel">
+ <property name="text">
+ <string>Available Paper Sources:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="1">
+ <widget class="QLabel" name="availPaperSourceLabel"/>
+ </item>
</layout>
</widget>
</item>