Use QList instead of QVector in platformsupport
Task-number: QTBUG-84469 Change-Id: I8e4e6626cc840bc9c8bce014c595da9080025dd8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
75deec3462
commit
23b7e7972e
@ -1495,7 +1495,7 @@ QStringList AtSpiAdaptor::accessibleInterfaces(QAccessibleInterface *interface)
|
||||
QSpiRelationArray AtSpiAdaptor::relationSet(QAccessibleInterface *interface, const QDBusConnection &connection) const
|
||||
{
|
||||
typedef QPair<QAccessibleInterface*, QAccessible::Relation> RelationPair;
|
||||
const QVector<RelationPair> relationInterfaces = interface->relations();
|
||||
const QList<RelationPair> relationInterfaces = interface->relations();
|
||||
|
||||
QSpiRelationArray relations;
|
||||
for (const RelationPair &pair : relationInterfaces) {
|
||||
|
@ -53,7 +53,7 @@
|
||||
//
|
||||
|
||||
#include <QtGui/private/qtguiglobal_p.h>
|
||||
#include <QtCore/qvector.h>
|
||||
#include <QtCore/qlist.h>
|
||||
#include <QtCore/qpair.h>
|
||||
#include <QtDBus/QDBusArgument>
|
||||
#include <QtDBus/QDBusConnection>
|
||||
@ -63,8 +63,8 @@ QT_REQUIRE_CONFIG(accessibility);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
typedef QVector<int> QSpiIntList;
|
||||
typedef QVector<uint> QSpiUIntList;
|
||||
using QSpiIntList = QList<int>;
|
||||
using QSpiUIntList = QList<uint>;
|
||||
|
||||
// FIXME: make this copy on write
|
||||
struct QSpiObjectReference
|
||||
@ -82,7 +82,7 @@ Q_DECLARE_TYPEINFO(QSpiObjectReference, Q_MOVABLE_TYPE); // QDBusObjectPath is m
|
||||
QDBusArgument &operator<<(QDBusArgument &argument, const QSpiObjectReference &address);
|
||||
const QDBusArgument &operator>>(const QDBusArgument &argument, QSpiObjectReference &address);
|
||||
|
||||
typedef QVector<QSpiObjectReference> QSpiObjectReferenceArray;
|
||||
typedef QList<QSpiObjectReference> QSpiObjectReferenceArray;
|
||||
|
||||
struct QSpiAccessibleCacheItem
|
||||
{
|
||||
@ -98,7 +98,7 @@ struct QSpiAccessibleCacheItem
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QSpiAccessibleCacheItem, Q_MOVABLE_TYPE);
|
||||
|
||||
typedef QVector<QSpiAccessibleCacheItem> QSpiAccessibleCacheArray;
|
||||
typedef QList<QSpiAccessibleCacheItem> QSpiAccessibleCacheArray;
|
||||
|
||||
QDBusArgument &operator<<(QDBusArgument &argument, const QSpiAccessibleCacheItem &item);
|
||||
const QDBusArgument &operator>>(const QDBusArgument &argument, QSpiAccessibleCacheItem &item);
|
||||
@ -111,7 +111,7 @@ struct QSpiAction
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QSpiAction, Q_MOVABLE_TYPE);
|
||||
|
||||
typedef QVector<QSpiAction> QSpiActionArray;
|
||||
typedef QList<QSpiAction> QSpiActionArray;
|
||||
|
||||
QDBusArgument &operator<<(QDBusArgument &argument, const QSpiAction &action);
|
||||
const QDBusArgument &operator>>(const QDBusArgument &argument, QSpiAction &action);
|
||||
@ -123,13 +123,13 @@ struct QSpiEventListener
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QSpiEventListener, Q_MOVABLE_TYPE);
|
||||
|
||||
typedef QVector<QSpiEventListener> QSpiEventListenerArray;
|
||||
typedef QList<QSpiEventListener> QSpiEventListenerArray;
|
||||
|
||||
QDBusArgument &operator<<(QDBusArgument &argument, const QSpiEventListener &action);
|
||||
const QDBusArgument &operator>>(const QDBusArgument &argument, QSpiEventListener &action);
|
||||
|
||||
typedef QPair<unsigned int, QSpiObjectReferenceArray> QSpiRelationArrayEntry;
|
||||
typedef QVector<QSpiRelationArrayEntry> QSpiRelationArray;
|
||||
typedef QList<QSpiRelationArrayEntry> QSpiRelationArray;
|
||||
|
||||
//a(iisv)
|
||||
struct QSpiTextRange {
|
||||
@ -140,7 +140,7 @@ struct QSpiTextRange {
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QSpiTextRange, Q_MOVABLE_TYPE);
|
||||
|
||||
typedef QVector<QSpiTextRange> QSpiTextRangeList;
|
||||
typedef QList<QSpiTextRange> QSpiTextRangeList;
|
||||
typedef QMap <QString, QString> QSpiAttributeSet;
|
||||
|
||||
enum QSpiAppUpdateType {
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QVector<EGLint> q_createConfigAttributesFromFormat(const QSurfaceFormat &format)
|
||||
QList<EGLint> q_createConfigAttributesFromFormat(const QSurfaceFormat &format)
|
||||
{
|
||||
int redSize = format.redBufferSize();
|
||||
int greenSize = format.greenBufferSize();
|
||||
@ -64,7 +64,7 @@ QVector<EGLint> q_createConfigAttributesFromFormat(const QSurfaceFormat &format)
|
||||
int stencilSize = format.stencilBufferSize();
|
||||
int sampleCount = format.samples();
|
||||
|
||||
QVector<EGLint> configAttributes;
|
||||
QList<EGLint> configAttributes;
|
||||
|
||||
// Map default, unspecified values (-1) to 0. This is important due to sorting rule #3
|
||||
// in section 3.4.1 of the spec and allows picking a potentially faster 16-bit config
|
||||
@ -121,7 +121,7 @@ QVector<EGLint> q_createConfigAttributesFromFormat(const QSurfaceFormat &format)
|
||||
return configAttributes;
|
||||
}
|
||||
|
||||
bool q_reduceConfigAttributes(QVector<EGLint> *configAttributes)
|
||||
bool q_reduceConfigAttributes(QList<EGLint> *configAttributes)
|
||||
{
|
||||
int i = -1;
|
||||
// Reduce the complexity of a configuration request to ask for less
|
||||
@ -240,7 +240,7 @@ QEglConfigChooser::~QEglConfigChooser()
|
||||
|
||||
EGLConfig QEglConfigChooser::chooseConfig()
|
||||
{
|
||||
QVector<EGLint> configureAttributes = q_createConfigAttributesFromFormat(m_format);
|
||||
QList<EGLint> configureAttributes = q_createConfigAttributesFromFormat(m_format);
|
||||
configureAttributes.append(EGL_SURFACE_TYPE);
|
||||
configureAttributes.append(surfaceType());
|
||||
|
||||
@ -299,7 +299,7 @@ EGLConfig QEglConfigChooser::chooseConfig()
|
||||
i = configureAttributes.indexOf(EGL_ALPHA_SIZE);
|
||||
m_confAttrAlpha = i == -1 ? 0 : configureAttributes.at(i+1);
|
||||
|
||||
QVector<EGLConfig> configs(matching);
|
||||
QList<EGLConfig> configs(matching);
|
||||
eglChooseConfig(display(), configureAttributes.constData(), configs.data(), configs.size(), &matching);
|
||||
if (!cfg && matching > 0)
|
||||
cfg = configs.first();
|
||||
|
@ -52,14 +52,14 @@
|
||||
//
|
||||
|
||||
#include <QtGui/QSurfaceFormat>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QSizeF>
|
||||
#include <QtEglSupport/private/qt_egl_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QVector<EGLint> q_createConfigAttributesFromFormat(const QSurfaceFormat &format);
|
||||
bool q_reduceConfigAttributes(QVector<EGLint> *configAttributes);
|
||||
QList<EGLint> q_createConfigAttributesFromFormat(const QSurfaceFormat &format);
|
||||
bool q_reduceConfigAttributes(QList<EGLint> *configAttributes);
|
||||
EGLConfig q_configFromGLFormat(EGLDisplay display, const QSurfaceFormat &format, bool highestPixelFormat = false, int surfaceType = EGL_WINDOW_BIT);
|
||||
QSurfaceFormat q_glFormatFromConfig(EGLDisplay display, const EGLConfig config, const QSurfaceFormat &referenceFormat = QSurfaceFormat());
|
||||
bool q_hasEglExtension(EGLDisplay display,const char* extensionName);
|
||||
|
@ -126,7 +126,7 @@ QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatform
|
||||
// but does not yet contain version, profile, options.
|
||||
m_shareContext = share ? static_cast<QEGLPlatformContext *>(share)->m_eglContext : nullptr;
|
||||
|
||||
QVector<EGLint> contextAttrs;
|
||||
QList<EGLint> contextAttrs;
|
||||
contextAttrs.append(EGL_CONTEXT_CLIENT_VERSION);
|
||||
contextAttrs.append(format.majorVersion());
|
||||
const bool hasKHRCreateContext = q_hasEglExtension(m_eglDisplay, "EGL_KHR_create_context");
|
||||
|
@ -135,7 +135,7 @@ private:
|
||||
int m_swapIntervalFromEnv = -1;
|
||||
Flags m_flags;
|
||||
bool m_ownsContext = false;
|
||||
QVector<EGLint> m_contextAttrs;
|
||||
QList<EGLint> m_contextAttrs;
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QEGLPlatformContext::Flags)
|
||||
|
@ -46,8 +46,8 @@
|
||||
#include <QtCore/qtextstream.h>
|
||||
#include "qglxconvenience_p.h"
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QLoggingCategory>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QVarLengthArray>
|
||||
|
||||
#include <GL/glxext.h>
|
||||
@ -81,9 +81,9 @@ enum {
|
||||
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2
|
||||
#endif
|
||||
|
||||
QVector<int> qglx_buildSpec(const QSurfaceFormat &format, int drawableBit, int flags)
|
||||
QList<int> qglx_buildSpec(const QSurfaceFormat &format, int drawableBit, int flags)
|
||||
{
|
||||
QVector<int> spec;
|
||||
QList<int> spec;
|
||||
|
||||
spec << GLX_LEVEL
|
||||
<< 0
|
||||
@ -196,7 +196,7 @@ GLXFBConfig qglx_findConfig(Display *display, int screen , QSurfaceFormat format
|
||||
GLXFBConfig config = nullptr;
|
||||
|
||||
do {
|
||||
const QVector<int> spec = qglx_buildSpec(format, drawableBit, flags);
|
||||
const QList<int> spec = qglx_buildSpec(format, drawableBit, flags);
|
||||
|
||||
int confcount = 0;
|
||||
QXlibArrayPointer<GLXFBConfig> configs(glXChooseFBConfig(display, screen, spec.constData(), &confcount));
|
||||
@ -288,7 +288,7 @@ XVisualInfo *qglx_findVisualInfo(Display *display, int screen, QSurfaceFormat *f
|
||||
|
||||
// attempt to fall back to glXChooseVisual
|
||||
do {
|
||||
QVector<int> attribs = qglx_buildSpec(*format, drawableBit, flags);
|
||||
QList<int> attribs = qglx_buildSpec(*format, drawableBit, flags);
|
||||
visualInfo = glXChooseVisual(display, screen, attribs.data());
|
||||
|
||||
if (visualInfo) {
|
||||
|
@ -51,8 +51,8 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QList>
|
||||
#include <QSurfaceFormat>
|
||||
#include <QVector>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <GL/glx.h>
|
||||
@ -62,7 +62,7 @@ enum QGlxFlags
|
||||
QGLX_SUPPORTS_SRGB = 0x01
|
||||
};
|
||||
|
||||
QVector<int> qglx_buildSpec(const QSurfaceFormat &format, int drawableBit = GLX_WINDOW_BIT, int flags = 0);
|
||||
QList<int> qglx_buildSpec(const QSurfaceFormat &format, int drawableBit = GLX_WINDOW_BIT, int flags = 0);
|
||||
XVisualInfo *qglx_findVisualInfo(Display *display, int screen, QSurfaceFormat *format, int drawableBit = GLX_WINDOW_BIT, int flags = 0);
|
||||
GLXFBConfig qglx_findConfig(Display *display, int screen, QSurfaceFormat format, bool highestPixelFormat = false, int drawableBit = GLX_WINDOW_BIT, int flags = 0);
|
||||
void qglx_surfaceFormatFromGLXFBConfig(QSurfaceFormat *format, Display *display, GLXFBConfig config, int flags = 0);
|
||||
|
@ -51,9 +51,9 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QVector>
|
||||
#include <QStringView>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -64,7 +64,7 @@ struct ParsedSpecification
|
||||
{
|
||||
QString spec;
|
||||
QStringList devices;
|
||||
QVector<QStringView> args;
|
||||
QList<QStringView> args;
|
||||
};
|
||||
|
||||
ParsedSpecification parseSpecification(const QString &specification);
|
||||
|
@ -664,7 +664,7 @@ void QKmsDevice::createScreens()
|
||||
|
||||
discoverPlanes();
|
||||
|
||||
QVector<OrderedScreen> screens;
|
||||
QList<OrderedScreen> screens;
|
||||
|
||||
int wantedConnectorIndex = -1;
|
||||
bool ok;
|
||||
@ -702,7 +702,7 @@ void QKmsDevice::createScreens()
|
||||
// The final list of screens is available, so do the second phase setup.
|
||||
// Hook up clone sources and targets.
|
||||
for (const OrderedScreen &orderedScreen : screens) {
|
||||
QVector<QPlatformScreen *> screensCloningThisScreen;
|
||||
QList<QPlatformScreen *> screensCloningThisScreen;
|
||||
for (const OrderedScreen &s : screens) {
|
||||
if (s.vinfo.output.clone_source == orderedScreen.vinfo.output.name)
|
||||
screensCloningThisScreen.append(s.screen);
|
||||
@ -727,7 +727,7 @@ void QKmsDevice::createScreens()
|
||||
// Figure out the virtual desktop and register the screens to QPA/QGuiApplication.
|
||||
QPoint pos(0, 0);
|
||||
QList<QPlatformScreen *> siblings;
|
||||
QVector<QPoint> virtualPositions;
|
||||
QList<QPoint> virtualPositions;
|
||||
int primarySiblingIdx = -1;
|
||||
|
||||
for (const OrderedScreen &orderedScreen : screens) {
|
||||
@ -775,7 +775,7 @@ QPlatformScreen *QKmsDevice::createHeadlessScreen()
|
||||
// not all subclasses support screen cloning
|
||||
void QKmsDevice::registerScreenCloning(QPlatformScreen *screen,
|
||||
QPlatformScreen *screenThisScreenClones,
|
||||
const QVector<QPlatformScreen *> &screensCloningThisScreen)
|
||||
const QList<QPlatformScreen *> &screensCloningThisScreen)
|
||||
{
|
||||
Q_UNUSED(screen);
|
||||
Q_UNUSED(screenThisScreenClones);
|
||||
|
@ -163,7 +163,7 @@ struct QKmsPlane
|
||||
|
||||
int possibleCrtcs = 0;
|
||||
|
||||
QVector<uint32_t> supportedFormats;
|
||||
QList<uint32_t> supportedFormats;
|
||||
|
||||
Rotations initialRotation = Rotation0;
|
||||
Rotations availableRotations = Rotation0;
|
||||
@ -207,7 +207,7 @@ struct QKmsOutput
|
||||
uint32_t drm_format = DRM_FORMAT_XRGB8888;
|
||||
bool drm_format_requested_by_user = false;
|
||||
QString clone_source;
|
||||
QVector<QKmsPlane> available_planes;
|
||||
QList<QKmsPlane> available_planes;
|
||||
struct QKmsPlane *eglfs_plane = nullptr;
|
||||
QSize size;
|
||||
uint32_t crtcIdPropertyId = 0;
|
||||
@ -258,7 +258,7 @@ protected:
|
||||
virtual QPlatformScreen *createHeadlessScreen();
|
||||
virtual void registerScreenCloning(QPlatformScreen *screen,
|
||||
QPlatformScreen *screenThisScreenClones,
|
||||
const QVector<QPlatformScreen *> &screensCloningThisScreen);
|
||||
const QList<QPlatformScreen *> &screensCloningThisScreen);
|
||||
virtual void registerScreen(QPlatformScreen *screen,
|
||||
bool isPrimary,
|
||||
const QPoint &virtualPos,
|
||||
@ -292,7 +292,7 @@ protected:
|
||||
#endif
|
||||
quint32 m_crtc_allocator;
|
||||
|
||||
QVector<QKmsPlane> m_planes;
|
||||
QList<QKmsPlane> m_planes;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(QKmsDevice)
|
||||
|
@ -88,7 +88,7 @@ Q_DECLARE_TYPEINFO(ObjectPathProperties, Q_MOVABLE_TYPE); // QDBusObjectPath is
|
||||
// marked as such until Qt 6
|
||||
QT_END_NAMESPACE
|
||||
|
||||
typedef QVector<ObjectPathProperties> PathPropertiesList;
|
||||
typedef QList<ObjectPathProperties> PathPropertiesList;
|
||||
Q_DECLARE_METATYPE(ObjectPathProperties)
|
||||
Q_DECLARE_METATYPE (PathPropertiesList)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user