Use QList instead of QVector in printsupport
Task-number: QTBUG-84469 Change-Id: I540b5574e358b100a595eb1676b051dfe25cb640 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>bb10
parent
860220bd33
commit
d17f259174
|
|
@ -166,7 +166,7 @@ private:
|
|||
QPrintDevice *m_currentPrintDevice;
|
||||
|
||||
QStringDecoder toUnicode;
|
||||
QVector<QComboBox*> m_advancedOptionsCombos;
|
||||
QList<QComboBox*> m_advancedOptionsCombos;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ public:
|
|||
QRegion m_cliprgn;
|
||||
mutable QRegion m_cachedDirtyRgn;
|
||||
mutable int m_numberOfCachedRects;
|
||||
QVector<QRect> m_dirtyRects;
|
||||
QList<QRect> m_dirtyRects;
|
||||
|
||||
bool m_hasalpha;
|
||||
bool m_alphaPen;
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ QPrint::InputSlot QPlatformPrintDevice::defaultInputSlot() const
|
|||
return input;
|
||||
}
|
||||
|
||||
QVector<QPrint::InputSlot> QPlatformPrintDevice::supportedInputSlots() const
|
||||
QList<QPrint::InputSlot> QPlatformPrintDevice::supportedInputSlots() const
|
||||
{
|
||||
if (!m_haveInputSlots)
|
||||
loadInputSlots();
|
||||
|
|
@ -314,7 +314,7 @@ QPrint::OutputBin QPlatformPrintDevice::defaultOutputBin() const
|
|||
return output;
|
||||
}
|
||||
|
||||
QVector<QPrint::OutputBin> QPlatformPrintDevice::supportedOutputBins() const
|
||||
QList<QPrint::OutputBin> QPlatformPrintDevice::supportedOutputBins() const
|
||||
{
|
||||
if (!m_haveOutputBins)
|
||||
loadOutputBins();
|
||||
|
|
@ -330,7 +330,7 @@ QPrint::DuplexMode QPlatformPrintDevice::defaultDuplexMode() const
|
|||
return QPrint::DuplexNone;
|
||||
}
|
||||
|
||||
QVector<QPrint::DuplexMode> QPlatformPrintDevice::supportedDuplexModes() const
|
||||
QList<QPrint::DuplexMode> QPlatformPrintDevice::supportedDuplexModes() const
|
||||
{
|
||||
if (!m_haveDuplexModes)
|
||||
loadDuplexModes();
|
||||
|
|
@ -346,7 +346,7 @@ QPrint::ColorMode QPlatformPrintDevice::defaultColorMode() const
|
|||
return QPrint::GrayScale;
|
||||
}
|
||||
|
||||
QVector<QPrint::ColorMode> QPlatformPrintDevice::supportedColorModes() const
|
||||
QList<QPrint::ColorMode> QPlatformPrintDevice::supportedColorModes() const
|
||||
{
|
||||
if (!m_haveColorModes)
|
||||
loadColorModes();
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@
|
|||
#include <private/qprint_p.h>
|
||||
#include <private/qprintdevice_p.h>
|
||||
|
||||
#include <QtCore/qlist.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
#include <QtCore/qvector.h>
|
||||
#if QT_CONFIG(mimetype)
|
||||
#include <QtCore/qmimetype.h>
|
||||
#endif
|
||||
|
|
@ -112,16 +112,16 @@ public:
|
|||
virtual QList<int> supportedResolutions() const;
|
||||
|
||||
virtual QPrint::InputSlot defaultInputSlot() const;
|
||||
virtual QVector<QPrint::InputSlot> supportedInputSlots() const;
|
||||
virtual QList<QPrint::InputSlot> supportedInputSlots() const;
|
||||
|
||||
virtual QPrint::OutputBin defaultOutputBin() const;
|
||||
virtual QVector<QPrint::OutputBin> supportedOutputBins() const;
|
||||
virtual QList<QPrint::OutputBin> supportedOutputBins() const;
|
||||
|
||||
virtual QPrint::DuplexMode defaultDuplexMode() const;
|
||||
virtual QVector<QPrint::DuplexMode> supportedDuplexModes() const;
|
||||
virtual QList<QPrint::DuplexMode> supportedDuplexModes() const;
|
||||
|
||||
virtual QPrint::ColorMode defaultColorMode() const;
|
||||
virtual QVector<QPrint::ColorMode> supportedColorModes() const;
|
||||
virtual QList<QPrint::ColorMode> supportedColorModes() const;
|
||||
|
||||
virtual QVariant property(QPrintDevice::PrintDevicePropertyKey key) const;
|
||||
virtual bool setProperty(QPrintDevice::PrintDevicePropertyKey key, const QVariant &value);
|
||||
|
|
@ -169,16 +169,16 @@ protected:
|
|||
mutable QList<int> m_resolutions;
|
||||
|
||||
mutable bool m_haveInputSlots;
|
||||
mutable QVector<QPrint::InputSlot> m_inputSlots;
|
||||
mutable QList<QPrint::InputSlot> m_inputSlots;
|
||||
|
||||
mutable bool m_haveOutputBins;
|
||||
mutable QVector<QPrint::OutputBin> m_outputBins;
|
||||
mutable QList<QPrint::OutputBin> m_outputBins;
|
||||
|
||||
mutable bool m_haveDuplexModes;
|
||||
mutable QVector<QPrint::DuplexMode> m_duplexModes;
|
||||
mutable QList<QPrint::DuplexMode> m_duplexModes;
|
||||
|
||||
mutable bool m_haveColorModes;
|
||||
mutable QVector<QPrint::ColorMode> m_colorModes;
|
||||
mutable QList<QPrint::ColorMode> m_colorModes;
|
||||
|
||||
#if QT_CONFIG(mimetype)
|
||||
mutable bool m_haveMimeTypes;
|
||||
|
|
|
|||
|
|
@ -210,9 +210,9 @@ QPrint::InputSlot QPrintDevice::defaultInputSlot() const
|
|||
return isValid() ? d->defaultInputSlot() : QPrint::InputSlot();
|
||||
}
|
||||
|
||||
QVector<QPrint::InputSlot> QPrintDevice::supportedInputSlots() const
|
||||
QList<QPrint::InputSlot> QPrintDevice::supportedInputSlots() const
|
||||
{
|
||||
return isValid() ? d->supportedInputSlots() : QVector<QPrint::InputSlot>{};
|
||||
return isValid() ? d->supportedInputSlots() : QList<QPrint::InputSlot>{};
|
||||
}
|
||||
|
||||
QPrint::OutputBin QPrintDevice::defaultOutputBin() const
|
||||
|
|
@ -220,9 +220,9 @@ QPrint::OutputBin QPrintDevice::defaultOutputBin() const
|
|||
return isValid() ? d->defaultOutputBin() : QPrint::OutputBin();
|
||||
}
|
||||
|
||||
QVector<QPrint::OutputBin> QPrintDevice::supportedOutputBins() const
|
||||
QList<QPrint::OutputBin> QPrintDevice::supportedOutputBins() const
|
||||
{
|
||||
return isValid() ? d->supportedOutputBins() : QVector<QPrint::OutputBin>{};
|
||||
return isValid() ? d->supportedOutputBins() : QList<QPrint::OutputBin>{};
|
||||
}
|
||||
|
||||
QPrint::DuplexMode QPrintDevice::defaultDuplexMode() const
|
||||
|
|
@ -230,9 +230,9 @@ QPrint::DuplexMode QPrintDevice::defaultDuplexMode() const
|
|||
return isValid() ? d->defaultDuplexMode() : QPrint::DuplexNone;
|
||||
}
|
||||
|
||||
QVector<QPrint::DuplexMode> QPrintDevice::supportedDuplexModes() const
|
||||
QList<QPrint::DuplexMode> QPrintDevice::supportedDuplexModes() const
|
||||
{
|
||||
return isValid() ? d->supportedDuplexModes() : QVector<QPrint::DuplexMode>{};
|
||||
return isValid() ? d->supportedDuplexModes() : QList<QPrint::DuplexMode>{};
|
||||
}
|
||||
|
||||
QPrint::ColorMode QPrintDevice::defaultColorMode() const
|
||||
|
|
@ -240,9 +240,9 @@ QPrint::ColorMode QPrintDevice::defaultColorMode() const
|
|||
return isValid() ? d->defaultColorMode() : QPrint::GrayScale;
|
||||
}
|
||||
|
||||
QVector<QPrint::ColorMode> QPrintDevice::supportedColorModes() const
|
||||
QList<QPrint::ColorMode> QPrintDevice::supportedColorModes() const
|
||||
{
|
||||
return isValid() ? d->supportedColorModes() : QVector<QPrint::ColorMode>{};
|
||||
return isValid() ? d->supportedColorModes() : QList<QPrint::ColorMode>{};
|
||||
}
|
||||
|
||||
QVariant QPrintDevice::property(PrintDevicePropertyKey key) const
|
||||
|
|
|
|||
|
|
@ -118,16 +118,16 @@ public:
|
|||
QList<int> supportedResolutions() const;
|
||||
|
||||
QPrint::InputSlot defaultInputSlot() const;
|
||||
QVector<QPrint::InputSlot> supportedInputSlots() const;
|
||||
QList<QPrint::InputSlot> supportedInputSlots() const;
|
||||
|
||||
QPrint::OutputBin defaultOutputBin() const;
|
||||
QVector<QPrint::OutputBin> supportedOutputBins() const;
|
||||
QList<QPrint::OutputBin> supportedOutputBins() const;
|
||||
|
||||
QPrint::DuplexMode defaultDuplexMode() const;
|
||||
QVector<QPrint::DuplexMode> supportedDuplexModes() const;
|
||||
QList<QPrint::DuplexMode> supportedDuplexModes() const;
|
||||
|
||||
QPrint::ColorMode defaultColorMode() const;
|
||||
QVector<QPrint::ColorMode> supportedColorModes() const;
|
||||
QList<QPrint::ColorMode> supportedColorModes() const;
|
||||
|
||||
enum PrintDevicePropertyKey {
|
||||
PDPK_CustomBase = 0xff00
|
||||
|
|
|
|||
|
|
@ -54,12 +54,11 @@
|
|||
#include "QtPrintSupport/qprintengine.h"
|
||||
|
||||
#ifndef QT_NO_PRINTER
|
||||
#include "QtCore/qdatastream.h"
|
||||
#include "QtCore/qmap.h"
|
||||
#include "QtCore/qstring.h"
|
||||
#include "QtCore/qvector.h"
|
||||
#include "QtGui/qpaintengine.h"
|
||||
#include "QtGui/qpainterpath.h"
|
||||
#include "QtCore/qdatastream.h"
|
||||
|
||||
#include "private/qfontengine_p.h"
|
||||
#include "private/qpdf_p.h"
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
#include <qbitmap.h>
|
||||
#include <qdebug.h>
|
||||
#include <qvector.h>
|
||||
#include <qlist.h>
|
||||
#include <qpicture.h>
|
||||
#include <qpa/qplatformpixmap.h>
|
||||
#include <private/qpicture_p.h>
|
||||
|
|
@ -1018,7 +1018,7 @@ bool QWin32PrintEnginePrivate::resetDC()
|
|||
return hdc != 0;
|
||||
}
|
||||
|
||||
static int indexOfId(const QVector<QPrint::InputSlot> &inputSlots, QPrint::InputSlotId id)
|
||||
static int indexOfId(const QList<QPrint::InputSlot> &inputSlots, QPrint::InputSlotId id)
|
||||
{
|
||||
for (int i = 0; i < inputSlots.size(); ++i) {
|
||||
if (inputSlots.at(i).id == id)
|
||||
|
|
@ -1027,7 +1027,7 @@ static int indexOfId(const QVector<QPrint::InputSlot> &inputSlots, QPrint::Input
|
|||
return -1;
|
||||
}
|
||||
|
||||
static int indexOfWindowsId(const QVector<QPrint::InputSlot> &inputSlots, int windowsId)
|
||||
static int indexOfWindowsId(const QList<QPrint::InputSlot> &inputSlots, int windowsId)
|
||||
{
|
||||
for (int i = 0; i < inputSlots.size(); ++i) {
|
||||
if (inputSlots.at(i).windowsId == windowsId)
|
||||
|
|
|
|||
Loading…
Reference in New Issue