summaryrefslogtreecommitdiffstats
path: root/src/printsupport/dialogs
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-12-23 00:15:30 +0100
committerMarc Mutz <marc.mutz@kdab.com>2015-12-23 09:38:38 +0000
commitb78097b22d11a7279551709b28ef49d403407449 (patch)
treedf23177fb98e02da88b8be66293e0f8856f38a15 /src/printsupport/dialogs
parent2d4295f16761a0e47b5218bbb1db5c14d16ce4fe (diff)
QtPrintSupport: eradicate all Q_FOREACH loops
Saves more than 2KiB in text size on optimized GCC 4.9 Linux AMD64 builds, iow: ~0.5% of the total library size. Change-Id: I84e1dc208da13eefdf1573c9b7ac7c9d76a7f5c7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/printsupport/dialogs')
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
index 7748a8af01..f94f049680 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
@@ -339,9 +339,9 @@ void QPageSetupWidget::initPageSizes()
QPlatformPrinterSupport *ps = QPlatformPrinterSupportPlugin::get();
if (ps) {
QPrintDevice printDevice = ps->createPrintDevice(m_printerName);
- foreach (const QPageSize &pageSize, printDevice.supportedPageSizes()) {
+ const auto pageSizes = printDevice.supportedPageSizes();
+ for (const QPageSize &pageSize : pageSizes)
m_ui.pageSizeCombo->addItem(pageSize.name(), QVariant::fromValue(pageSize.id()));
- }
if (m_ui.pageSizeCombo->count() > 0 && printDevice.supportsCustomPageSizes()) {
m_ui.pageSizeCombo->addItem(tr("Custom"), QVariant::fromValue(QPageSize::Custom));
m_blockSignals = false;