From 5cb54cb5ebae99fab121061e25e26eec3056203a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 12 Dec 2017 12:44:02 +0100 Subject: QPlatformPrintDevice: use QVector, not QList in the API QPlaformPrintDevice uses QVector to store, but QList in the getters to retrieve these data. Port API from QList to QVector to avoid conversion between the two containers on every access. Saves almost 4KiB in text size (another 0.9% of QtPrintSupport). Change-Id: If33df141b87753803c45d9f4dae501a68abe49af Reviewed-by: Lars Knoll --- src/printsupport/kernel/qplatformprintdevice.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/printsupport/kernel/qplatformprintdevice.cpp') diff --git a/src/printsupport/kernel/qplatformprintdevice.cpp b/src/printsupport/kernel/qplatformprintdevice.cpp index 82bddedb1b..2f76156a91 100644 --- a/src/printsupport/kernel/qplatformprintdevice.cpp +++ b/src/printsupport/kernel/qplatformprintdevice.cpp @@ -313,11 +313,11 @@ QPrint::InputSlot QPlatformPrintDevice::defaultInputSlot() const return input; } -QList QPlatformPrintDevice::supportedInputSlots() const +QVector QPlatformPrintDevice::supportedInputSlots() const { if (!m_haveInputSlots) loadInputSlots(); - return m_inputSlots.toList(); + return m_inputSlots; } void QPlatformPrintDevice::loadOutputBins() const @@ -337,11 +337,11 @@ QPrint::OutputBin QPlatformPrintDevice::defaultOutputBin() const return output; } -QList QPlatformPrintDevice::supportedOutputBins() const +QVector QPlatformPrintDevice::supportedOutputBins() const { if (!m_haveOutputBins) loadOutputBins(); - return m_outputBins.toList(); + return m_outputBins; } void QPlatformPrintDevice::loadDuplexModes() const @@ -353,11 +353,11 @@ QPrint::DuplexMode QPlatformPrintDevice::defaultDuplexMode() const return QPrint::DuplexNone; } -QList QPlatformPrintDevice::supportedDuplexModes() const +QVector QPlatformPrintDevice::supportedDuplexModes() const { if (!m_haveDuplexModes) loadDuplexModes(); - return m_duplexModes.toList(); + return m_duplexModes; } void QPlatformPrintDevice::loadColorModes() const @@ -369,11 +369,11 @@ QPrint::ColorMode QPlatformPrintDevice::defaultColorMode() const return QPrint::GrayScale; } -QList QPlatformPrintDevice::supportedColorModes() const +QVector QPlatformPrintDevice::supportedColorModes() const { if (!m_haveColorModes) loadColorModes(); - return m_colorModes.toList(); + return m_colorModes; } #ifndef QT_NO_MIMETYPE -- cgit v1.2.3