summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qplatformprintdevice.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-12-12 12:44:02 +0100
committerMarc Mutz <marc.mutz@kdab.com>2017-12-14 13:35:35 +0000
commit5cb54cb5ebae99fab121061e25e26eec3056203a (patch)
tree1c4986646398d99ce6b41feed9b4936662658260 /src/printsupport/kernel/qplatformprintdevice.cpp
parent2356c173b2952f6ab6767abac12a21688324fcc5 (diff)
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 <lars.knoll@qt.io>
Diffstat (limited to 'src/printsupport/kernel/qplatformprintdevice.cpp')
-rw-r--r--src/printsupport/kernel/qplatformprintdevice.cpp16
1 files changed, 8 insertions, 8 deletions
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<QPrint::InputSlot> QPlatformPrintDevice::supportedInputSlots() const
+QVector<QPrint::InputSlot> 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<QPrint::OutputBin> QPlatformPrintDevice::supportedOutputBins() const
+QVector<QPrint::OutputBin> 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<QPrint::DuplexMode> QPlatformPrintDevice::supportedDuplexModes() const
+QVector<QPrint::DuplexMode> 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<QPrint::ColorMode> QPlatformPrintDevice::supportedColorModes() const
+QVector<QPrint::ColorMode> QPlatformPrintDevice::supportedColorModes() const
{
if (!m_haveColorModes)
loadColorModes();
- return m_colorModes.toList();
+ return m_colorModes;
}
#ifndef QT_NO_MIMETYPE