From 63285e3e1bcd2685a387d7fc2b18524895507ac4 Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Fri, 13 Mar 2015 07:44:13 +0200 Subject: [PATCH] Fix page size selection in QPageSetupDialog Task-number: QTBUG-44978 Change-Id: Id0c0188d62e344fad93d9bbf57b3f90ce899405d Reviewed-by: Friedemann Kleint Reviewed-by: Andy Shaw --- src/printsupport/dialogs/qpagesetupdialog_unix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp index 9fde8aeedc..7748a8af01 100644 --- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp +++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp @@ -353,10 +353,10 @@ void QPageSetupWidget::initPageSizes() // If PdfFormat or no available printer page sizes, populate with all page sizes for (int id = 0; id < QPageSize::LastPageSize; ++id) { if (QPageSize::PageSizeId(id) == QPageSize::Custom) { - m_ui.pageSizeCombo->addItem(tr("Custom"), id); + m_ui.pageSizeCombo->addItem(tr("Custom"), QVariant::fromValue(QPageSize::Custom)); } else { QPageSize pageSize = QPageSize(QPageSize::PageSizeId(id)); - m_ui.pageSizeCombo->addItem(pageSize.name(), id); + m_ui.pageSizeCombo->addItem(pageSize.name(), QVariant::fromValue(pageSize.id())); } }