diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-06-16 19:44:52 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2015-06-19 16:25:14 +0000 |
commit | 8f5dceee3c0639de937474a2237e5ca82a52def5 (patch) | |
tree | 2cd329eac59afb8870f0cfcc18e25ee65bfc060b /src/printsupport/kernel | |
parent | 24ef5d2263a11428cd9db83da1d8d9cb3534bc9f (diff) |
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>
Diffstat (limited to 'src/printsupport/kernel')
-rw-r--r-- | src/printsupport/kernel/qprinter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 |