Use QList instead of QVector
Task-number: QTBUG-84469 Change-Id: I4bc7b2eb2913fc828f09f96e21480b76cabf8656 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
6ea7ae3c19
commit
b4542740df
@ -54,7 +54,7 @@
|
||||
#include "qwayland-xdg-shell-unstable-v5_p.h"
|
||||
|
||||
#include <QtCore/QSize>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QList>
|
||||
|
||||
#include <QtWaylandClient/qtwaylandclientglobal.h>
|
||||
#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
|
||||
@ -82,7 +82,7 @@ public:
|
||||
private:
|
||||
void xdg_shell_ping(uint32_t serial) override;
|
||||
|
||||
QVector<QWaylandWindow *> m_popups;
|
||||
QList<QWaylandWindow *> m_popups;
|
||||
uint m_popupSerial = 0;
|
||||
};
|
||||
|
||||
|
@ -51,10 +51,10 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QRect>
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QRect>
|
||||
|
||||
#include <QtCore/QWaitCondition>
|
||||
#include <QtCore/QLoggingCategory>
|
||||
@ -280,7 +280,7 @@ private:
|
||||
QWaylandInputDevice *mLastInputDevice = nullptr;
|
||||
QPointer<QWaylandWindow> mLastInputWindow;
|
||||
QPointer<QWaylandWindow> mLastKeyboardFocus;
|
||||
QVector<QWaylandWindow *> mActiveWindows;
|
||||
QList<QWaylandWindow *> mActiveWindows;
|
||||
struct wl_callback *mSyncCallback = nullptr;
|
||||
static const wl_callback_listener syncCallbackListener;
|
||||
|
||||
|
@ -54,10 +54,10 @@
|
||||
|
||||
#include <qpa/qplatforminputcontext.h>
|
||||
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QPointer>
|
||||
#include <QRectF>
|
||||
#include <QVector>
|
||||
|
||||
#include <QtWaylandClient/private/qwayland-text-input-unstable-v2.h>
|
||||
#include <qwaylandinputmethodeventbuilder_p.h>
|
||||
@ -113,7 +113,7 @@ private:
|
||||
QWaylandDisplay *m_display = nullptr;
|
||||
QWaylandInputMethodEventBuilder m_builder;
|
||||
|
||||
QVector<Qt::KeyboardModifier> m_modifiersMap;
|
||||
QList<Qt::KeyboardModifier> m_modifiersMap;
|
||||
|
||||
uint32_t m_serial = 0;
|
||||
struct ::wl_surface *m_surface = nullptr;
|
||||
|
@ -51,8 +51,8 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QVector>
|
||||
#include <QImage>
|
||||
#include <QList>
|
||||
|
||||
#include <QtWaylandClient/qtwaylandclientglobal.h>
|
||||
#include <QtWaylandClient/private/qwayland-wayland.h>
|
||||
@ -81,7 +81,7 @@ protected:
|
||||
void shm_format(uint32_t format) override;
|
||||
|
||||
private:
|
||||
QVector<uint32_t> m_formats;
|
||||
QList<uint32_t> m_formats;
|
||||
|
||||
};
|
||||
|
||||
|
@ -41,8 +41,6 @@
|
||||
|
||||
#include "qwaylandbuffer_p.h"
|
||||
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -84,7 +84,7 @@ protected:
|
||||
void surface_enter(struct ::wl_output *output) override;
|
||||
void surface_leave(struct ::wl_output *output) override;
|
||||
|
||||
QVector<QWaylandScreen *> m_screens; //As seen by wl_surface.enter/leave events. Chronological order.
|
||||
QList<QWaylandScreen *> m_screens; //As seen by wl_surface.enter/leave events. Chronological order.
|
||||
QWaylandWindow *m_window = nullptr;
|
||||
|
||||
friend class QWaylandWindow; // TODO: shouldn't need to be friends
|
||||
|
@ -55,10 +55,10 @@
|
||||
|
||||
#include <QtWaylandClient/private/qtwaylandclientglobal_p.h>
|
||||
|
||||
#include <QtGui/QTabletEvent>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QtGui/QTabletEvent>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -93,9 +93,9 @@ protected:
|
||||
void zwp_tablet_seat_v2_pad_added(struct ::zwp_tablet_pad_v2 *id) override;
|
||||
|
||||
private:
|
||||
QVector<QWaylandTabletV2 *> m_tablets;
|
||||
QVector<QWaylandTabletToolV2 *> m_tools;
|
||||
QVector<QWaylandTabletPadV2 *> m_pads;
|
||||
QList<QWaylandTabletV2 *> m_tablets;
|
||||
QList<QWaylandTabletToolV2 *> m_tools;
|
||||
QList<QWaylandTabletPadV2 *> m_pads;
|
||||
};
|
||||
|
||||
class Q_WAYLAND_CLIENT_EXPORT QWaylandTabletV2 : public QObject, public QtWayland::zwp_tablet_v2
|
||||
|
@ -386,7 +386,7 @@ void QWaylandWindow::sendExposeEvent(const QRect &rect)
|
||||
}
|
||||
|
||||
|
||||
static QVector<QPointer<QWaylandWindow>> activePopups;
|
||||
static QList<QPointer<QWaylandWindow>> activePopups;
|
||||
|
||||
void QWaylandWindow::closePopups(QWaylandWindow *parent)
|
||||
{
|
||||
|
@ -217,7 +217,7 @@ protected:
|
||||
QScopedPointer<QWaylandSurface> mSurface;
|
||||
QWaylandShellSurface *mShellSurface = nullptr;
|
||||
QWaylandSubSurface *mSubSurfaceWindow = nullptr;
|
||||
QVector<QWaylandSubSurface *> mChildren;
|
||||
QList<QWaylandSubSurface *> mChildren;
|
||||
|
||||
QWaylandAbstractDecoration *mWindowDecoration = nullptr;
|
||||
bool mMouseEventsInContentArea = false;
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
default: return QImage::Format_Invalid;
|
||||
}
|
||||
}
|
||||
static inline QVector<wl_shm_format> supportedWaylandFormats();
|
||||
static inline QList<wl_shm_format> supportedWaylandFormats();
|
||||
|
||||
private:
|
||||
//IMPLEMENTATION (which has to be inline in the header because of the include trick)
|
||||
@ -127,9 +127,9 @@ wl_shm_format QWaylandSharedMemoryFormatHelper::fromQImageFormat(QImage::Format
|
||||
return array.data[format];
|
||||
}
|
||||
|
||||
QVector<wl_shm_format> QWaylandSharedMemoryFormatHelper::supportedWaylandFormats()
|
||||
QList<wl_shm_format> QWaylandSharedMemoryFormatHelper::supportedWaylandFormats()
|
||||
{
|
||||
QVector<wl_shm_format> retFormats;
|
||||
QList<wl_shm_format> retFormats;
|
||||
Array array = getData();
|
||||
for (size_t i = 0; i < array.size; i++) {
|
||||
if (int(array.data[i]) != INT_MIN
|
||||
|
@ -123,13 +123,13 @@ private:
|
||||
QByteArray m_scannerName;
|
||||
QByteArray m_headerPath;
|
||||
QByteArray m_prefix;
|
||||
QVector <QByteArray> m_includes;
|
||||
QList <QByteArray> m_includes;
|
||||
QXmlStreamReader *m_xml = nullptr;
|
||||
};
|
||||
|
||||
bool Scanner::parseArguments(int argc, char **argv)
|
||||
{
|
||||
QVector<QByteArray> args;
|
||||
QList<QByteArray> args;
|
||||
args.reserve(argc);
|
||||
for (int i = 0; i < argc; ++i)
|
||||
args << QByteArray(argv[i]);
|
||||
|
@ -85,7 +85,7 @@ QByteArray tst_inputcontext::inputContextName() const
|
||||
void tst_inputcontext::ensureTextInputPresentOnCompositor()
|
||||
{
|
||||
exec([&] {
|
||||
QVector<TextInputManager *> extensions = getAll<TextInputManager>();
|
||||
QList<TextInputManager *> extensions = getAll<TextInputManager>();
|
||||
if (extensions.length() > 1)
|
||||
QFAIL("TextInputManager is a singleton, hence there should not be more then one object returned");
|
||||
if (extensions.length() == 0)
|
||||
@ -96,7 +96,7 @@ void tst_inputcontext::ensureTextInputPresentOnCompositor()
|
||||
void tst_inputcontext::ensureTextInputNotPresentOnCompositor()
|
||||
{
|
||||
exec([&] {
|
||||
QVector<TextInputManager *> extensions = getAll<TextInputManager>();
|
||||
QList<TextInputManager *> extensions = getAll<TextInputManager>();
|
||||
if (extensions.length() > 1)
|
||||
QFAIL("TextInputManager is a singleton, hence there should not be more then one object returned");
|
||||
if (extensions.length() == 1)
|
||||
|
@ -140,7 +140,7 @@ public:
|
||||
|
||||
PrimarySelectionDeviceManagerV1 *m_manager = nullptr;
|
||||
Seat *m_seat = nullptr;
|
||||
QVector<PrimarySelectionOfferV1 *> m_sentSelectionOffers;
|
||||
QList<PrimarySelectionOfferV1 *> m_sentSelectionOffers;
|
||||
PrimarySelectionSourceV1 *m_selectionSource = nullptr;
|
||||
uint m_serial = 0;
|
||||
|
||||
@ -194,7 +194,7 @@ public:
|
||||
|
||||
int m_version = 1; // TODO: Remove on libwayland upgrade
|
||||
QMap<Seat *, PrimarySelectionDeviceV1 *> m_devices;
|
||||
QVector<PrimarySelectionSourceV1 *> m_sources;
|
||||
QList<PrimarySelectionSourceV1 *> m_sources;
|
||||
protected:
|
||||
void zwp_primary_selection_device_manager_v1_destroy(Resource *resource) override
|
||||
{
|
||||
@ -459,7 +459,7 @@ void tst_primaryselectionv1::copy()
|
||||
window.show();
|
||||
|
||||
QCOMPOSITOR_TRY_VERIFY(xdgSurface() && xdgSurface()->m_committedConfigureSerial);
|
||||
QVector<uint> mouseSerials;
|
||||
QList<uint> mouseSerials;
|
||||
exec([&] {
|
||||
auto *surface = xdgSurface()->m_surface;
|
||||
keyboard()->sendEnter(surface); // Need to set keyboard focus according to protocol
|
||||
|
@ -292,7 +292,7 @@ void tst_seatv4::simpleAxis()
|
||||
QPoint pixelDelta;
|
||||
QPoint angleDelta; // eights of a degree, positive is upwards, left
|
||||
};
|
||||
QVector<Event> m_events;
|
||||
QList<Event> m_events;
|
||||
};
|
||||
|
||||
WheelWindow window;
|
||||
@ -351,7 +351,7 @@ static bool supportsCursorSize(uint size, wl_shm *shm)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool supportsCursorSizes(const QVector<uint> &sizes)
|
||||
static bool supportsCursorSizes(const QList<uint> &sizes)
|
||||
{
|
||||
auto *waylandIntegration = static_cast<QtWaylandClient::QWaylandIntegration *>(QGuiApplicationPrivate::platformIntegration());
|
||||
wl_shm *shm = waylandIntegration->display()->shm()->object();
|
||||
|
@ -161,7 +161,7 @@ public:
|
||||
QPoint angleDelta; // eights of a degree, positive is upwards, left
|
||||
Qt::MouseEventSource source{};
|
||||
};
|
||||
QVector<Event> m_events;
|
||||
QList<Event> m_events;
|
||||
};
|
||||
|
||||
void tst_seatv5::simpleAxis_data()
|
||||
@ -401,7 +401,7 @@ public:
|
||||
Qt::TouchPointStates touchPointStates{};
|
||||
QList<QTouchEvent::TouchPoint> touchPoints;
|
||||
};
|
||||
QVector<Event> m_events;
|
||||
QList<Event> m_events;
|
||||
};
|
||||
|
||||
void tst_seatv5::singleTap()
|
||||
|
@ -145,10 +145,10 @@ public:
|
||||
* \brief Returns all globals with the given type, if any
|
||||
*/
|
||||
template<typename global_type>
|
||||
QVector<global_type *> getAll()
|
||||
QList<global_type *> getAll()
|
||||
{
|
||||
warnIfNotLockedByThread(Q_FUNC_INFO);
|
||||
QVector<global_type *> matching;
|
||||
QList<global_type *> matching;
|
||||
for (auto *global : qAsConst(m_globals)) {
|
||||
if (auto *casted = qobject_cast<global_type *>(global))
|
||||
matching.append(casted);
|
||||
@ -199,7 +199,7 @@ protected:
|
||||
QByteArray m_socketName;
|
||||
wl_event_loop *m_eventLoop = nullptr;
|
||||
bool m_running = true;
|
||||
QVector<Global *> m_globals;
|
||||
QList<Global *> m_globals;
|
||||
QElapsedTimer m_timer;
|
||||
|
||||
private:
|
||||
|
@ -485,7 +485,7 @@ uint Keyboard::sendKey(wl_client *client, uint key, uint state)
|
||||
}
|
||||
|
||||
// Shm implementation
|
||||
Shm::Shm(CoreCompositor *compositor, QVector<format> formats, int version)
|
||||
Shm::Shm(CoreCompositor *compositor, QList<format> formats, int version)
|
||||
: QtWaylandServer::wl_shm(compositor->m_display, version)
|
||||
, m_compositor(compositor)
|
||||
, m_formats(formats)
|
||||
|
@ -120,9 +120,9 @@ public:
|
||||
uint configureSerial = 0;
|
||||
int bufferScale = 1;
|
||||
} m_pending, m_committed;
|
||||
QVector<DoubleBufferedState *> m_commits;
|
||||
QVector<Callback *> m_waitingFrameCallbacks;
|
||||
QVector<Output *> m_outputs;
|
||||
QList<DoubleBufferedState *> m_commits;
|
||||
QList<Callback *> m_waitingFrameCallbacks;
|
||||
QList<Output *> m_outputs;
|
||||
SurfaceRole *m_role = nullptr;
|
||||
|
||||
signals:
|
||||
@ -149,7 +149,7 @@ public:
|
||||
{}
|
||||
bool isClean() override;
|
||||
QString dirtyMessage() override;
|
||||
QVector<Surface *> m_surfaces;
|
||||
QList<Surface *> m_surfaces;
|
||||
CoreCompositor *m_compositor = nullptr;
|
||||
|
||||
signals:
|
||||
@ -181,7 +181,7 @@ public:
|
||||
explicit SubCompositor(CoreCompositor *compositor, int version = 1)
|
||||
: QtWaylandServer::wl_subcompositor(compositor->m_display, version)
|
||||
{}
|
||||
QVector<Subsurface *> m_subsurfaces;
|
||||
QList<Subsurface *> m_subsurfaces;
|
||||
|
||||
signals:
|
||||
void subsurfaceCreated(Subsurface *subsurface);
|
||||
@ -270,13 +270,13 @@ public:
|
||||
CoreCompositor *m_compositor = nullptr;
|
||||
|
||||
Pointer* m_pointer = nullptr;
|
||||
QVector<Pointer *> m_oldPointers;
|
||||
QList<Pointer *> m_oldPointers;
|
||||
|
||||
Touch* m_touch = nullptr;
|
||||
QVector<Touch *> m_oldTouchs;
|
||||
QList<Touch *> m_oldTouchs;
|
||||
|
||||
Keyboard* m_keyboard = nullptr;
|
||||
QVector<Keyboard *> m_oldKeyboards;
|
||||
QList<Keyboard *> m_oldKeyboards;
|
||||
|
||||
uint m_capabilities = 0;
|
||||
|
||||
@ -313,7 +313,7 @@ public:
|
||||
void sendFrame(wl_client *client);
|
||||
|
||||
Seat *m_seat = nullptr;
|
||||
QVector<uint> m_enterSerials;
|
||||
QList<uint> m_enterSerials;
|
||||
QPoint m_hotspot;
|
||||
|
||||
signals:
|
||||
@ -365,11 +365,11 @@ class Shm : public Global, public QtWaylandServer::wl_shm
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Shm(CoreCompositor *compositor, QVector<format> formats = {format_argb8888, format_xrgb8888, format_rgb888}, int version = 1);
|
||||
explicit Shm(CoreCompositor *compositor, QList<format> formats = {format_argb8888, format_xrgb8888, format_rgb888}, int version = 1);
|
||||
bool isClean() override;
|
||||
CoreCompositor *m_compositor = nullptr;
|
||||
QVector<ShmPool *> m_pools;
|
||||
const QVector<format> m_formats;
|
||||
QList<ShmPool *> m_pools;
|
||||
const QList<format> m_formats;
|
||||
|
||||
protected:
|
||||
void shm_create_pool(Resource *resource, uint32_t id, int32_t fd, int32_t size) override;
|
||||
@ -386,7 +386,7 @@ class ShmPool : QObject, public QtWaylandServer::wl_shm_pool
|
||||
public:
|
||||
explicit ShmPool(Shm *shm, wl_client *client, int id, int version = 1);
|
||||
Shm *m_shm = nullptr;
|
||||
QVector<ShmBuffer *> m_buffers;
|
||||
QList<ShmBuffer *> m_buffers;
|
||||
|
||||
protected:
|
||||
void shm_pool_create_buffer(Resource *resource, uint32_t id, int32_t offset, int32_t width, int32_t height, int32_t stride, uint32_t format) override;
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
|
||||
DataDeviceManager *m_manager = nullptr;
|
||||
Seat *m_seat = nullptr;
|
||||
QVector<DataOffer *> m_sentSelectionOffers;
|
||||
QList<DataOffer *> m_sentSelectionOffers;
|
||||
|
||||
protected:
|
||||
void data_device_release(Resource *resource) override
|
||||
|
@ -168,12 +168,12 @@ XdgToplevel::XdgToplevel(XdgSurface *xdgSurface, int id, int version)
|
||||
connect(surface(), &Surface::commit, this, [this] { m_committed = m_pending; });
|
||||
}
|
||||
|
||||
void XdgToplevel::sendConfigure(const QSize &size, const QVector<uint> &states)
|
||||
void XdgToplevel::sendConfigure(const QSize &size, const QList<uint> &states)
|
||||
{
|
||||
send_configure(size.width(), size.height(), toByteArray(states));
|
||||
}
|
||||
|
||||
uint XdgToplevel::sendCompleteConfigure(const QSize &size, const QVector<uint> &states)
|
||||
uint XdgToplevel::sendCompleteConfigure(const QSize &size, const QList<uint> &states)
|
||||
{
|
||||
sendConfigure(size, states);
|
||||
return m_xdgSurface->sendConfigure();
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
void send_ping(uint32_t) = delete; // It's a global, use resource specific instead
|
||||
bool isClean() override { return m_xdgSurfaces.empty(); }
|
||||
QString dirtyMessage() override { return m_xdgSurfaces.empty() ? "clean" : "remaining xdg surfaces"; }
|
||||
QVector<XdgSurface *> m_xdgSurfaces;
|
||||
QList<XdgSurface *> m_xdgSurfaces;
|
||||
XdgToplevel *toplevel(int i = 0);
|
||||
XdgPopup *popup(int i = 0);
|
||||
XdgPopup *m_topmostGrabbingPopup = nullptr;
|
||||
@ -86,13 +86,13 @@ public:
|
||||
XdgWmBase *m_xdgWmBase = nullptr;
|
||||
Surface *m_surface = nullptr;
|
||||
bool m_configureSent = false;
|
||||
QVector<uint> m_pendingConfigureSerials;
|
||||
QList<uint> m_pendingConfigureSerials;
|
||||
uint m_ackedConfigureSerial = 0;
|
||||
uint m_committedConfigureSerial = 0;
|
||||
struct DoubleBufferedState {
|
||||
QRect windowGeometry = {0, 0, 0, 0};
|
||||
} m_pending, m_committed;
|
||||
QVector<XdgPopup *> m_popups;
|
||||
QList<XdgPopup *> m_popups;
|
||||
|
||||
public slots:
|
||||
void verifyConfigured() { QVERIFY(m_configureSent); }
|
||||
@ -115,8 +115,8 @@ class XdgToplevel : public QObject, public QtWaylandServer::xdg_toplevel
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit XdgToplevel(XdgSurface *xdgSurface, int id, int version = 1);
|
||||
void sendConfigure(const QSize &size = {0, 0}, const QVector<uint> &states = {});
|
||||
uint sendCompleteConfigure(const QSize &size = {0, 0}, const QVector<uint> &states = {});
|
||||
void sendConfigure(const QSize &size = {0, 0}, const QList<uint> &states = {});
|
||||
uint sendCompleteConfigure(const QSize &size = {0, 0}, const QList<uint> &states = {});
|
||||
Surface *surface() { return m_xdgSurface->m_surface; }
|
||||
|
||||
XdgSurface *m_xdgSurface = nullptr;
|
||||
|
@ -199,7 +199,7 @@ void MockCompositor::sendIviSurfaceConfigure(const QSharedPointer<MockIviSurface
|
||||
processCommand(command);
|
||||
}
|
||||
|
||||
void MockCompositor::sendXdgToplevelV6Configure(const QSharedPointer<MockXdgToplevelV6> toplevel, const QSize &size, const QVector<uint> &states)
|
||||
void MockCompositor::sendXdgToplevelV6Configure(const QSharedPointer<MockXdgToplevelV6> toplevel, const QSize &size, const QList<uint> &states)
|
||||
{
|
||||
Command command = makeCommand(Impl::Compositor::sendXdgToplevelV6Configure, m_compositor);
|
||||
command.parameters << QVariant::fromValue(toplevel);
|
||||
@ -221,7 +221,7 @@ QSharedPointer<MockSurface> MockCompositor::surface()
|
||||
QSharedPointer<MockSurface> result;
|
||||
lock();
|
||||
{
|
||||
const QVector<Impl::Surface *> surfaces = m_compositor->surfaces();
|
||||
const QList<Impl::Surface *> surfaces = m_compositor->surfaces();
|
||||
for (Impl::Surface *surface : surfaces) {
|
||||
// we don't want to mistake the cursor surface for a window surface
|
||||
if (surface->isMapped()) {
|
||||
@ -415,12 +415,12 @@ void registerResource(wl_list *list, wl_resource *resource)
|
||||
wl_resource_add_destroy_listener(resource, listener);
|
||||
}
|
||||
|
||||
QVector<Surface *> Compositor::surfaces() const
|
||||
QList<Surface *> Compositor::surfaces() const
|
||||
{
|
||||
return m_surfaces;
|
||||
}
|
||||
|
||||
QVector<Output *> Compositor::outputs() const
|
||||
QList<Output *> Compositor::outputs() const
|
||||
{
|
||||
return m_outputs;
|
||||
}
|
||||
|
@ -38,11 +38,11 @@
|
||||
#include <wayland-server-core.h>
|
||||
|
||||
#include <QImage>
|
||||
#include <QList>
|
||||
#include <QMutex>
|
||||
#include <QRect>
|
||||
#include <QSharedPointer>
|
||||
#include <QVariant>
|
||||
#include <QVector>
|
||||
#include <QWaitCondition>
|
||||
|
||||
class MockCompositor;
|
||||
@ -74,8 +74,8 @@ public:
|
||||
uint32_t nextSerial();
|
||||
uint32_t time() { return ++m_time; }
|
||||
|
||||
QVector<Surface *> surfaces() const;
|
||||
QVector<Output *> outputs() const;
|
||||
QList<Surface *> surfaces() const;
|
||||
QList<Output *> outputs() const;
|
||||
|
||||
IviApplication *iviApplication() const;
|
||||
XdgShellV6 *xdgShellV6() const;
|
||||
@ -130,8 +130,8 @@ private:
|
||||
Keyboard *m_keyboard = nullptr;
|
||||
Touch *m_touch = nullptr;
|
||||
QScopedPointer<DataDeviceManager> m_data_device_manager;
|
||||
QVector<Surface *> m_surfaces;
|
||||
QVector<Output *> m_outputs;
|
||||
QList<Surface *> m_surfaces;
|
||||
QList<Output *> m_outputs;
|
||||
QScopedPointer<IviApplication> m_iviApplication;
|
||||
QScopedPointer<WlShell> m_wlShell;
|
||||
QScopedPointer<XdgShellV6> m_xdgShellV6;
|
||||
@ -242,7 +242,7 @@ public:
|
||||
void sendShellSurfaceConfigure(const QSharedPointer<MockSurface> surface, const QSize &size = QSize(0, 0));
|
||||
void sendIviSurfaceConfigure(const QSharedPointer<MockIviSurface> iviSurface, const QSize &size);
|
||||
void sendXdgToplevelV6Configure(const QSharedPointer<MockXdgToplevelV6> toplevel, const QSize &size = QSize(0, 0),
|
||||
const QVector<uint> &states = { ZXDG_TOPLEVEL_V6_STATE_ACTIVATED });
|
||||
const QList<uint> &states = { ZXDG_TOPLEVEL_V6_STATE_ACTIVATED });
|
||||
void waitForStartDrag();
|
||||
|
||||
QSharedPointer<MockSurface> surface();
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#include <qwayland-server-fullscreen-shell-unstable-v1.h>
|
||||
|
||||
#include <QVector>
|
||||
#include <QList>
|
||||
|
||||
namespace Impl {
|
||||
|
||||
@ -43,14 +43,14 @@ class FullScreenShellV1 : public QtWaylandServer::zwp_fullscreen_shell_v1
|
||||
public:
|
||||
explicit FullScreenShellV1(::wl_display *display) : zwp_fullscreen_shell_v1(display, 1) {}
|
||||
|
||||
QVector<Surface *> surfaces() const { return m_surfaces; }
|
||||
QList<Surface *> surfaces() const { return m_surfaces; }
|
||||
void removeSurface(Surface *surface) { m_surfaces.removeOne(surface); }
|
||||
|
||||
protected:
|
||||
void zwp_fullscreen_shell_v1_present_surface(Resource *resource, struct ::wl_resource *surface, uint32_t method, struct ::wl_resource *output) override;
|
||||
|
||||
private:
|
||||
QVector<Surface *> m_surfaces;
|
||||
QList<Surface *> m_surfaces;
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
|
@ -31,8 +31,8 @@
|
||||
|
||||
#include <qwayland-server-ivi-application.h>
|
||||
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QVector>
|
||||
|
||||
class MockIviSurface;
|
||||
|
||||
@ -67,7 +67,7 @@ class IviApplication : public QtWaylandServer::ivi_application
|
||||
{
|
||||
public:
|
||||
explicit IviApplication(::wl_display *display) : ivi_application(display, 1) {}
|
||||
QVector<IviSurface *> iviSurfaces() const { return m_iviSurfaces; }
|
||||
QList<IviSurface *> iviSurfaces() const { return m_iviSurfaces; }
|
||||
|
||||
protected:
|
||||
void ivi_application_surface_create(Resource *resource, uint32_t ivi_id, ::wl_resource *surface, uint32_t id) override;
|
||||
@ -75,7 +75,7 @@ protected:
|
||||
private:
|
||||
void addIviSurface(IviSurface *iviSurface) { m_iviSurfaces.append(iviSurface); }
|
||||
void removeIviSurface(IviSurface *iviSurface) { m_iviSurfaces.removeOne(iviSurface); }
|
||||
QVector<IviSurface *> m_iviSurfaces;
|
||||
QList<IviSurface *> m_iviSurfaces;
|
||||
|
||||
friend class IviSurface;
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ void Compositor::sendShellSurfaceConfigure(void *data, const QList<QVariant> &pa
|
||||
QSize size = parameters.at(1).toSize();
|
||||
Q_ASSERT(size.isValid());
|
||||
if (auto toplevel = surface->xdgToplevelV6()) {
|
||||
QVector<uint> states = { ZXDG_TOPLEVEL_V6_STATE_ACTIVATED };
|
||||
QList<uint> states = { ZXDG_TOPLEVEL_V6_STATE_ACTIVATED };
|
||||
auto statesBytes = QByteArray::fromRawData(reinterpret_cast<const char *>(states.data()),
|
||||
states.size() * static_cast<int>(sizeof(uint)));
|
||||
toplevel->send_configure(size.width(), size.height(), statesBytes);
|
||||
|
@ -28,8 +28,8 @@
|
||||
|
||||
#include <qwayland-server-xdg-shell-unstable-v6.h>
|
||||
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QVector>
|
||||
|
||||
#ifndef MOCKXDGSHELLV6_H
|
||||
#define MOCKXDGSHELLV6_H
|
||||
@ -96,7 +96,7 @@ class XdgShellV6 : public QtWaylandServer::zxdg_shell_v6
|
||||
{
|
||||
public:
|
||||
explicit XdgShellV6(::wl_display *display) : zxdg_shell_v6(display, 1) {}
|
||||
QVector<XdgToplevelV6 *> toplevels() const { return m_toplevels; }
|
||||
QList<XdgToplevelV6 *> toplevels() const { return m_toplevels; }
|
||||
|
||||
protected:
|
||||
void zxdg_shell_v6_get_xdg_surface(Resource *resource, uint32_t id, ::wl_resource *surface) override;
|
||||
@ -104,7 +104,7 @@ protected:
|
||||
private:
|
||||
void addToplevel(XdgToplevelV6 *toplevel) { m_toplevels.append(toplevel); }
|
||||
void removeToplevel(XdgToplevelV6 *toplevel) { m_toplevels.removeOne(toplevel); }
|
||||
QVector<XdgToplevelV6 *> m_toplevels;
|
||||
QList<XdgToplevelV6 *> m_toplevels;
|
||||
|
||||
friend class XdgToplevelV6;
|
||||
};
|
||||
|
@ -208,12 +208,12 @@ public:
|
||||
|
||||
TabletManagerV2 *m_manager = nullptr;
|
||||
Seat *m_seat = nullptr;
|
||||
QVector<TabletV2 *> m_tablets;
|
||||
QVector<TabletV2 *> m_tabletsWaitingForDestroy;
|
||||
QVector<TabletToolV2 *> m_tools;
|
||||
QVector<TabletToolV2 *> m_toolsWaitingForDestroy;
|
||||
QVector<TabletPadV2 *> m_pads;
|
||||
QVector<TabletPadV2 *> m_padsWaitingForDestroy;
|
||||
QList<TabletV2 *> m_tablets;
|
||||
QList<TabletV2 *> m_tabletsWaitingForDestroy;
|
||||
QList<TabletToolV2 *> m_tools;
|
||||
QList<TabletToolV2 *> m_toolsWaitingForDestroy;
|
||||
QList<TabletPadV2 *> m_pads;
|
||||
QList<TabletPadV2 *> m_padsWaitingForDestroy;
|
||||
|
||||
protected:
|
||||
void zwp_tablet_seat_v2_bind_resource(Resource *resource)
|
||||
@ -445,7 +445,7 @@ class ProximityFilter : public QObject {
|
||||
public:
|
||||
ProximityFilter() { qApp->installEventFilter(this); }
|
||||
~ProximityFilter() override { qDeleteAll(m_events); }
|
||||
QVector<QTabletEvent *> m_events;
|
||||
QList<QTabletEvent *> m_events;
|
||||
|
||||
int nextEventIndex = 0;
|
||||
int numEvents() const { return m_events.size() - nextEventIndex; }
|
||||
@ -621,7 +621,7 @@ signals:
|
||||
void tabletEventReceived(QTabletEvent *event);
|
||||
|
||||
private:
|
||||
QVector<QTabletEvent *> m_events;
|
||||
QList<QTabletEvent *> m_events;
|
||||
};
|
||||
|
||||
void tst_tabletv2::moveEvent()
|
||||
|
@ -370,7 +370,7 @@ void tst_xdgshell::switchPopups()
|
||||
m_popups << new Popup(this);
|
||||
}
|
||||
~Window() override { qDeleteAll(m_popups); }
|
||||
QVector<Popup *> m_popups;
|
||||
QList<Popup *> m_popups;
|
||||
};
|
||||
|
||||
Window window;
|
||||
|
Loading…
x
Reference in New Issue
Block a user