From 8f5dceee3c0639de937474a2237e5ca82a52def5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Tue, 16 Jun 2015 19:44:52 +0100 Subject: qprinter: Remove superfluous iteration and memory allocation Instead of iterating through a QList that was constructed after iterating through all of QSet's elements just iterate through QSet's elements. Change-Id: Ie502017976536b14ea9170af550a2d7156443391 Reviewed-by: Marc Mutz Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/printsupport/kernel/qprinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/printsupport/kernel/qprinter.cpp') diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp index a106a58502..44d3384d64 100644 --- a/src/printsupport/kernel/qprinter.cpp +++ b/src/printsupport/kernel/qprinter.cpp @@ -160,7 +160,7 @@ void QPrinterPrivate::changeEngines(QPrinter::OutputFormat format, const QPrinte initEngines(format, printer); if (oldPrintEngine) { - foreach (QPrintEngine::PrintEnginePropertyKey key, m_properties.values()) { + foreach (QPrintEngine::PrintEnginePropertyKey key, m_properties) { QVariant prop; // PPK_NumberOfCopies need special treatmeant since it in most cases // will return 1, disregarding the actual value that was set -- cgit v1.2.3