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 <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>bb10
parent
24ef5d2263
commit
8f5dceee3c
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue