Use QList instead of QVector in plugins

Task-number: QTBUG-84469
Change-Id: Ic86f4a3000592a1c9ae62e4a83f4fe39832a6b24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Jarek Kobus 2020-07-06 12:34:58 +02:00
parent 23b7e7972e
commit 1e25b81e0d
81 changed files with 260 additions and 264 deletions

View File

@ -42,7 +42,7 @@
#include <qobject.h>
#include <QDataStream>
#include <QVector>
#include <QList>
QT_BEGIN_NAMESPACE
@ -137,7 +137,7 @@ private:
bool m_numLock = false;
bool m_scrollLock = false;
QVector<QBsdKeyboardMap::Mapping> m_keymap;
QList<QBsdKeyboardMap::Mapping> m_keymap;
};
QT_END_NAMESPACE

View File

@ -58,12 +58,12 @@ public:
bool isValid() const { return m_isValid; }
QByteArray addressPattern() const { return m_addressPattern; }
QList<QVariant> arguments() const { return m_arguments; }
QVariantList arguments() const { return m_arguments; }
private:
bool m_isValid;
QByteArray m_addressPattern;
QList<QVariant> m_arguments;
QVariantList m_arguments;
};
Q_DECLARE_TYPEINFO(QOscMessage, Q_MOVABLE_TYPE);

View File

@ -158,7 +158,7 @@ void QTuioHandler::processPackets()
// messages. The FSEQ frame ID is incremented for each delivered bundle,
// while redundant bundles can be marked using the frame sequence ID
// -1."
QVector<QOscMessage> messages;
QList<QOscMessage> messages;
QOscBundle bundle(datagram);
if (bundle.isValid()) {

View File

@ -41,10 +41,10 @@
#ifndef QTUIOHANDLER_P_H
#define QTUIOHANDLER_P_H
#include <QList>
#include <QObject>
#include <QMap>
#include <QUdpSocket>
#include <QVector>
#include <QTransform>
#include <qpa/qwindowsysteminterface.h>
@ -83,9 +83,9 @@ private:
QPointingDevice *m_device = nullptr;
QUdpSocket m_socket;
QMap<int, QTuioCursor> m_activeCursors;
QVector<QTuioCursor> m_deadCursors;
QList<QTuioCursor> m_deadCursors;
QMap<int, QTuioToken> m_activeTokens;
QVector<QTuioToken> m_deadTokens;
QList<QTuioToken> m_deadTokens;
QTransform m_transform;
};

View File

@ -69,7 +69,7 @@ public:
int decode(QImage *image, const uchar* buffer, int length,
int *nextFrameDelay, int *loopCount);
static void scan(QIODevice *device, QVector<QSize> *imageSizes, int *loopCount);
static void scan(QIODevice *device, QList<QSize> *imageSizes, int *loopCount);
bool newFrame;
bool partialNewFrame;
@ -688,9 +688,9 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
/*!
Scans through the data stream defined by \a device and returns the image
sizes found in the stream in the \a imageSizes vector.
sizes found in the stream in the \a imageSizes list.
*/
void QGIFFormat::scan(QIODevice *device, QVector<QSize> *imageSizes, int *loopCount)
void QGIFFormat::scan(QIODevice *device, QList<QSize> *imageSizes, int *loopCount)
{
if (!device)
return;

View File

@ -94,7 +94,7 @@ private:
mutable int nextDelay;
mutable int loopCnt;
int frameNumber;
mutable QVector<QSize> imageSizes;
mutable QList<QSize> imageSizes;
mutable bool scanIsCached;
};

View File

@ -103,9 +103,9 @@ public:
QImage iconAt(int index);
static bool canRead(QIODevice *iodev);
static QVector<QImage> read(QIODevice *device);
static QList<QImage> read(QIODevice *device);
static bool write(QIODevice *device, const QVector<QImage> &images);
static bool write(QIODevice *device, const QList<QImage> &images);
bool readIconEntry(int index, ICONDIRENTRY * iconEntry);
@ -564,9 +564,9 @@ QImage ICOReader::iconAt(int index)
\sa write()
*/
QVector<QImage> ICOReader::read(QIODevice *device)
QList<QImage> ICOReader::read(QIODevice *device)
{
QVector<QImage> images;
QList<QImage> images;
ICOReader reader(device);
const int N = reader.count();
@ -590,7 +590,7 @@ QVector<QImage> ICOReader::read(QIODevice *device)
\sa read()
*/
bool ICOReader::write(QIODevice *device, const QVector<QImage> &images)
bool ICOReader::write(QIODevice *device, const QList<QImage> &images)
{
bool retValue = false;
@ -809,7 +809,7 @@ bool QtIcoHandler::read(QImage *image)
bool QtIcoHandler::write(const QImage &image)
{
QIODevice *device = QImageIOHandler::device();
QVector<QImage> imgs;
QList<QImage> imgs;
imgs.append(image);
return ICOReader::write(device, imgs);
}

View File

@ -39,14 +39,14 @@
#include "qjpeghandler_p.h"
#include <qimage.h>
#include <qbuffer.h>
#include <qcolorspace.h>
#include <qcolortransform.h>
#include <qdebug.h>
#include <qvariant.h>
#include <qvector.h>
#include <qbuffer.h>
#include <qimage.h>
#include <qlist.h>
#include <qmath.h>
#include <qvariant.h>
#include <private/qicc_p.h>
#include <private/qsimd_p.h>
#include <private/qimage_p.h> // for qt_getImageText
@ -535,7 +535,7 @@ static bool do_write_jpeg_image(struct jpeg_compress_struct &cinfo,
bool progressive)
{
bool success = false;
const QVector<QRgb> cmap = image.colorTable();
const QList<QRgb> cmap = image.colorTable();
if (image.format() == QImage::Format_Invalid || image.format() == QImage::Format_Alpha8)
return false;

View File

@ -39,7 +39,7 @@
#ifndef QIBUSTYPES_H
#define QIBUSTYPES_H
#include <qvector.h>
#include <qlist.h>
#include <qevent.h>
#include <QDBusArgument>
#include <QTextCharFormat>
@ -104,7 +104,7 @@ public:
void serializeTo(QDBusArgument &argument) const;
void deserializeFrom(const QDBusArgument &argument);
QVector<QIBusAttribute> attributes;
QList<QIBusAttribute> attributes;
};
Q_DECLARE_TYPEINFO(QIBusAttributeList, Q_MOVABLE_TYPE);

View File

@ -42,7 +42,7 @@
#include <optional>
#include <QCoreApplication>
#include <QVector>
#include <QList>
#include <QtCore/private/qjni_p.h>
QT_BEGIN_NAMESPACE
@ -88,7 +88,7 @@ struct AssetItem {
QString name;
};
using AssetItemList = QVector<AssetItem>;
using AssetItemList = QList<AssetItem>;
class FolderIterator : public AssetItemList
{

View File

@ -78,7 +78,7 @@ public:
private:
QMutex m_mutex;
QAtomicInt m_started = 1;
QVector<QAndroidEventDispatcher *> m_dispatchers;
QList<QAndroidEventDispatcher *> m_dispatchers;
};

View File

@ -41,7 +41,7 @@
#define QANDROIDPLATFORMMENU_H
#include <qpa/qplatformmenu.h>
#include <qvector.h>
#include <qlist.h>
#include <qmutex.h>
QT_BEGIN_NAMESPACE
@ -50,7 +50,7 @@ class QAndroidPlatformMenuItem;
class QAndroidPlatformMenu: public QPlatformMenu
{
public:
typedef QVector<QAndroidPlatformMenuItem *> PlatformMenuItemsType;
typedef QList<QAndroidPlatformMenuItem *> PlatformMenuItemsType;
public:
QAndroidPlatformMenu();

View File

@ -41,9 +41,9 @@
#define QANDROIDPLATFORMMENUBAR_H
#include <qpa/qplatformmenu.h>
#include <qvector.h>
#include <qmutex.h>
#include <qhash.h>
#include <qlist.h>
#include <qmutex.h>
QT_BEGIN_NAMESPACE
@ -51,7 +51,7 @@ class QAndroidPlatformMenu;
class QAndroidPlatformMenuBar: public QPlatformMenuBar
{
public:
typedef QVector<QAndroidPlatformMenu *> PlatformMenusType;
typedef QList<QAndroidPlatformMenu *> PlatformMenusType;
public:
QAndroidPlatformMenuBar();
~QAndroidPlatformMenuBar();

View File

@ -124,9 +124,9 @@ static inline D2D1_MATRIX_3X2_F transformFromLine(const QLineF &line, qreal penW
static void adjustLine(QPointF *p1, QPointF *p2);
static bool isLinePositivelySloped(const QPointF &p1, const QPointF &p2);
static QVector<D2D1_GRADIENT_STOP> qGradientStopsToD2DStops(const QGradientStops &qstops)
static QList<D2D1_GRADIENT_STOP> qGradientStopsToD2DStops(const QGradientStops &qstops)
{
QVector<D2D1_GRADIENT_STOP> stops(qstops.count());
QList<D2D1_GRADIENT_STOP> stops(qstops.count());
for (int i = 0, count = stops.size(); i < count; ++i) {
stops[i].position = FLOAT(qstops.at(i).first);
stops[i].color = to_d2d_color_f(qstops.at(i).second);
@ -572,8 +572,8 @@ public:
HRESULT hr;
if (props.dashStyle == D2D1_DASH_STYLE_CUSTOM) {
QVector<qreal> dashes = newPen.dashPattern();
QVector<FLOAT> converted(dashes.size());
QList<qreal> dashes = newPen.dashPattern();
QList<FLOAT> converted(dashes.size());
qreal penWidth = pen.qpen.widthF();
qreal brushWidth = 0;
for (int i = 0; i < dashes.size(); i++) {
@ -696,7 +696,7 @@ public:
linearGradientBrushProperties.startPoint = to_d2d_point_2f(qlinear->start());
linearGradientBrushProperties.endPoint = to_d2d_point_2f(qlinear->finalStop());
const QVector<D2D1_GRADIENT_STOP> stops = qGradientStopsToD2DStops(qlinear->stops());
const QList<D2D1_GRADIENT_STOP> stops = qGradientStopsToD2DStops(qlinear->stops());
hr = dc()->CreateGradientStopCollection(stops.constData(),
UINT32(stops.size()),
@ -736,7 +736,7 @@ public:
radialGradientBrushProperties.radiusX = FLOAT(qradial->radius());
radialGradientBrushProperties.radiusY = FLOAT(qradial->radius());
const QVector<D2D1_GRADIENT_STOP> stops = qGradientStopsToD2DStops(qradial->stops());
const QList<D2D1_GRADIENT_STOP> stops = qGradientStopsToD2DStops(qradial->stops());
hr = dc()->CreateGradientStopCollection(stops.constData(), stops.size(), &gradientStopCollection);
if (FAILED(hr)) {

View File

@ -59,7 +59,7 @@
#include <QtGui/QOpenGLFunctions>
#include <QtGui/private/qinputdevicemanager_p.h>
#include <QtCore/qvector.h>
#include <QtCore/qlist.h>
QT_BEGIN_NAMESPACE
@ -145,7 +145,7 @@ private:
int cursorsPerRow;
int width, height; // width and height of the atlas
int cursorWidth, cursorHeight; // width and height of cursors inside the atlas
QVector<QPoint> hotSpots;
QList<QPoint> hotSpots;
QImage image; // valid until it's uploaded
} m_cursorAtlas;

View File

@ -41,7 +41,7 @@
#define QEGLFSKMSGBMCURSOR_H
#include <qpa/qplatformcursor.h>
#include <QtCore/QVector>
#include <QtCore/QList>
#include <QtGui/QImage>
#include <QtGui/private/qinputdevicemanager_p.h>
@ -112,7 +112,7 @@ private:
int cursorsPerRow;
int width, height; // width and height of the atlas
int cursorWidth, cursorHeight; // width and height of cursors inside the atlas
QVector<QPoint> hotSpots;
QList<QPoint> hotSpots;
QImage image;
} m_cursorAtlas;
};

View File

@ -150,7 +150,7 @@ QPlatformScreen *QEglFSKmsGbmDevice::createHeadlessScreen()
void QEglFSKmsGbmDevice::registerScreenCloning(QPlatformScreen *screen,
QPlatformScreen *screenThisScreenClones,
const QVector<QPlatformScreen *> &screensCloningThisScreen)
const QList<QPlatformScreen *> &screensCloningThisScreen)
{
if (!screenThisScreenClones && screensCloningThisScreen.isEmpty())
return;

View File

@ -69,7 +69,7 @@ public:
QPlatformScreen *createHeadlessScreen() override;
void registerScreenCloning(QPlatformScreen *screen,
QPlatformScreen *screenThisScreenClones,
const QVector<QPlatformScreen *> &screensCloningThisScreen) override;
const QList<QPlatformScreen *> &screensCloningThisScreen) override;
void registerScreen(QPlatformScreen *screen,
bool isPrimary,
const QPoint &virtualPos,

View File

@ -198,7 +198,7 @@ void QEglFSKmsGbmScreen::resetSurface()
}
void QEglFSKmsGbmScreen::initCloning(QPlatformScreen *screenThisScreenClones,
const QVector<QPlatformScreen *> &screensCloningThisScreen)
const QList<QPlatformScreen *> &screensCloningThisScreen)
{
// clone destinations need to know the clone source
const bool clonesAnother = screenThisScreenClones != nullptr;

View File

@ -64,7 +64,7 @@ public:
void resetSurface();
void initCloning(QPlatformScreen *screenThisScreenClones,
const QVector<QPlatformScreen *> &screensCloningThisScreen);
const QList<QPlatformScreen *> &screensCloningThisScreen);
void waitForFlip() override;
@ -98,7 +98,7 @@ private:
QEglFSKmsGbmScreen *screen = nullptr;
bool cloneFlipPending = false;
};
QVector<CloneDestination> m_cloneDests;
QList<CloneDestination> m_cloneDests;
};
QT_END_NAMESPACE

View File

@ -171,7 +171,7 @@ void QEglFSKmsEglDeviceWindow::resetSurface()
qCDebug(qLcEglfsKmsDebug, "Output has %d layers", count);
QVector<EGLOutputLayerEXT> layers;
QList<EGLOutputLayerEXT> layers;
layers.resize(count);
EGLint actualCount;
if (!m_integration->m_funcs->get_output_layers(display, nullptr, layers.data(), count, &actualCount)) {

View File

@ -218,9 +218,9 @@ qreal QEglFSKmsScreen::refreshRate() const
return refresh > 0 ? refresh : 60;
}
QVector<QPlatformScreen::Mode> QEglFSKmsScreen::modes() const
QList<QPlatformScreen::Mode> QEglFSKmsScreen::modes() const
{
QVector<QPlatformScreen::Mode> list;
QList<QPlatformScreen::Mode> list;
list.reserve(m_output.modes.size());
for (const drmModeModeInfo &info : qAsConst(m_output.modes))

View File

@ -83,7 +83,7 @@ public:
QList<QPlatformScreen *> virtualSiblings() const override { return m_siblings; }
void setVirtualSiblings(QList<QPlatformScreen *> sl) { m_siblings = sl; }
QVector<QPlatformScreen::Mode> modes() const override;
QList<QPlatformScreen::Mode> modes() const override;
int currentMode() const override;
int preferredMode() const override;

View File

@ -122,7 +122,7 @@ QPlatformScreen *QEglFSKmsVsp2Device::createHeadlessScreen()
void QEglFSKmsVsp2Device::registerScreenCloning(QPlatformScreen *screen,
QPlatformScreen *screenThisScreenClones,
const QVector<QPlatformScreen *> &screensCloningThisScreen)
const QList<QPlatformScreen *> &screensCloningThisScreen)
{
Q_UNUSED(screen);
qWarning() << Q_FUNC_INFO << "Not implemented yet";

View File

@ -65,7 +65,7 @@ public:
QPlatformScreen *createHeadlessScreen() override;
void registerScreenCloning(QPlatformScreen *screen,
QPlatformScreen *screenThisScreenClones,
const QVector<QPlatformScreen *> &screensCloningThisScreen) override;
const QList<QPlatformScreen *> &screensCloningThisScreen) override;
private:
Q_DISABLE_COPY(QEglFSKmsVsp2Device)

View File

@ -97,7 +97,7 @@ private:
std::array<FrameBuffer, 2> m_frameBuffers;
uint m_backFb = 0;
void initDumbFrameBuffer(FrameBuffer &fb);
QVector<void (*)()> m_blendFinishedCallbacks;
QList<void (*)()> m_blendFinishedCallbacks;
struct DmaBuffer { //these are for qt buffers before blending with additional layers (gbm buffer data)
int dmabufFd = -1;

View File

@ -40,8 +40,8 @@
#ifndef QVSP2BLENDINGDEVICE_H
#define QVSP2BLENDINGDEVICE_H
#include <QtCore/QList>
#include <QtCore/QRect>
#include <QtCore/QVector>
#include <QtCore/qglobal.h>
#include "qlinuxmediadevice.h"
@ -86,7 +86,7 @@ private:
struct media_pad *bruInputFormatPad = nullptr; // bru:x
QLinuxMediaDevice::OutputSubDevice *rpfInput = nullptr; // rpf.x input
};
QVector<struct Input> m_inputs;
QList<struct Input> m_inputs;
const QSize m_screenSize;
bool m_dirty = true;
};

View File

@ -115,7 +115,7 @@ private:
static void pageFlipHandler(int fd, unsigned int sequence,
unsigned int tv_sec, unsigned int tv_usec, void *user_data);
QVector<Output> m_outputs;
QList<Output> m_outputs;
};
QLinuxFbDevice::QLinuxFbDevice(QKmsScreenConfig *screenConfig)

View File

@ -380,7 +380,7 @@ public:
QImage cursor;
QPoint hotspot;
QVector<QVncClient *> clients;
QList<QVncClient *> clients;
};
#endif // QT_CONFIG(cursor)
@ -408,7 +408,7 @@ private slots:
private:
QTcpServer *serverSocket;
QVector<QVncClient*> clients;
QList<QVncClient*> clients;
QVncScreen *qvnc_screen;
quint16 m_port;
};

View File

@ -621,7 +621,7 @@ void QWasmCompositor::drawShadePanel(QWasmTitleBarOptions options, QPainter *pai
light = palette.midlight().color();
}
QPen oldPen = painter->pen();
QVector<QLineF> lines;
QList<QLineF> lines;
lines.reserve(2*lineWidth);
painter->setPen(light);

View File

@ -58,7 +58,7 @@ private:
bool m_hasMainLoop = false;
bool m_hasZeroTimer = false;
uint64_t m_currentTargetTime = std::numeric_limits<uint64_t>::max();
QVector<std::function<void(void)>> m_requestUpdateCallbacks;
QList<std::function<void(void)>> m_requestUpdateCallbacks;
};
QT_END_NAMESPACE

View File

@ -95,7 +95,7 @@ private:
mutable QWasmFontDatabase *m_fontDb;
mutable QWasmServices *m_desktopServices;
mutable QHash<QWindow *, QWasmBackingStore *> m_backingStores;
QVector<QPair<emscripten::val, QWasmScreen *>> m_screens;
QList<QPair<emscripten::val, QWasmScreen *>> m_screens;
mutable QWasmClipboard *m_clipboard;
qreal m_fontDpi = -1;
mutable QScopedPointer<QPlatformInputContext> m_inputContext;

View File

@ -69,10 +69,10 @@ QT_BEGIN_NAMESPACE
static uint nextId = 1;
// Find a QPlatformMenu[Item]* in a vector of QWindowsMenu[Item], where
// QVector::indexOf() cannot be used since it wants a QWindowsMenu[Item]*
// Find a QPlatformMenu[Item]* in a list of QWindowsMenu[Item], where
// QList::indexOf() cannot be used since it wants a QWindowsMenu[Item]*
template <class Derived, class Needle>
static int indexOf(const QVector<Derived *> &v, const Needle *needle)
static int indexOf(const QList<Derived *> &v, const Needle *needle)
{
for (int i = 0, size = v.size(); i < size; ++i) {
if (v.at(i) == needle)
@ -81,9 +81,9 @@ static int indexOf(const QVector<Derived *> &v, const Needle *needle)
return -1;
}
// Helper for inserting a QPlatformMenu[Item]* into a vector of QWindowsMenu[Item].
// Helper for inserting a QPlatformMenu[Item]* into a list of QWindowsMenu[Item].
template <class Derived, class Base>
static int insertBefore(QVector<Derived *> *v, Base *newItemIn, const Base *before = nullptr)
static int insertBefore(QList<Derived *> *v, Base *newItemIn, const Base *before = nullptr)
{
int index = before ? indexOf(*v, before) : -1;
if (index != -1) {
@ -175,7 +175,7 @@ static QWindowsMenu *findMenuByHandle(const Menu *menu, HMENU hMenu)
}
template <class MenuType>
static int findNextVisibleEntry(const QVector<MenuType *> &entries, int pos)
static int findNextVisibleEntry(const QList<MenuType *> &entries, int pos)
{
for (int i = pos, size = entries.size(); i < size; ++i) {
if (entries.at(i)->isVisible())
@ -862,7 +862,7 @@ void QWindowsMenuBar::redraw() const
#ifndef QT_NO_DEBUG_STREAM
template <class M> /* Menu[Item] */
static void formatTextSequence(QDebug &d, const QVector<M *> &v)
static void formatTextSequence(QDebug &d, const QList<M *> &v)
{
if (const int size = v.size()) {
d << '[' << size << "](";

View File

@ -44,7 +44,7 @@
#include <qpa/qplatformmenu.h>
#include <QtCore/qvector.h>
#include <QtCore/qlist.h>
#include <QtCore/qpair.h>
QT_BEGIN_NAMESPACE
@ -120,7 +120,7 @@ class QWindowsMenu : public QPlatformMenu
{
Q_OBJECT
public:
using MenuItems = QVector<QWindowsMenuItem *>;
using MenuItems = QList<QWindowsMenuItem *>;
QWindowsMenu();
~QWindowsMenu();
@ -196,7 +196,7 @@ class QWindowsMenuBar : public QPlatformMenuBar
{
Q_OBJECT
public:
using Menus = QVector<QWindowsMenu *>;
using Menus = QList<QWindowsMenu *>;
QWindowsMenuBar();
~QWindowsMenuBar() override;

View File

@ -539,9 +539,9 @@ int QWindowsMime::registerMimeType(const QString &mime)
*/
/*!
\fn QVector<FORMATETC> QWindowsMime::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
\fn QList<FORMATETC> QWindowsMime::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
Returns a QVector of FORMATETC structures representing the different windows clipboard
Returns a QList of FORMATETC structures representing the different windows clipboard
formats that can be provided for the \a mimeType from the \a mimeData.
All subclasses must reimplement this pure virtual function.
@ -576,7 +576,7 @@ public:
QString mimeForFormat(const FORMATETC &formatetc) const override;
bool canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const override;
bool convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM *pmedium) const override;
QVector<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const override;
QList<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const override;
};
bool QWindowsMimeText::canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const
@ -678,9 +678,9 @@ QString QWindowsMimeText::mimeForFormat(const FORMATETC &formatetc) const
}
QVector<FORMATETC> QWindowsMimeText::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
QList<FORMATETC> QWindowsMimeText::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
{
QVector<FORMATETC> formatics;
QList<FORMATETC> formatics;
if (mimeType.startsWith(u"text/plain") && mimeData->hasText()) {
formatics += setCf(CF_UNICODETEXT);
formatics += setCf(CF_TEXT);
@ -733,7 +733,7 @@ public:
QString mimeForFormat(const FORMATETC &formatetc) const override;
bool canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const override;
bool convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM *pmedium) const override;
QVector<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const override;
QList<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const override;
private:
int CF_INETURL_W; // wide char version
int CF_INETURL;
@ -829,9 +829,9 @@ QString QWindowsMimeURI::mimeForFormat(const FORMATETC &formatetc) const
return format;
}
QVector<FORMATETC> QWindowsMimeURI::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
QList<FORMATETC> QWindowsMimeURI::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
{
QVector<FORMATETC> formatics;
QList<FORMATETC> formatics;
if (mimeType == u"text/uri-list") {
if (canConvertFromMime(setCf(CF_HDROP), mimeData))
formatics += setCf(CF_HDROP);
@ -898,7 +898,7 @@ public:
// for converting from Qt
bool canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const override;
bool convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const override;
QVector<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const override;
QList<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const override;
// for converting to Qt
bool canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const override;
@ -914,9 +914,9 @@ QWindowsMimeHtml::QWindowsMimeHtml()
CF_HTML = QWindowsMime::registerMimeType(QStringLiteral("HTML Format"));
}
QVector<FORMATETC> QWindowsMimeHtml::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
QList<FORMATETC> QWindowsMimeHtml::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
{
QVector<FORMATETC> formatetcs;
QList<FORMATETC> formatetcs;
if (mimeType == u"text/html" && (!mimeData->html().isEmpty()))
formatetcs += setCf(CF_HTML);
return formatetcs;
@ -1035,7 +1035,7 @@ public:
// for converting from Qt
bool canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const override;
bool convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const override;
QVector<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const override;
QList<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const override;
// for converting to Qt
bool canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const override;
@ -1051,9 +1051,9 @@ QWindowsMimeImage::QWindowsMimeImage()
CF_PNG = RegisterClipboardFormat(L"PNG");
}
QVector<FORMATETC> QWindowsMimeImage::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
QList<FORMATETC> QWindowsMimeImage::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
{
QVector<FORMATETC> formatetcs;
QList<FORMATETC> formatetcs;
if (mimeData->hasImage() && mimeType == u"application/x-qt-image") {
//add DIBV5 if image has alpha channel. Do not add CF_PNG here as it will confuse MS Office (QTBUG47656).
auto image = qvariant_cast<QImage>(mimeData->imageData());
@ -1190,7 +1190,7 @@ public:
// for converting from Qt
bool canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const override;
bool convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const override;
QVector<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const override;
QList<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const override;
// for converting to Qt
bool canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const override;
@ -1264,9 +1264,9 @@ bool QBuiltInMimes::convertFromMime(const FORMATETC &formatetc, const QMimeData
return false;
}
QVector<FORMATETC> QBuiltInMimes::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
QList<FORMATETC> QBuiltInMimes::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
{
QVector<FORMATETC> formatetcs;
QList<FORMATETC> formatetcs;
const auto mit = std::find(outFormats.cbegin(), outFormats.cend(), mimeType);
if (mit != outFormats.cend() && mimeData->formats().contains(mimeType))
formatetcs += setCf(mit.key());
@ -1311,7 +1311,7 @@ public:
// for converting from Qt
bool canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const override;
bool convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const override;
QVector<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const override;
QList<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const override;
// for converting to Qt
bool canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const override;
@ -1381,9 +1381,9 @@ bool QLastResortMimes::convertFromMime(const FORMATETC &formatetc, const QMimeDa
#endif // QT_CONFIG(draganddrop)
}
QVector<FORMATETC> QLastResortMimes::formatsForMime(const QString &mimeType, const QMimeData * /*mimeData*/) const
QList<FORMATETC> QLastResortMimes::formatsForMime(const QString &mimeType, const QMimeData * /*mimeData*/) const
{
QVector<FORMATETC> formatetcs;
QList<FORMATETC> formatetcs;
auto mit = std::find(formats.begin(), formats.end(), mimeType);
// register any other available formats
if (mit == formats.end() && !excludeList.contains(mimeType, Qt::CaseInsensitive))
@ -1556,10 +1556,10 @@ QWindowsMime * QWindowsMimeConverter::converterFromMime(const FORMATETC &formate
return nullptr;
}
QVector<FORMATETC> QWindowsMimeConverter::allFormatsForMime(const QMimeData *mimeData) const
QList<FORMATETC> QWindowsMimeConverter::allFormatsForMime(const QMimeData *mimeData) const
{
ensureInitialized();
QVector<FORMATETC> formatics;
QList<FORMATETC> formatics;
#if !QT_CONFIG(draganddrop)
Q_UNUSED(mimeData);
#else

View File

@ -42,7 +42,7 @@
#include <QtCore/qt_windows.h>
#include <QtCore/qvector.h>
#include <QtCore/qlist.h>
#include <QtCore/qvariant.h>
QT_BEGIN_NAMESPACE
@ -60,7 +60,7 @@ public:
// for converting from Qt
virtual bool canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const = 0;
virtual bool convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const = 0;
virtual QVector<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const = 0;
virtual QList<FORMATETC> formatsForMime(const QString &mimeType, const QMimeData *mimeData) const = 0;
// for converting to Qt
virtual bool canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const = 0;
@ -80,7 +80,7 @@ public:
QWindowsMime *converterToMime(const QString &mimeType, IDataObject *pDataObj) const;
QStringList allMimesForFormats(IDataObject *pDataObj) const;
QWindowsMime *converterFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const;
QVector<FORMATETC> allFormatsForMime(const QMimeData *mimeData) const;
QList<FORMATETC> allFormatsForMime(const QMimeData *mimeData) const;
// Convenience.
QVariant convertToMime(const QStringList &mimeTypes, IDataObject *pDataObj, QVariant::Type preferredType,
@ -94,7 +94,7 @@ public:
private:
void ensureInitialized() const;
mutable QVector<QWindowsMime *> m_mimes;
mutable QList<QWindowsMime *> m_mimes;
mutable int m_internalMimeCount = 0;
};

View File

@ -178,7 +178,7 @@ QWindowsOleDataObject::EnumFormatEtc(DWORD dwDirection, LPENUMFORMATETC FAR* ppe
SCODE sc = S_OK;
QVector<FORMATETC> fmtetcs;
QList<FORMATETC> fmtetcs;
if (dwDirection == DATADIR_GET) {
QWindowsMimeConverter &mc = QWindowsContext::instance()->mimeConverter();
fmtetcs = mc.allFormatsForMime(data);
@ -229,7 +229,7 @@ QWindowsOleDataObject::EnumDAdvise(LPENUMSTATDATA FAR*)
\internal
*/
QWindowsOleEnumFmtEtc::QWindowsOleEnumFmtEtc(const QVector<FORMATETC> &fmtetcs)
QWindowsOleEnumFmtEtc::QWindowsOleEnumFmtEtc(const QList<FORMATETC> &fmtetcs)
{
if (QWindowsContext::verbose > 1)
qCDebug(lcQpaMime) << __FUNCTION__ << fmtetcs;
@ -246,7 +246,7 @@ QWindowsOleEnumFmtEtc::QWindowsOleEnumFmtEtc(const QVector<FORMATETC> &fmtetcs)
}
}
QWindowsOleEnumFmtEtc::QWindowsOleEnumFmtEtc(const QVector<LPFORMATETC> &lpfmtetcs)
QWindowsOleEnumFmtEtc::QWindowsOleEnumFmtEtc(const QList<LPFORMATETC> &lpfmtetcs)
{
if (QWindowsContext::verbose > 1)
qCDebug(lcQpaMime) << __FUNCTION__;

View File

@ -43,9 +43,9 @@
#include "qwindowscombase.h"
#include <QtCore/qt_windows.h>
#include <QtCore/qlist.h>
#include <QtCore/qmap.h>
#include <QtCore/qpointer.h>
#include <QtCore/qvector.h>
#include <objidl.h>
@ -86,8 +86,8 @@ private:
class QWindowsOleEnumFmtEtc : public QWindowsComBase<IEnumFORMATETC>
{
public:
explicit QWindowsOleEnumFmtEtc(const QVector<FORMATETC> &fmtetcs);
explicit QWindowsOleEnumFmtEtc(const QVector<LPFORMATETC> &lpfmtetcs);
explicit QWindowsOleEnumFmtEtc(const QList<FORMATETC> &fmtetcs);
explicit QWindowsOleEnumFmtEtc(const QList<LPFORMATETC> &lpfmtetcs);
~QWindowsOleEnumFmtEtc() override;
bool isNull() const;
@ -102,7 +102,7 @@ private:
bool copyFormatEtc(LPFORMATETC dest, const FORMATETC *src) const;
ULONG m_nIndex = 0;
QVector<LPFORMATETC> m_lpfmtetcs;
QList<LPFORMATETC> m_lpfmtetcs;
bool m_isNull = false;
};

View File

@ -69,7 +69,7 @@ static GpuDescription adapterIdentifierToGpuDescription(const D3DADAPTER_IDENTIF
result.deviceId = adapterIdentifier.DeviceId;
result.revision = adapterIdentifier.Revision;
result.subSysId = adapterIdentifier.SubSysId;
QVector<int> version(4, 0);
QList<int> version(4, 0);
version[0] = HIWORD(adapterIdentifier.DriverVersion.HighPart); // Product
version[1] = LOWORD(adapterIdentifier.DriverVersion.HighPart); // Version
version[2] = HIWORD(adapterIdentifier.DriverVersion.LowPart); // Sub version
@ -169,9 +169,9 @@ GpuDescription GpuDescription::detect()
return result;
}
QVector<GpuDescription> GpuDescription::detectAll()
QList<GpuDescription> GpuDescription::detectAll()
{
QVector<GpuDescription> result;
QList<GpuDescription> result;
QDirect3D9Handle direct3D9;
if (const UINT adapterCount = direct3D9.adapterCount()) {
for (UINT adp = 0; adp < adapterCount; ++adp) {

View File

@ -42,7 +42,7 @@
#include <QtCore/qbytearray.h>
#include <QtCore/qflags.h>
#include <QtCore/qvector.h>
#include <QtCore/qlist.h>
#include <QtCore/qversionnumber.h>
QT_BEGIN_NAMESPACE
@ -53,7 +53,7 @@ class QVariant;
struct GpuDescription
{
static GpuDescription detect();
static QVector<GpuDescription> detectAll();
static QList<GpuDescription> detectAll();
QString toString() const;
QVariant toVariant() const;

View File

@ -74,7 +74,7 @@ static inline QDpi monitorDPI(HMONITOR hMonitor)
return {0, 0};
}
using WindowsScreenDataList = QVector<QWindowsScreenData>;
using WindowsScreenDataList = QList<QWindowsScreenData>;
static bool monitorData(HMONITOR hMonitor, QWindowsScreenData *data)
{

View File

@ -43,7 +43,6 @@
#include "qtwindowsglobal.h"
#include <QtCore/qlist.h>
#include <QtCore/qvector.h>
#include <QtCore/qpair.h>
#include <QtCore/qscopedpointer.h>
#include <qpa/qplatformscreen.h>
@ -127,7 +126,7 @@ private:
class QWindowsScreenManager
{
public:
using WindowsScreenList = QVector<QWindowsScreen *>;
using WindowsScreenList = QList<QWindowsScreen *>;
QWindowsScreenManager();

View File

@ -60,8 +60,8 @@
#include <QtGui/qguiapplication.h>
#include <QtGui/qpixmap.h>
#include <QtCore/qdebug.h>
#include <QtCore/qlist.h>
#include <QtCore/qrect.h>
#include <QtCore/qvector.h>
#include <QtCore/qsettings.h>
#include <qpa/qwindowsysteminterface.h>
@ -119,7 +119,7 @@ struct QWindowsHwndSystemTrayIconEntry
QWindowsSystemTrayIcon *trayIcon;
};
using HwndTrayIconEntries = QVector<QWindowsHwndSystemTrayIconEntry>;
using HwndTrayIconEntries = QList<QWindowsHwndSystemTrayIconEntry>;
Q_GLOBAL_STATIC(HwndTrayIconEntries, hwndTrayIconEntries)

View File

@ -318,7 +318,7 @@ void QWindowsTabletSupport::notifyActivate()
qCDebug(lcQpaTablet) << __FUNCTION__ << result;
}
static inline int indexOfDevice(const QVector<QWindowsTabletDeviceData> &devices, qint64 uniqueId)
static inline int indexOfDevice(const QList<QWindowsTabletDeviceData> &devices, qint64 uniqueId)
{
for (int i = 0; i < devices.size(); ++i)
if (devices.at(i).uniqueId == uniqueId)

View File

@ -44,9 +44,9 @@
#include <QtGui/qtguiglobal.h>
#include <QtGui/qpointingdevice.h>
#include <QtCore/qvector.h>
#include <QtCore/qpoint.h>
#include <QtCore/qhash.h>
#include <QtCore/qlist.h>
#include <QtCore/qpoint.h>
#include <wintab.h>
@ -152,7 +152,7 @@ private:
const HCTX m_context;
int m_absoluteRange = 20;
bool m_tiltSupport = false;
QVector<QWindowsTabletDeviceData> m_devices;
QList<QWindowsTabletDeviceData> m_devices;
int m_currentDevice = -1;
Mode m_mode = PenMode;
State m_state = PenUp;

View File

@ -49,7 +49,6 @@
#include <QtCore/qloggingcategory.h>
#include <QtCore/qstring.h>
#include <QtCore/qlist.h>
#include <QtCore/qvector.h>
QT_BEGIN_NAMESPACE
@ -79,7 +78,7 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaSelectionProvider::GetSelection(SAFEARRAY *
return UIA_E_ELEMENTNOTAVAILABLE;
// First put selected items in a list, then build a safe array with the right size.
QVector<QAccessibleInterface *> selectedList;
QList<QAccessibleInterface *> selectedList;
for (int i = 0; i < accessible->childCount(); ++i) {
if (QAccessibleInterface *child = accessible->child(i)) {
if (child->state().selected) {

View File

@ -261,7 +261,7 @@ QGLXContext::QGLXContext(Display *display, QXcbScreen *screen, const QSurfaceFor
// order from the requested version.
const int requestedVersion = m_format.majorVersion() * 10 + qMin(m_format.minorVersion(), 9);
QVector<int> glVersions;
QList<int> glVersions;
if (m_format.renderableType() == QSurfaceFormat::OpenGL) {
if (requestedVersion > 46)
glVersions << requestedVersion;
@ -290,7 +290,7 @@ QGLXContext::QGLXContext(Display *display, QXcbScreen *screen, const QSurfaceFor
const int majorVersion = version / 10;
const int minorVersion = version % 10;
QVector<int> contextAttributes;
QList<int> contextAttributes;
contextAttributes << GLX_CONTEXT_MAJOR_VERSION_ARB << majorVersion
<< GLX_CONTEXT_MINOR_VERSION_ARB << minorVersion;
@ -323,7 +323,7 @@ QGLXContext::QGLXContext(Display *display, QXcbScreen *screen, const QSurfaceFor
}
if (supportsRobustness && m_format.testOption(QSurfaceFormat::ResetNotification)) {
QVector<int> contextAttributesWithRobustness = contextAttributes;
QList<int> contextAttributesWithRobustness = contextAttributes;
contextAttributesWithRobustness << GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB << GLX_LOSE_CONTEXT_ON_RESET_ARB;
if (supportsVideoMemoryPurge)
contextAttributesWithRobustness << GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV << GL_TRUE;

View File

@ -100,7 +100,7 @@ void QXcbNativeBackingStore::flush(QWindow *window, const QRegion &region, const
Window wid = platformWindow->xcb_window();
Pixmap pid = qt_x11PixmapHandle(m_pixmap);
QVector<XRectangle> clipRects = qt_region_to_xrectangles(clipped);
QList<XRectangle> clipRects = qt_region_to_xrectangles(clipped);
#if QT_CONFIG(xrender)
if (m_translucentBackground)
@ -198,7 +198,7 @@ void QXcbNativeBackingStore::beginPaint(const QRegion &region)
#if QT_CONFIG(xrender)
if (m_translucentBackground) {
const QVector<XRectangle> xrects = qt_region_to_xrectangles(region);
const QList<XRectangle> xrects = qt_region_to_xrectangles(region);
const XRenderColor color = { 0, 0, 0, 0 };
XRenderFillRectangles(display(), PictOpSrc,
qt_x11PictureHandle(m_pixmap), &color,

View File

@ -77,8 +77,8 @@ public:
uint g_shift;
uint b_shift;
QVector<QColor> colors;
QVector<int> pixels;
QList<QColor> colors;
QList<int> pixels;
};
static uint right_align(uint v)
@ -638,7 +638,7 @@ const QColor QXcbColormap::colorAt(uint pixel) const
return QColor(r, g, b);
}
const QVector<QColor> QXcbColormap::colormap() const
const QList<QColor> QXcbColormap::colormap() const
{ return d->colors; }
QXcbColormap &QXcbColormap::operator=(const QXcbColormap &colormap)

View File

@ -41,7 +41,7 @@
#define QCOLORMAP_X11_H
#include <QColor>
#include <QVector>
#include <QList>
QT_BEGIN_NAMESPACE
@ -69,7 +69,7 @@ public:
uint pixel(const QColor &color) const;
const QColor colorAt(uint pixel) const;
const QVector<QColor> colormap() const;
const QList<QColor> colormap() const;
private:
QXcbColormap();

View File

@ -392,7 +392,7 @@ static inline void x11SetClipRegion(Display *dpy, GC gc, GC gc2,
{
// int num;
// XRectangle *rects = (XRectangle *)qt_getClipRects(r, num);
QVector<XRectangle> rects = qt_region_to_xrectangles(r);
QList<XRectangle> rects = qt_region_to_xrectangles(r);
int num = rects.size();
if (gc)
@ -2129,7 +2129,7 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
XSetBackground(d->dpy, cgc, 0);
XSetForeground(d->dpy, cgc, 1);
if (!d->crgn.isEmpty()) {
QVector<XRectangle> rects = qt_region_to_xrectangles(d->crgn);
QList<XRectangle> rects = qt_region_to_xrectangles(d->crgn);
XSetClipRectangles(d->dpy, cgc, -x, -y, rects.data(), rects.size(), Unsorted);
} else if (d->has_clipping) {
XSetClipRectangles(d->dpy, cgc, 0, 0, 0, 0, Unsorted);
@ -2152,7 +2152,7 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
GC cgc = XCreateGC(d->dpy, comb, 0, 0);
XSetForeground(d->dpy, cgc, 0);
XFillRectangle(d->dpy, comb, cgc, 0, 0, sw, sh);
QVector<XRectangle> rects = qt_region_to_xrectangles(d->crgn);
QList<XRectangle> rects = qt_region_to_xrectangles(d->crgn);
XSetClipRectangles(d->dpy, cgc, -x, -y, rects.data(), rects.size(), Unsorted);
XCopyArea(d->dpy, qt_x11PixmapHandle(pixmap), comb, cgc, sx, sy, sw, sh, 0, 0);
XFreeGC(d->dpy, cgc);
@ -2201,7 +2201,7 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
if (restore_clip) {
XSetClipOrigin(d->dpy, d->gc, 0, 0);
QVector<XRectangle> rects = qt_region_to_xrectangles(d->crgn);
QList<XRectangle> rects = qt_region_to_xrectangles(d->crgn);
if (rects.isEmpty())
XSetClipMask(d->dpy, d->gc, XNone);
else

View File

@ -573,7 +573,7 @@ void QX11PlatformPixmap::fromImage(const QImage &img, Qt::ImageConversionFlags f
switch (cimage.format()) {
case QImage::Format_Indexed8: {
QVector<QRgb> colorTable = cimage.colorTable();
QList<QRgb> colorTable = cimage.colorTable();
uint *xidata = (uint *)xi->data;
for (int y = 0; y < h; ++y) {
const uchar *p = cimage.scanLine(y);
@ -676,7 +676,7 @@ void QX11PlatformPixmap::fromImage(const QImage &img, Qt::ImageConversionFlags f
const uint bbits = highest_bit(blue_mask) - lowest_bit(blue_mask) + 1;
if (d8) { // setup pixel translation
QVector<QRgb> ctable = cimage.colorTable();
QList<QRgb> ctable = cimage.colorTable();
for (int i=0; i < cimage.colorCount(); i++) {
int r = qRed (ctable[i]);
int g = qGreen(ctable[i]);
@ -1061,7 +1061,7 @@ void QX11PlatformPixmap::fromImage(const QImage &img, Qt::ImageConversionFlags f
int maxpop = 0;
int maxpix = 0;
uint j = 0;
QVector<QRgb> ctable = cimage.colorTable();
QList<QRgb> ctable = cimage.colorTable();
for (int i = 0; i < 256; i++) { // init pixel array
if (pop[i] > 0) {
px->r = qRed (ctable[i]);
@ -2114,7 +2114,7 @@ QImage QX11PlatformPixmap::toImage(const QXImageWrapper &xiWrapper, const QRect
} else {
image.setColorCount(ncols); // create color table
}
QVector<QColor> colors = QXcbColormap::instance(xinfo.screen()).colormap();
QList<QColor> colors = QXcbColormap::instance(xinfo.screen()).colormap();
int j = 0;
for (int i=0; i<colors.size(); i++) { // translate pixels
if (use[i])

View File

@ -110,11 +110,11 @@ void qt_xcb_native_x11_info_init(QXcbConnection *conn)
#endif // QT_CONFIG(xrender)
}
QVector<XRectangle> qt_region_to_xrectangles(const QRegion &r)
QList<XRectangle> qt_region_to_xrectangles(const QRegion &r)
{
const int numRects = r.rectCount();
const auto input = r.begin();
QVector<XRectangle> output(numRects);
QList<XRectangle> output(numRects);
for (int i = 0; i < numRects; ++i) {
const QRect &in = input[i];
XRectangle &out = output[i];

View File

@ -55,7 +55,7 @@ class QXcbConnection;
class QPixmap;
void qt_xcb_native_x11_info_init(QXcbConnection *conn);
QVector<XRectangle> qt_region_to_xrectangles(const QRegion &r);
QList<XRectangle> qt_region_to_xrectangles(const QRegion &r);
class QXcbX11InfoData;
class QXcbX11Info

View File

@ -131,7 +131,7 @@ protected:
(void)formats(); // trigger update of format list
QVector<xcb_atom_t> atoms;
QList<xcb_atom_t> atoms;
const xcb_atom_t *targets = (const xcb_atom_t *) format_atoms.data();
int size = format_atoms.size() / sizeof(xcb_atom_t);
atoms.reserve(size);
@ -445,10 +445,10 @@ xcb_window_t QXcbClipboard::owner() const
xcb_atom_t QXcbClipboard::sendTargetsSelection(QMimeData *d, xcb_window_t window, xcb_atom_t property)
{
QVector<xcb_atom_t> types;
QList<xcb_atom_t> types;
QStringList formats = QInternalMimeData::formatsHelper(d);
for (int i = 0; i < formats.size(); ++i) {
QVector<xcb_atom_t> atoms = QXcbMime::mimeAtomsForFormat(connection(), formats.at(i));
QList<xcb_atom_t> atoms = QXcbMime::mimeAtomsForFormat(connection(), formats.at(i));
for (int j = 0; j < atoms.size(); ++j) {
if (!types.contains(atoms.at(j)))
types.append(atoms.at(j));

View File

@ -49,7 +49,6 @@
#include "qxcbexport.h"
#include <QHash>
#include <QList>
#include <QVector>
#include <qpa/qwindowsysteminterface.h>
#include <QtCore/QLoggingCategory>
#include <QtCore/private/qglobal_p.h>
@ -277,7 +276,7 @@ private:
int number = -1;
QXcbAtom::Atom label;
};
QVector<ValuatorClassInfo> valuatorInfo;
QList<ValuatorClassInfo> valuatorInfo;
// Stuff that is relevant only for touchpads
QPointF firstPressedPosition; // in screen coordinates where the first point was pressed
@ -313,7 +312,7 @@ private:
friend class QTypeInfo<TabletData::ValuatorClassInfo>;
bool xi2HandleTabletEvent(const void *event, TabletData *tabletData);
void xi2ReportTabletEvent(const void *event, TabletData *tabletData);
QVector<TabletData> m_tabletData;
QList<TabletData> m_tabletData;
TabletData *tabletDataForDevice(int id);
#endif // QT_CONFIG(tabletevent)
// TODO get rid of this: store a smaller struct in QPointingDevicePrivate::extra
@ -378,7 +377,7 @@ private:
mutable QXcbGlIntegration *m_glIntegration = nullptr;
mutable bool m_glIntegrationInitialized = false;
bool m_xiGrab = false;
QVector<int> m_xiMasterPointerIds;
QList<int> m_xiMasterPointerIds;
xcb_window_t m_qtSelectionOwner = 0;

View File

@ -572,7 +572,7 @@ void QXcbConnection::xi2SelectDeviceEventsCompatibility(xcb_window_t window)
QSet<int> tabletDevices;
if (!m_tabletData.isEmpty()) {
const int nrTablets = m_tabletData.count();
QVector<qt_xcb_input_event_mask_t> xiEventMask(nrTablets);
QList<qt_xcb_input_event_mask_t> xiEventMask(nrTablets);
for (int i = 0; i < nrTablets; ++i) {
int deviceId = m_tabletData.at(i).deviceId;
tabletDevices.insert(deviceId);
@ -585,7 +585,7 @@ void QXcbConnection::xi2SelectDeviceEventsCompatibility(xcb_window_t window)
#endif
if (!m_scrollingDevices.isEmpty()) {
QVector<qt_xcb_input_event_mask_t> xiEventMask(m_scrollingDevices.size());
QList<qt_xcb_input_event_mask_t> xiEventMask(m_scrollingDevices.size());
int i = 0;
for (const ScrollingDevice& scrollingDevice : qAsConst(m_scrollingDevices)) {
#if QT_CONFIG(tabletevent)

View File

@ -182,7 +182,7 @@ void QXcbDrag::startDrag()
QStringList fmts = QXcbMime::formatsHelper(drag()->mimeData());
for (int i = 0; i < fmts.size(); ++i) {
QVector<xcb_atom_t> atoms = QXcbMime::mimeAtomsForFormat(connection(), fmts.at(i));
QList<xcb_atom_t> atoms = QXcbMime::mimeAtomsForFormat(connection(), fmts.at(i));
for (int j = 0; j < atoms.size(); ++j) {
if (!drag_types.contains(atoms.at(j)))
drag_types.append(atoms.at(j));
@ -580,7 +580,7 @@ Qt::DropAction QXcbDrag::toDropAction(xcb_atom_t a) const
return Qt::CopyAction;
}
Qt::DropActions QXcbDrag::toDropActions(const QVector<xcb_atom_t> &atoms) const
Qt::DropActions QXcbDrag::toDropActions(const QList<xcb_atom_t> &atoms) const
{
Qt::DropActions actions;
for (const auto actionAtom : atoms) {
@ -625,7 +625,7 @@ void QXcbDrag::readActionList()
void QXcbDrag::setActionList(Qt::DropAction requestedAction, Qt::DropActions supportedActions)
{
#ifndef QT_NO_CLIPBOARD
QVector<xcb_atom_t> actions;
QList<xcb_atom_t> actions;
if (requestedAction != Qt::IgnoreAction)
actions.append(toXdndAction(requestedAction));
@ -1361,7 +1361,7 @@ QVariant QXcbDropData::xdndObtainData(const QByteArray &format, QMetaType::Type
return result;
}
QVector<xcb_atom_t> atoms = drag->xdnd_types;
QList<xcb_atom_t> atoms = drag->xdnd_types;
bool hasUtf8 = false;
xcb_atom_t a = mimeAtomForFormat(c, QLatin1String(format), requestedType, atoms, &hasUtf8);
if (a == XCB_NONE)

View File

@ -42,16 +42,16 @@
#include <qpa/qplatformdrag.h>
#include <private/qsimpledrag_p.h>
#include <qxcbobject.h>
#include <xcb/xcb.h>
#include <qbackingstore.h>
#include <qdatetime.h>
#include <qlist.h>
#include <qpixmap.h>
#include <qpoint.h>
#include <qpointer.h>
#include <qrect.h>
#include <qsharedpointer.h>
#include <qpointer.h>
#include <qvector.h>
#include <qdatetime.h>
#include <qpixmap.h>
#include <qbackingstore.h>
#include <qxcbobject.h>
#include <QtCore/QDebug>
@ -118,7 +118,7 @@ private:
void send_leave();
Qt::DropAction toDropAction(xcb_atom_t atom) const;
Qt::DropActions toDropActions(const QVector<xcb_atom_t> &atoms) const;
Qt::DropActions toDropActions(const QList<xcb_atom_t> &atoms) const;
xcb_atom_t toXdndAction(Qt::DropAction a) const;
void readActionList();
@ -139,7 +139,7 @@ private:
// the types in this drop. 100 is no good, but at least it's big.
enum { xdnd_max_type = 100 };
QVector<xcb_atom_t> xdnd_types;
QList<xcb_atom_t> xdnd_types;
// timestamp from XdndPosition and XdndDroptime for retrieving the data
xcb_timestamp_t target_time;
@ -167,10 +167,10 @@ private:
enum { XdndDropTransactionTimeout = 600000 };
int cleanup_timer;
QVector<xcb_atom_t> drag_types;
QList<xcb_atom_t> drag_types;
QVector<xcb_atom_t> current_actions;
QVector<xcb_atom_t> drop_actions;
QList<xcb_atom_t> current_actions;
QList<xcb_atom_t> drop_actions;
struct Transaction
{
@ -183,7 +183,7 @@ private:
QTime time;
};
friend class QTypeInfo<Transaction>;
QVector<Transaction> transactions;
QList<Transaction> transactions;
int transaction_expiry_timer;
void restartDropExpiryTimer();

View File

@ -42,7 +42,7 @@
#include <QtCore/QThread>
#include <QtCore/QHash>
#include <QtCore/QEventLoop>
#include <QtCore/QVector>
#include <QtCore/QList>
#include <QtCore/QMutex>
#include <QtCore/QWaitCondition>
@ -132,7 +132,7 @@ private:
bool m_peekerIndexCacheDirty = false;
QHash<qint32, QXcbEventNode *> m_peekerToNode;
QVector<xcb_generic_event_t *> m_inputEvents;
QList<xcb_generic_event_t *> m_inputEvents;
// debug stats
quint64 m_nodesOnHeap = 0;

View File

@ -223,7 +223,7 @@ struct xkb_keymap *QXcbKeyboard::keymapFromCore(const KeysymModifierMap &keysymM
// Generate mapping between symbolic names and keysyms
{
QVector<xcb_keysym_t> xkeymap;
QList<xcb_keysym_t> xkeymap;
int keysymsPerKeycode = 0;
{
int keycodeCount = maxKeycode - minKeycode + 1;

View File

@ -129,9 +129,9 @@ bool QXcbMime::mimeDataForAtom(QXcbConnection *connection, xcb_atom_t a, QMimeDa
return ret;
}
QVector<xcb_atom_t> QXcbMime::mimeAtomsForFormat(QXcbConnection *connection, const QString &format)
QList<xcb_atom_t> QXcbMime::mimeAtomsForFormat(QXcbConnection *connection, const QString &format)
{
QVector<xcb_atom_t> atoms;
QList<xcb_atom_t> atoms;
atoms.reserve(7);
atoms.append(connection->internAtom(format.toLatin1()));
@ -256,7 +256,7 @@ QVariant QXcbMime::mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a,
}
xcb_atom_t QXcbMime::mimeAtomForFormat(QXcbConnection *connection, const QString &format, QMetaType::Type requestedType,
const QVector<xcb_atom_t> &atoms, bool *hasUtf8)
const QList<xcb_atom_t> &atoms, bool *hasUtf8)
{
*hasUtf8 = false;

View File

@ -55,14 +55,14 @@ public:
QXcbMime();
~QXcbMime();
static QVector<xcb_atom_t> mimeAtomsForFormat(QXcbConnection *connection, const QString &format);
static QList<xcb_atom_t> mimeAtomsForFormat(QXcbConnection *connection, const QString &format);
static QString mimeAtomToString(QXcbConnection *connection, xcb_atom_t a);
static bool mimeDataForAtom(QXcbConnection *connection, xcb_atom_t a, QMimeData *mimeData, QByteArray *data,
xcb_atom_t *atomFormat, int *dataFormat);
static QVariant mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a, const QByteArray &data, const QString &format,
QMetaType::Type requestedType, bool hasUtf8);
static xcb_atom_t mimeAtomForFormat(QXcbConnection *connection, const QString &format, QMetaType::Type requestedType,
const QVector<xcb_atom_t> &atoms, bool *hasUtf8);
const QList<xcb_atom_t> &atoms, bool *hasUtf8);
};
QT_END_NAMESPACE

View File

@ -632,7 +632,7 @@ QMargins QXcbWindow::frameMargins() const
bool foundRoot = false;
const QVector<xcb_window_t> &virtualRoots =
const QList<xcb_window_t> &virtualRoots =
connection()->wmSupport()->virtualRoots();
while (!foundRoot) {
@ -1086,7 +1086,7 @@ void QXcbWindow::setNetWmStateOnUnmappedWindow()
// we first read it and then merge our hints with the existing values, allowing a user
// to set custom hints.
QVector<xcb_atom_t> atoms;
QList<xcb_atom_t> atoms;
auto reply = Q_XCB_REPLY_UNCHECKED(xcb_get_property, xcb_connection(),
0, m_window, atom(QXcbAtom::_NET_WM_STATE),
XCB_ATOM_ATOM, 0, 1024);
@ -1293,7 +1293,7 @@ void QXcbWindow::setWindowIconText(const QString &title)
void QXcbWindow::setWindowIcon(const QIcon &icon)
{
QVector<quint32> icon_data;
QList<quint32> icon_data;
if (!icon.isNull()) {
QList<QSize> availableSizes = icon.availableSizes();
if (availableSizes.isEmpty()) {
@ -1542,7 +1542,7 @@ QXcbWindowFunctions::WmWindowTypes QXcbWindow::wmWindowTypes() const
void QXcbWindow::setWmWindowType(QXcbWindowFunctions::WmWindowTypes types, Qt::WindowFlags flags)
{
QVector<xcb_atom_t> atoms;
QList<xcb_atom_t> atoms;
// manual selection 1 (these are never set by Qt and take precedence)
if (types & QXcbWindowFunctions::Normal)
@ -2526,9 +2526,9 @@ void QXcbWindow::setOpacity(qreal level)
(uchar *)&value);
}
QVector<xcb_rectangle_t> qRegionToXcbRectangleList(const QRegion &region)
QList<xcb_rectangle_t> qRegionToXcbRectangleList(const QRegion &region)
{
QVector<xcb_rectangle_t> rects;
QList<xcb_rectangle_t> rects;
rects.reserve(region.rectCount());
for (const QRect &r : region)
rects.push_back(qRectToXCBRectangle(r));

View File

@ -296,7 +296,7 @@ protected:
void create() override {} // No-op
};
QVector<xcb_rectangle_t> qRegionToXcbRectangleList(const QRegion &region);
QList<xcb_rectangle_t> qRegionToXcbRectangleList(const QRegion &region);
QT_END_NAMESPACE

View File

@ -41,7 +41,7 @@
#include "qxcbobject.h"
#include "qxcbconnection.h"
#include <qvector.h>
#include <qlist.h>
QT_BEGIN_NAMESPACE
@ -52,15 +52,15 @@ public:
bool isSupportedByWM(xcb_atom_t atom) const;
const QVector<xcb_window_t> &virtualRoots() const { return net_virtual_roots; }
const QList<xcb_window_t> &virtualRoots() const { return net_virtual_roots; }
private:
friend class QXcbConnection;
void updateNetWMAtoms();
void updateVirtualRoots();
QVector<xcb_atom_t> net_wm_atoms;
QVector<xcb_window_t> net_virtual_roots;
QList<xcb_atom_t> net_wm_atoms;
QList<xcb_window_t> net_virtual_roots;
};
QT_END_NAMESPACE

View File

@ -156,7 +156,7 @@ protected:
private:
GtkWidget *m_menu;
QPoint m_targetPos;
QVector<QGtk3MenuItem *> m_items;
QList<QGtk3MenuItem *> m_items;
};
QT_END_NAMESPACE

View File

@ -40,7 +40,7 @@
#define QXDGDESKTOPPORTALFILEDIALOG_P_H
#include <qpa/qplatformdialoghelper.h>
#include <QVector>
#include <QList>
QT_BEGIN_NAMESPACE
@ -61,13 +61,13 @@ public:
ConditionType type;
QString pattern; // E.g. '*ico' or 'image/png'
};
typedef QVector<FilterCondition> FilterConditionList;
typedef QList<FilterCondition> FilterConditionList;
struct Filter {
QString name; // E.g. 'Images' or 'Text
FilterConditionList filterConditions;; // E.g. [(0, '*.ico'), (1, 'image/png')] or [(0, '*.txt')]
};
typedef QVector<Filter> FilterList;
typedef QList<Filter> FilterList;
QXdgDesktopPortalFileDialog(QPlatformFileDialogHelper *nativeFileDialog = nullptr);
~QXdgDesktopPortalFileDialog();

View File

@ -201,7 +201,7 @@ void QCupsPrintEnginePrivate::closePrintDevice()
// Set up print options.
QList<QPair<QByteArray, QByteArray> > options;
QVector<cups_option_t> cupsOptStruct;
QList<cups_option_t> cupsOptStruct;
options.append(QPair<QByteArray, QByteArray>("media", m_pageLayout.pageSize().key().toLocal8Bit()));

View File

@ -49,7 +49,7 @@
QT_BEGIN_NAMESPACE
QT_WARNING_DISABLE_GCC("-Wsign-compare")
typedef QVector<QWindowsPrinterInfo> WindowsPrinterLookup;
typedef QList<QWindowsPrinterInfo> WindowsPrinterLookup;
Q_GLOBAL_STATIC(WindowsPrinterLookup, windowsDeviceLookup);
extern qreal qt_pointMultiplier(QPageLayout::Unit unit);

View File

@ -75,10 +75,10 @@ public:
QString m_makeAndModel;
QList<QPageSize> m_pageSizes;
QList<int> m_resolutions;
QVector<QPrint::InputSlot> m_inputSlots;
QVector<QPrint::OutputBin> m_outputBins;
QVector<QPrint::DuplexMode> m_duplexModes;
QVector<QPrint::ColorMode> m_colorModes;
QList<QPrint::InputSlot> m_inputSlots;
QList<QPrint::OutputBin> m_outputBins;
QList<QPrint::DuplexMode> m_duplexModes;
QList<QPrint::ColorMode> m_colorModes;
QSize m_minimumPhysicalPageSize;
QSize m_maximumPhysicalPageSize;
bool m_isRemote = false;

View File

@ -40,13 +40,13 @@
#include "qsql_db2_p.h"
#include <qcoreapplication.h>
#include <qdatetime.h>
#include <qsqlfield.h>
#include <qlist.h>
#include <qsqlerror.h>
#include <qsqlfield.h>
#include <qsqlindex.h>
#include <qsqlrecord.h>
#include <qstringlist.h>
#include <qvarlengtharray.h>
#include <qvector.h>
#include <QDebug>
#include <QtSql/private/qsqldriver_p.h>
#include <QtSql/private/qsqlresult_p.h>
@ -141,7 +141,7 @@ public:
SQLHANDLE hStmt;
QSqlRecord recInf;
QVector<QVariant*> valueCache;
QList<QVariant*> valueCache;
};
static QString qFromTChar(SQLTCHAR* str)
@ -692,7 +692,7 @@ bool QDB2Result::exec()
return false;
QVector<QVariant> &values = boundValues();
QList<QVariant> &values = boundValues();
int i;
for (i = 0; i < values.count(); ++i) {
// bind parameters - only positional binding allowed

View File

@ -41,20 +41,19 @@
#include <qcoreapplication.h>
#include <qdatetime.h>
#include <qdeadlinetimer.h>
#include <qvariant.h>
#include <qdebug.h>
#include <qlist.h>
#include <qmutex.h>
#include <qsqlerror.h>
#include <qsqlfield.h>
#include <qsqlindex.h>
#include <qsqlquery.h>
#include <qvariant.h>
#include <QtSql/private/qsqlcachedresult_p.h>
#include <QtSql/private/qsqldriver_p.h>
#include <qlist.h>
#include <qvector.h>
#include <qmutex.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <qdebug.h>
#include <QVarLengthArray>
QT_BEGIN_NAMESPACE
@ -968,7 +967,7 @@ bool QIBaseResult::exec()
setAt(QSql::BeforeFirstRow);
if (d->inda) {
QVector<QVariant>& values = boundValues();
QList<QVariant>& values = boundValues();
int i;
if (values.count() > d->inda->sqld) {
qWarning("QIBaseResult::exec: Parameter mismatch, expected %d, got %d parameters",

View File

@ -42,15 +42,15 @@
#include <qcoreapplication.h>
#include <qvariant.h>
#include <qdatetime.h>
#include <qdebug.h>
#include <qfile.h>
#include <qlist.h>
#include <qsqlerror.h>
#include <qsqlfield.h>
#include <qsqlindex.h>
#include <qsqlquery.h>
#include <qsqlrecord.h>
#include <qstringlist.h>
#include <qvector.h>
#include <qfile.h>
#include <qdebug.h>
#include <QtSql/private/qsqldriver_p.h>
#include <QtSql/private/qsqlresult_p.h>
@ -178,7 +178,7 @@ public:
ulong bufLength = 0ul;
};
QVector<QMyField> fields;
QList<QMyField> fields;
MYSQL_STMT *stmt = nullptr;
MYSQL_RES *meta = nullptr;
@ -882,11 +882,11 @@ bool QMYSQLResult::exec()
int r = 0;
MYSQL_BIND* currBind;
QVector<MYSQL_TIME *> timeVector;
QVector<QByteArray> stringVector;
QVector<my_bool> nullVector;
QList<MYSQL_TIME *> timeVector;
QList<QByteArray> stringVector;
QList<my_bool> nullVector;
const QVector<QVariant> values = boundValues();
const QList<QVariant> values = boundValues();
r = mysql_stmt_reset(d->stmt);
if (r != 0) {

View File

@ -40,8 +40,9 @@
#include "qsql_oci_p.h"
#include <qcoreapplication.h>
#include <qvariant.h>
#include <qdatetime.h>
#include <qdebug.h>
#include <qlist.h>
#include <qmetatype.h>
#if QT_CONFIG(regularexpression)
#include <qregularexpression.h>
@ -54,10 +55,9 @@
#include <QtSql/private/qsqlcachedresult_p.h>
#include <QtSql/private/qsqldriver_p.h>
#include <qstringlist.h>
#include <qvarlengtharray.h>
#include <qvector.h>
#include <qdebug.h>
#include <qtimezone.h>
#include <qvariant.h>
#include <qvarlengtharray.h>
// This is needed for oracle oci when compiling with mingw-w64 headers
#if defined(__MINGW64_VERSION_MAJOR) && defined(_WIN64)
@ -283,9 +283,9 @@ public:
void setStatementAttributes();
int bindValue(OCIStmt *sql, OCIBind **hbnd, OCIError *err, int pos,
const QVariant &val, dvoid *indPtr, ub2 *tmpSize, TempStorage &tmpStorage);
int bindValues(QVector<QVariant> &values, IndicatorArray &indicators, SizeArray &tmpSizes,
int bindValues(QVariantList &values, IndicatorArray &indicators, SizeArray &tmpSizes,
TempStorage &tmpStorage);
void outValues(QVector<QVariant> &values, IndicatorArray &indicators,
void outValues(QVariantList &values, IndicatorArray &indicators,
TempStorage &tmpStorage);
inline bool isOutValue(int i) const
{ Q_Q(const QOCIResult); return q->bindValueType(i) & QSql::Out; }
@ -502,7 +502,7 @@ int QOCIResultPrivate::bindValue(OCIStmt *sql, OCIBind **hbnd, OCIError *err, in
return r;
}
int QOCIResultPrivate::bindValues(QVector<QVariant> &values, IndicatorArray &indicators,
int QOCIResultPrivate::bindValues(QVariantList &values, IndicatorArray &indicators,
SizeArray &tmpSizes, TempStorage &tmpStorage)
{
int r = OCI_SUCCESS;
@ -551,7 +551,7 @@ static void qOraOutValue(QVariant &value, TempStorage &tmpStorage, OCIEnv *env,
}
}
void QOCIResultPrivate::outValues(QVector<QVariant> &values, IndicatorArray &indicators,
void QOCIResultPrivate::outValues(QVariantList &values, IndicatorArray &indicators,
TempStorage &tmpStorage)
{
for (int i = 0; i < values.count(); ++i) {
@ -835,12 +835,12 @@ class QOCICols
public:
QOCICols(int size, QOCIResultPrivate* dp);
~QOCICols();
int readPiecewise(QVector<QVariant> &values, int index = 0);
int readLOBs(QVector<QVariant> &values, int index = 0);
int readPiecewise(QVariantList &values, int index = 0);
int readLOBs(QVariantList &values, int index = 0);
int fieldFromDefine(OCIDefine* d);
void getValues(QVector<QVariant> &v, int index);
void getValues(QVariantList &v, int index);
inline int size() { return fieldInf.size(); }
static bool execBatch(QOCIResultPrivate *d, QVector<QVariant> &boundValues, bool arrayBind);
static bool execBatch(QOCIResultPrivate *d, QVariantList &boundValues, bool arrayBind);
QSqlRecord rec;
@ -865,7 +865,7 @@ private:
void *dataPtr;
};
QVector<OraFieldInf> fieldInf;
QList<OraFieldInf> fieldInf;
const QOCIResultPrivate *const d;
};
@ -1116,7 +1116,7 @@ OCILobLocator **QOCICols::createLobLocator(int position, OCIEnv* env)
return &lob;
}
int QOCICols::readPiecewise(QVector<QVariant> &values, int index)
int QOCICols::readPiecewise(QVariantList &values, int index)
{
OCIDefine* dfn;
ub4 typep;
@ -1328,7 +1328,7 @@ struct QOCIBatchColumn
struct QOCIBatchCleanupHandler
{
inline QOCIBatchCleanupHandler(QVector<QOCIBatchColumn> &columns)
inline QOCIBatchCleanupHandler(QList<QOCIBatchColumn> &columns)
: col(columns) {}
~QOCIBatchCleanupHandler()
@ -1341,10 +1341,10 @@ struct QOCIBatchCleanupHandler
}
}
QVector<QOCIBatchColumn> &col;
QList<QOCIBatchColumn> &col;
};
bool QOCICols::execBatch(QOCIResultPrivate *d, QVector<QVariant> &boundValues, bool arrayBind)
bool QOCICols::execBatch(QOCIResultPrivate *d, QVariantList &boundValues, bool arrayBind)
{
int columnCount = boundValues.count();
if (boundValues.isEmpty() || columnCount == 0)
@ -1364,7 +1364,7 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVector<QVariant> &boundValues, b
: tp);
}
SizeArray tmpSizes(columnCount);
QVector<QOCIBatchColumn> columns(columnCount);
QList<QOCIBatchColumn> columns(columnCount);
QOCIBatchCleanupHandler cleaner(columns);
TempStorage tmpStorage;
@ -1612,7 +1612,7 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVector<QVariant> &boundValues, b
return false;
}
// for out parameters we copy data back to value vector
// for out parameters we copy data back to value list
for (i = 0; i < columnCount; ++i) {
if (!d->isOutValue(i))
@ -1739,7 +1739,7 @@ int qReadLob(T &buf, const QOCIResultPrivate *d, OCILobLocator *lob)
return r;
}
int QOCICols::readLOBs(QVector<QVariant> &values, int index)
int QOCICols::readLOBs(QVariantList &values, int index)
{
OCILobLocator *lob;
int r = OCI_SUCCESS;
@ -1778,7 +1778,7 @@ int QOCICols::fieldFromDefine(OCIDefine* d)
return -1;
}
void QOCICols::getValues(QVector<QVariant> &v, int index)
void QOCICols::getValues(QVariantList &v, int index)
{
for (int i = 0; i < fieldInf.size(); ++i) {
const OraFieldInf &fld = fieldInf.at(i);

View File

@ -44,15 +44,15 @@
#include <qt_windows.h>
#endif
#include <qcoreapplication.h>
#include <qvariant.h>
#include <qdatetime.h>
#include <qlist.h>
#include <qmath.h>
#include <qsqlerror.h>
#include <qsqlfield.h>
#include <qsqlindex.h>
#include <qstringlist.h>
#include <qvariant.h>
#include <qvarlengtharray.h>
#include <qvector.h>
#include <qmath.h>
#include <QDebug>
#include <QSqlQuery>
#include <QtSql/private/qsqldriver_p.h>
@ -206,7 +206,7 @@ public:
SQLHANDLE hStmt = nullptr;
QSqlRecord rInf;
QVector<QVariant> fieldCache;
QVariantList fieldCache;
int fieldCacheIdx = 0;
int disconnectCount = 0;
bool hasSQLFetchScroll = true;
@ -1399,8 +1399,8 @@ bool QODBCResult::exec()
if (isSelect())
SQLCloseCursor(d->hStmt);
QVector<QVariant>& values = boundValues();
QVector<QByteArray> tmpStorage(values.count(), QByteArray()); // holds temporary buffers
QVariantList &values = boundValues();
QByteArrayList tmpStorage(values.count(), QByteArray()); // holds temporary buffers
QVarLengthArray<SQLLEN, 32> indicators(values.count());
memset(indicators.data(), 0, indicators.size() * sizeof(SQLLEN));

View File

@ -848,7 +848,7 @@ void QPSQLResult::virtual_hook(int id, void *data)
QSqlResult::virtual_hook(id, data);
}
static QString qCreateParamString(const QVector<QVariant> &boundValues, const QSqlDriver *driver)
static QString qCreateParamString(const QList<QVariant> &boundValues, const QSqlDriver *driver)
{
if (boundValues.isEmpty())
return QString();

View File

@ -41,7 +41,8 @@
#include <qcoreapplication.h>
#include <qdatetime.h>
#include <qvariant.h>
#include <qdebug.h>
#include <qlist.h>
#include <qsqlerror.h>
#include <qsqlfield.h>
#include <qsqlindex.h>
@ -49,8 +50,7 @@
#include <QtSql/private/qsqlcachedresult_p.h>
#include <QtSql/private/qsqldriver_p.h>
#include <qstringlist.h>
#include <qvector.h>
#include <qdebug.h>
#include <qvariant.h>
#if QT_CONFIG(regularexpression)
#include <qcache.h>
#include <qregularexpression.h>
@ -146,7 +146,7 @@ class QSQLiteDriverPrivate : public QSqlDriverPrivate
public:
inline QSQLiteDriverPrivate() : QSqlDriverPrivate(QSqlDriver::SQLite) {}
sqlite3 *access = nullptr;
QVector<QSQLiteResult *> results;
QList<QSQLiteResult *> results;
QStringList notificationid;
};
@ -166,7 +166,7 @@ public:
sqlite3_stmt *stmt = nullptr;
QSqlRecord rInf;
QVector<QVariant> firstRow;
QList<QVariant> firstRow;
bool skippedStatus = false; // the status of the fetchNext() that's skipped
bool skipRow = false; // skip the next fetchNext()?
};
@ -413,15 +413,15 @@ bool QSQLiteResult::execBatch(bool arrayBind)
{
Q_UNUSED(arrayBind);
Q_D(QSqlResult);
QScopedValueRollback<QVector<QVariant>> valuesScope(d->values);
QVector<QVariant> values = d->values;
QScopedValueRollback<QList<QVariant>> valuesScope(d->values);
QList<QVariant> values = d->values;
if (values.count() == 0)
return false;
for (int i = 0; i < values.at(0).toList().count(); ++i) {
d->values.clear();
QScopedValueRollback<QHash<QString, QVector<int>>> indexesScope(d->indexes);
QHash<QString, QVector<int>>::const_iterator it = d->indexes.constBegin();
QScopedValueRollback<QHash<QString, QList<int>>> indexesScope(d->indexes);
auto it = d->indexes.constBegin();
while (it != d->indexes.constEnd()) {
bindValue(it.key(), values.at(it.value().first()).toList().at(i), QSql::In);
++it;
@ -435,7 +435,7 @@ bool QSQLiteResult::execBatch(bool arrayBind)
bool QSQLiteResult::exec()
{
Q_D(QSQLiteResult);
QVector<QVariant> values = boundValues();
QList<QVariant> values = boundValues();
d->skippedStatus = false;
d->skipRow = false;
@ -460,7 +460,7 @@ bool QSQLiteResult::exec()
// can end up in a case where for virtual tables it returns 0 even though it
// has parameters
if (paramCount >= 1 && paramCount < values.count()) {
const auto countIndexes = [](int counter, const QVector<int> &indexList) {
const auto countIndexes = [](int counter, const QList<int> &indexList) {
return counter + indexList.length();
};
@ -471,10 +471,10 @@ bool QSQLiteResult::exec()
paramCountIsValid = bindParamCount == values.count();
// When using named placeholders, it will reuse the index for duplicated
// placeholders. So we need to ensure the QVector has only one instance of
// placeholders. So we need to ensure the QList has only one instance of
// each value as SQLite will do the rest for us.
QVector<QVariant> prunedValues;
QVector<int> handledIndexes;
QList<QVariant> prunedValues;
QList<int> handledIndexes;
for (int i = 0, currentIndex = 0; i < values.size(); ++i) {
if (handledIndexes.contains(i))
continue;

View File

@ -845,7 +845,7 @@ int QAndroidStyle::Android9PatchDrawable::calculateStretch(int boundsLimit,
}
void QAndroidStyle::Android9PatchDrawable::extractIntArray(const QVariantList &values,
QVector<int> & array)
QList<int> & array)
{
for (const QVariant &value : values)
array << value.toInt();

View File

@ -89,9 +89,9 @@ public:
struct Android9PatchChunk
{
QVector<int> xDivs;
QVector<int> yDivs;
QVector<int> colors;
QList<int> xDivs;
QList<int> yDivs;
QList<int> colors;
};
struct AndroidItemStateInfo
@ -169,7 +169,7 @@ public:
static int calculateStretch(int boundsLimit, int startingPoint,
int srcSpace, int numStrechyPixelsRemaining,
int numFixedPixelsRemaining);
void extractIntArray(const QVariantList &values, QVector<int> &array);
void extractIntArray(const QVariantList &values, QList<int> &array);
private:
Android9PatchChunk m_chunkData;
};

View File

@ -45,12 +45,12 @@
#include <QtCore/qdebug.h>
#include <QtCore/qhash.h>
#include <QtCore/qlist.h>
#include <QtCore/qmap.h>
#include <QtCore/qmath.h>
#include <QtCore/qpair.h>
#include <QtCore/qpointer.h>
#include <QtCore/qtextstream.h>
#include <QtCore/qvector.h>
#include <QtGui/private/qpainter_p.h>
@ -291,7 +291,7 @@ public:
public:
mutable QPointer<QObject> autoDefaultButton;
static QVector<QPointer<QObject> > scrollBars;
static QList<QPointer<QObject> > scrollBars;
mutable QPointer<QFocusFrame> focusWidget;
mutable NSView *backingStoreNSView;