There's no QVector anymore, QList is the QVector in Qt6

This commit is contained in:
Laurent Montel 2023-10-19 08:50:15 +02:00
parent f9163bf6a5
commit bc6116c5a7
276 changed files with 1080 additions and 1083 deletions

View file

@ -38,7 +38,7 @@ static std::unique_ptr<MockGpu> findPrimaryDevice(int crtcCount)
return nullptr;
}
QVector<drmDevice *> devices(deviceCount);
QList<drmDevice *> devices(deviceCount);
if (drmGetDevices2(0, devices.data(), devices.size()) < 0) {
return nullptr;
}
@ -203,9 +203,9 @@ void DrmTest::testZeroModesHandling()
void DrmTest::testModeGeneration_data()
{
QTest::addColumn<QSize>("nativeMode");
QTest::addColumn<QVector<QSize>>("expectedModes");
QTest::addColumn<QList<QSize>>("expectedModes");
QTest::newRow("2160p") << QSize(3840, 2160) << QVector<QSize>{
QTest::newRow("2160p") << QSize(3840, 2160) << QList<QSize>{
QSize(1600, 1200),
QSize(1280, 1024),
QSize(1024, 768),
@ -221,7 +221,7 @@ void DrmTest::testModeGeneration_data()
QSize(1368, 768),
QSize(1280, 720),
};
QTest::newRow("1440p") << QSize(2560, 1440) << QVector<QSize>{
QTest::newRow("1440p") << QSize(2560, 1440) << QList<QSize>{
QSize(1600, 1200),
QSize(1280, 1024),
QSize(1024, 768),
@ -233,7 +233,7 @@ void DrmTest::testModeGeneration_data()
QSize(1368, 768),
QSize(1280, 720),
};
QTest::newRow("1080p") << QSize(1920, 1080) << QVector<QSize>{
QTest::newRow("1080p") << QSize(1920, 1080) << QList<QSize>{
QSize(1280, 1024),
QSize(1024, 768),
QSize(1280, 800),
@ -243,7 +243,7 @@ void DrmTest::testModeGeneration_data()
QSize(1280, 720),
};
QTest::newRow("2160p 21:9") << QSize(5120, 2160) << QVector<QSize>{
QTest::newRow("2160p 21:9") << QSize(5120, 2160) << QList<QSize>{
QSize(5120, 2160),
QSize(1600, 1200),
QSize(1280, 1024),
@ -260,7 +260,7 @@ void DrmTest::testModeGeneration_data()
QSize(1368, 768),
QSize(1280, 720),
};
QTest::newRow("1440p 21:9") << QSize(3440, 1440) << QVector<QSize>{
QTest::newRow("1440p 21:9") << QSize(3440, 1440) << QList<QSize>{
QSize(3440, 1440),
QSize(1600, 1200),
QSize(1280, 1024),
@ -273,7 +273,7 @@ void DrmTest::testModeGeneration_data()
QSize(1368, 768),
QSize(1280, 720),
};
QTest::newRow("1080p 21:9") << QSize(2560, 1080) << QVector<QSize>{
QTest::newRow("1080p 21:9") << QSize(2560, 1080) << QList<QSize>{
QSize(2560, 1080),
QSize(1280, 1024),
QSize(1024, 768),
@ -298,7 +298,7 @@ void DrmTest::testModeGeneration()
auto gpu = std::make_unique<DrmGpu>(backend.get(), mockGpu->devNode, mockGpu->fd, 0);
QFETCH(QSize, nativeMode);
QFETCH(QVector<QSize>, expectedModes);
QFETCH(QList<QSize>, expectedModes);
conn->modes.clear();
conn->addMode(nativeMode.width(), nativeMode.height(), 60);
@ -310,7 +310,7 @@ void DrmTest::testModeGeneration()
mockGpu->connectors.removeAll(conn);
QVERIFY(gpu->updateOutputs());
conn->props.emplace_back(conn.get(), QStringLiteral("scaling mode"), 0, DRM_MODE_PROP_ENUM, QVector<QByteArray>{"None", "Full", "Center", "Full aspect"});
conn->props.emplace_back(conn.get(), QStringLiteral("scaling mode"), 0, DRM_MODE_PROP_ENUM, QList<QByteArray>{"None", "Full", "Center", "Full aspect"});
mockGpu->connectors.push_back(conn);
QVERIFY(gpu->updateOutputs());

View file

@ -133,7 +133,7 @@ uint32_t MockObject::getPropId(const QString &propName) const
//
MockProperty::MockProperty(MockObject *obj, QString name, uint64_t initialValue, uint32_t flags, QVector<QByteArray> enums)
MockProperty::MockProperty(MockObject *obj, QString name, uint64_t initialValue, uint32_t flags, QList<QByteArray> enums)
: obj(obj)
, id(obj->gpu->idCounter++)
, flags(flags)
@ -522,7 +522,7 @@ int drmModeSetCrtc(int fd, uint32_t crtcId, uint32_t bufferId,
req->legacyEmulation = true;
drmModeAtomicAddProperty(req, crtcId, crtc->getPropId(QStringLiteral("MODE_ID")), modeBlob);
drmModeAtomicAddProperty(req, crtcId, crtc->getPropId(QStringLiteral("ACTIVE")), modeBlob && count);
QVector<uint32_t> conns;
QList<uint32_t> conns;
for (int i = 0; i < count; i++) {
conns << connectors[i];
}
@ -843,7 +843,7 @@ drmModeObjectPropertiesPtr drmModeObjectGetProperties(int fd, uint32_t object_id
errno = EINVAL;
return nullptr;
}
QVector<MockProperty> props;
QList<MockProperty> props;
bool deviceAtomic = gpu->clientCaps.contains(DRM_CLIENT_CAP_ATOMIC) && gpu->clientCaps[DRM_CLIENT_CAP_ATOMIC];
for (const auto &prop : std::as_const(obj->props)) {
if (deviceAtomic || !(prop.flags & DRM_MODE_PROP_ATOMIC)) {
@ -899,7 +899,7 @@ int drmModeObjectSetProperty(int fd, uint32_t object_id, uint32_t object_type, u
}
}
static QVector<drmModeAtomicReqPtr> s_atomicReqs;
static QList<drmModeAtomicReqPtr> s_atomicReqs;
drmModeAtomicReqPtr drmModeAtomicAlloc(void)
{
@ -963,20 +963,20 @@ int drmModeAtomicCommit(int fd, drmModeAtomicReqPtr req, uint32_t flags, void *u
return -(errno = EINVAL);
}
QVector<MockConnector> connCopies;
QList<MockConnector> connCopies;
for (const auto &conn : std::as_const(gpu->connectors)) {
connCopies << *conn;
}
QVector<MockCrtc> crtcCopies;
QList<MockCrtc> crtcCopies;
for (const auto &crtc : std::as_const(gpu->crtcs)) {
crtcCopies << *crtc;
}
QVector<MockPlane> planeCopies;
QList<MockPlane> planeCopies;
for (const auto &plane : std::as_const(gpu->planes)) {
planeCopies << *plane;
}
QVector<MockObject*> objects;
QList<MockObject *> objects;
for (int i = 0; i < connCopies.count(); i++) {
objects << &connCopies[i];
}
@ -1022,10 +1022,10 @@ int drmModeAtomicCommit(int fd, drmModeAtomicReqPtr req, uint32_t flags, void *u
// check if the desired changes are allowed
struct Pipeline {
MockCrtc *crtc;
QVector<MockConnector*> conns;
QList<MockConnector *> conns;
MockPlane *primaryPlane = nullptr;
};
QVector<Pipeline> pipelines;
QList<Pipeline> pipelines;
for (int i = 0; i < crtcCopies.count(); i++) {
if (crtcCopies[i].getProp(QStringLiteral("ACTIVE"))) {
auto blob = gpu->getBlob(crtcCopies[i].getProp(QStringLiteral("MODE_ID")));

View file

@ -11,9 +11,9 @@
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <QList>
#include <QMap>
#include <QRect>
#include <QVector>
#include <memory>
#include <mutex>
#include <vector>
@ -27,7 +27,7 @@ class MockPlane;
class MockProperty {
public:
MockProperty(MockObject *obj, QString name, uint64_t initialValue, uint32_t flags, QVector<QByteArray> enums = {});
MockProperty(MockObject *obj, QString name, uint64_t initialValue, uint32_t flags, QList<QByteArray> enums = {});
~MockProperty() = default;
MockObject *obj;
@ -35,7 +35,7 @@ public:
uint32_t flags;
QString name;
uint64_t value;
QVector<QByteArray> enums;
QList<QByteArray> enums;
};
class MockPropertyBlob {
@ -60,7 +60,7 @@ public:
uint32_t getPropId(const QString &propName) const;
uint32_t id;
QVector<MockProperty> props;
QList<MockProperty> props;
MockGpu *gpu;
};
@ -75,7 +75,7 @@ public:
drmModeConnection connection;
uint32_t type;
std::shared_ptr<MockEncoder> encoder;
QVector<drmModeModeInfo> modes;
QList<drmModeModeInfo> modes;
};
class MockEncoder : public MockObject {
@ -141,7 +141,7 @@ struct Prop {
struct _drmModeAtomicReq {
bool legacyEmulation = false;
QVector<Prop> props;
QList<Prop> props;
};
#define MOCKDRM_DEVICE_CAP_ATOMIC 0xFF
@ -165,28 +165,28 @@ public:
QMap<uint32_t, uint64_t> deviceCaps;
uint32_t idCounter = 1;
QVector<MockObject*> objects;
QList<MockObject *> objects;
QVector<std::shared_ptr<MockConnector>> connectors;
QVector<drmModeConnectorPtr> drmConnectors;
QList<std::shared_ptr<MockConnector>> connectors;
QList<drmModeConnectorPtr> drmConnectors;
QVector<std::shared_ptr<MockEncoder>> encoders;
QVector<drmModeEncoderPtr> drmEncoders;
QList<std::shared_ptr<MockEncoder>> encoders;
QList<drmModeEncoderPtr> drmEncoders;
QVector<std::shared_ptr<MockCrtc>> crtcs;
QVector<drmModeCrtcPtr> drmCrtcs;
QList<std::shared_ptr<MockCrtc>> crtcs;
QList<drmModeCrtcPtr> drmCrtcs;
QVector<std::shared_ptr<MockPlane>> planes;
QVector<drmModePlanePtr> drmPlanes;
QList<std::shared_ptr<MockPlane>> planes;
QList<drmModePlanePtr> drmPlanes;
QVector<MockFb *> fbs;
QList<MockFb *> fbs;
std::vector<std::unique_ptr<MockPropertyBlob>> propertyBlobs;
QVector<drmModeResPtr> resPtrs;
QVector<drmModePropertyPtr> drmProps;
QVector<drmModePropertyBlobPtr> drmPropertyBlobs;
QVector<drmModeObjectPropertiesPtr> drmObjectProperties;
QVector<drmModePlaneResPtr> drmPlaneRes;
QList<drmModeResPtr> resPtrs;
QList<drmModePropertyPtr> drmProps;
QList<drmModePropertyBlobPtr> drmPropertyBlobs;
QList<drmModeObjectPropertiesPtr> drmObjectProperties;
QList<drmModePlaneResPtr> drmPlaneRes;
std::mutex m_mutex;
};

View file

@ -511,7 +511,7 @@ void ActivationTest::stackScreensHorizontally()
// Process pending wl_output bind requests before destroying all outputs.
QTest::qWait(1);
const QVector<QRect> screenGeometries{
const QList<QRect> screenGeometries{
QRect(0, 0, 1280, 1024),
QRect(1280, 0, 1280, 1024),
};
@ -523,7 +523,7 @@ void ActivationTest::stackScreensVertically()
// Process pending wl_output bind requests before destroying all outputs.
QTest::qWait(1);
const QVector<QRect> screenGeometries{
const QList<QRect> screenGeometries{
QRect(0, 0, 1280, 1024),
QRect(0, 1024, 1280, 1024),
};

View file

@ -190,10 +190,10 @@ void TestDbusInterface::testGetWindowInfoXdgShellClient()
// not testing shaded as that's X11
// not testing fullscreen, maximizeHorizontal, maximizeVertical and noBorder as those require window geometry changes
const QVector<VirtualDesktop *> desktops = VirtualDesktopManager::self()->desktops();
QCOMPARE(window->desktops(), QVector<VirtualDesktop *>{desktops[0]});
const QList<VirtualDesktop *> desktops = VirtualDesktopManager::self()->desktops();
QCOMPARE(window->desktops(), QList<VirtualDesktop *>{desktops[0]});
workspace()->sendWindowToDesktops(window, {desktops[1]}, false);
QCOMPARE(window->desktops(), QVector<VirtualDesktop *>{desktops[1]});
QCOMPARE(window->desktops(), QList<VirtualDesktop *>{desktops[1]});
reply = getWindowInfo(window->internalId());
reply.waitForFinished();
QCOMPARE(reply.value().value(QStringLiteral("desktops")).toStringList(), window->desktopIds());

View file

@ -138,7 +138,7 @@ void TranslucencyTest::testMoveAfterDesktopChange()
// let's send the window to desktop 2
VirtualDesktopManager *vds = VirtualDesktopManager::self();
vds->setCount(2);
const QVector<VirtualDesktop *> desktops = vds->desktops();
const QList<VirtualDesktop *> desktops = vds->desktops();
workspace()->sendWindowToDesktops(window, {desktops[1]}, false);
vds->setCurrent(desktops[1]);
QVERIFY(!m_translucencyEffect->isActive());

View file

@ -357,9 +357,9 @@ void InputMethodTest::testSwitchFocusedSurfaces()
QSignalSpy activateSpy(kwinApp()->inputMethod(), &InputMethod::activeChanged);
std::unique_ptr<KWayland::Client::TextInput> textInput(Test::waylandTextInputManager()->createTextInput(Test::waylandSeat()));
QVector<Window *> windows;
QList<Window *> windows;
std::vector<std::unique_ptr<KWayland::Client::Surface>> surfaces;
QVector<Test::XdgToplevel *> toplevels;
QList<Test::XdgToplevel *> toplevels;
// We create 3 surfaces
for (int i = 0; i < 3; ++i) {
std::unique_ptr<KWayland::Client::Surface> surface = Test::createSurface();

View file

@ -212,9 +212,9 @@ void Test::FractionalScaleV1::wp_fractional_scale_v1_preferred_scale(uint32_t sc
m_preferredScale = scale;
}
void Test::setOutputConfig(const QVector<QRect> &geometries)
void Test::setOutputConfig(const QList<QRect> &geometries)
{
QVector<VirtualBackend::OutputInfo> converted;
QList<VirtualBackend::OutputInfo> converted;
std::transform(geometries.begin(), geometries.end(), std::back_inserter(converted), [](const auto &geometry) {
return VirtualBackend::OutputInfo{
.geometry = geometry,
@ -223,9 +223,9 @@ void Test::setOutputConfig(const QVector<QRect> &geometries)
static_cast<VirtualBackend *>(kwinApp()->outputBackend())->setVirtualOutputs(converted);
}
void Test::setOutputConfig(const QVector<OutputInfo> &infos)
void Test::setOutputConfig(const QList<OutputInfo> &infos)
{
QVector<VirtualBackend::OutputInfo> converted;
QList<VirtualBackend::OutputInfo> converted;
std::transform(infos.begin(), infos.end(), std::back_inserter(converted), [](const auto &info) {
return VirtualBackend::OutputInfo{
.geometry = info.geometry,

View file

@ -637,10 +637,10 @@ KWayland::Client::PointerConstraints *waylandPointerConstraints();
KWayland::Client::AppMenuManager *waylandAppMenuManager();
WaylandOutputManagementV2 *waylandOutputManagementV2();
KWayland::Client::TextInputManager *waylandTextInputManager();
QVector<KWayland::Client::Output *> waylandOutputs();
QList<KWayland::Client::Output *> waylandOutputs();
KWayland::Client::Output *waylandOutput(const QString &name);
ScreencastingV1 *screencasting();
QVector<WaylandOutputDeviceV2 *> waylandOutputDevicesV2();
QList<WaylandOutputDeviceV2 *> waylandOutputDevicesV2();
FakeInput *waylandFakeInput();
bool waitForWaylandSurface(Window *window);
@ -839,8 +839,8 @@ struct OutputInfo
double scale = 1;
bool internal = false;
};
void setOutputConfig(const QVector<QRect> &geometries);
void setOutputConfig(const QVector<OutputInfo> &infos);
void setOutputConfig(const QList<QRect> &geometries);
void setOutputConfig(const QList<OutputInfo> &infos);
}
}

View file

@ -237,11 +237,11 @@ void KWinBindingsTest::testWindowToDesktop()
};
invokeShortcut(desktop);
QVERIFY(desktopsChangedSpy.wait());
QCOMPARE(window->desktops(), QVector<VirtualDesktop *>{desktops.at(desktop - 1)});
QCOMPARE(window->desktops(), QList<VirtualDesktop *>{desktops.at(desktop - 1)});
// back to desktop 1
invokeShortcut(1);
QVERIFY(desktopsChangedSpy.wait());
QCOMPARE(window->desktops(), QVector<VirtualDesktop *>{desktops.at(0)});
QCOMPARE(window->desktops(), QList<VirtualDesktop *>{desktops.at(0)});
// invoke with one desktop too many
invokeShortcut(desktop + 1);
// that should fail

View file

@ -190,7 +190,7 @@ void PlasmaSurfaceTest::testOSDPlacement()
QCOMPARE(window->frameGeometry(), QRect(1280 / 2 - 100 / 2, 2 * 1024 / 3 - 50 / 2, 100, 50));
// change the screen size
const QVector<QRect> geometries{QRect(0, 0, 1280, 1024), QRect(1280, 0, 1280, 1024)};
const QList<QRect> geometries{QRect(0, 0, 1280, 1024), QRect(1280, 0, 1280, 1024)};
Test::setOutputConfig(geometries);
const auto outputs = workspace()->outputs();
QCOMPARE(outputs.count(), 2);

View file

@ -41,7 +41,7 @@ namespace KWin
static PlatformCursorImage loadReferenceThemeCursor_helper(const KXcursorTheme &theme,
const QByteArray &name)
{
const QVector<KXcursorSprite> sprites = theme.shape(name);
const QList<KXcursorSprite> sprites = theme.shape(name);
if (sprites.isEmpty()) {
return PlatformCursorImage();
}
@ -63,7 +63,7 @@ static PlatformCursorImage loadReferenceThemeCursor(const QByteArray &name)
return platformCursorImage;
}
const QVector<QByteArray> alternativeNames = Cursor::cursorAlternativeNames(name);
const QList<QByteArray> alternativeNames = Cursor::cursorAlternativeNames(name);
for (const QByteArray &alternativeName : alternativeNames) {
platformCursorImage = loadReferenceThemeCursor_helper(theme, alternativeName);
if (!platformCursorImage.isNull()) {
@ -1535,7 +1535,7 @@ void PointerInputTest::testConfineToScreenGeometry()
// after moving it to off-screen area
// setup screen layout
const QVector<QRect> geometries{
const QList<QRect> geometries{
QRect(0, 0, 1280, 1024),
QRect(1280, 0, 1280, 1024),
QRect(2560, 0, 1280, 1024),

View file

@ -81,7 +81,7 @@ void ScreenChangesTest::testScreenAddRemove()
outputAnnouncedSpy.clear();
// let's announce a new output
const QVector<QRect> geometries{QRect(0, 0, 1280, 1024), QRect(1280, 0, 1280, 1024)};
const QList<QRect> geometries{QRect(0, 0, 1280, 1024), QRect(1280, 0, 1280, 1024)};
Test::setOutputConfig(geometries);
auto outputs = workspace()->outputs();
QCOMPARE(outputs.count(), 2);
@ -145,7 +145,7 @@ void ScreenChangesTest::testScreenAddRemove()
QSignalSpy o1RemovedSpy(o1.get(), &KWayland::Client::Output::removed);
QSignalSpy o2RemovedSpy(o2.get(), &KWayland::Client::Output::removed);
const QVector<QRect> geometries2{QRect(0, 0, 1280, 1024)};
const QList<QRect> geometries2{QRect(0, 0, 1280, 1024)};
Test::setOutputConfig(geometries2);
outputs = workspace()->outputs();
QCOMPARE(outputs.count(), 1);

View file

@ -117,14 +117,14 @@ void ScreensTest::testCurrent()
void ScreensTest::testCurrentWithFollowsMouse_data()
{
QTest::addColumn<QVector<QRect>>("geometries");
QTest::addColumn<QList<QRect>>("geometries");
QTest::addColumn<QPoint>("cursorPos");
QTest::addColumn<int>("expectedId");
QTest::newRow("cloned") << QVector<QRect>{{QRect{0, 0, 200, 100}, QRect{0, 0, 200, 100}}} << QPoint(50, 50) << 0;
QTest::newRow("adjacent-0") << QVector<QRect>{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(199, 99) << 0;
QTest::newRow("adjacent-1") << QVector<QRect>{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(200, 100) << 1;
QTest::newRow("gap") << QVector<QRect>{{QRect{0, 0, 10, 20}, QRect{20, 40, 10, 20}}} << QPoint(15, 30) << 1;
QTest::newRow("cloned") << QList<QRect>{{QRect{0, 0, 200, 100}, QRect{0, 0, 200, 100}}} << QPoint(50, 50) << 0;
QTest::newRow("adjacent-0") << QList<QRect>{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(199, 99) << 0;
QTest::newRow("adjacent-1") << QList<QRect>{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(200, 100) << 1;
QTest::newRow("gap") << QList<QRect>{{QRect{0, 0, 10, 20}, QRect{20, 40, 10, 20}}} << QPoint(15, 30) << 1;
}
void ScreensTest::testCurrentWithFollowsMouse()
@ -135,7 +135,7 @@ void ScreensTest::testCurrentWithFollowsMouse()
group.sync();
workspace()->slotReconfigure();
QFETCH(QVector<QRect>, geometries);
QFETCH(QList<QRect>, geometries);
Test::setOutputConfig(geometries);
QFETCH(QPoint, cursorPos);
@ -148,19 +148,19 @@ void ScreensTest::testCurrentWithFollowsMouse()
void ScreensTest::testCurrentPoint_data()
{
QTest::addColumn<QVector<QRect>>("geometries");
QTest::addColumn<QList<QRect>>("geometries");
QTest::addColumn<QPoint>("cursorPos");
QTest::addColumn<int>("expectedId");
QTest::newRow("cloned") << QVector<QRect>{{QRect{0, 0, 200, 100}, QRect{0, 0, 200, 100}}} << QPoint(50, 50) << 0;
QTest::newRow("adjacent-0") << QVector<QRect>{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(199, 99) << 0;
QTest::newRow("adjacent-1") << QVector<QRect>{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(200, 100) << 1;
QTest::newRow("gap") << QVector<QRect>{{QRect{0, 0, 10, 20}, QRect{20, 40, 10, 20}}} << QPoint(15, 30) << 1;
QTest::newRow("cloned") << QList<QRect>{{QRect{0, 0, 200, 100}, QRect{0, 0, 200, 100}}} << QPoint(50, 50) << 0;
QTest::newRow("adjacent-0") << QList<QRect>{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(199, 99) << 0;
QTest::newRow("adjacent-1") << QList<QRect>{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(200, 100) << 1;
QTest::newRow("gap") << QList<QRect>{{QRect{0, 0, 10, 20}, QRect{20, 40, 10, 20}}} << QPoint(15, 30) << 1;
}
void ScreensTest::testCurrentPoint()
{
QFETCH(QVector<QRect>, geometries);
QFETCH(QList<QRect>, geometries);
Test::setOutputConfig(geometries);
// Disable "active screen follows mouse"

View file

@ -427,7 +427,7 @@ void StrutsTest::test363804()
{
// this test verifies the condition described in BUG 363804
// two screens in a vertical setup, aligned to right border with panel on the bottom screen
const QVector<QRect> geometries{QRect(0, 0, 1920, 1080), QRect(554, 1080, 1366, 768)};
const QList<QRect> geometries{QRect(0, 0, 1920, 1080), QRect(554, 1080, 1366, 768)};
Test::setOutputConfig(geometries);
QCOMPARE(workspace()->geometry(), QRect(0, 0, 1920, 1848));
@ -504,7 +504,7 @@ void StrutsTest::testLeftScreenSmallerBottomAligned()
{
// this test verifies a two screen setup with the left screen smaller than the right and bottom aligned
// the panel is on the top of the left screen, thus not at 0/0
const QVector<QRect> geometries{QRect(0, 282, 1366, 768), QRect(1366, 0, 1680, 1050)};
const QList<QRect> geometries{QRect(0, 282, 1366, 768), QRect(1366, 0, 1680, 1050)};
Test::setOutputConfig(geometries);
QCOMPARE(workspace()->geometry(), QRect(0, 0, 3046, 1050));
@ -585,7 +585,7 @@ void StrutsTest::testWindowMoveWithPanelBetweenScreens()
// to the other even if there is a panel in between.
// left screen must be smaller than right screen
const QVector<QRect> geometries{QRect(0, 282, 1366, 768), QRect(1366, 0, 1680, 1050)};
const QList<QRect> geometries{QRect(0, 282, 1366, 768), QRect(1366, 0, 1680, 1050)};
Test::setOutputConfig(geometries);
QCOMPARE(workspace()->geometry(), QRect(0, 0, 3046, 1050));

View file

@ -280,8 +280,8 @@ static struct
KWayland::Client::Registry *registry = nullptr;
WaylandOutputManagementV2 *outputManagementV2 = nullptr;
QThread *thread = nullptr;
QVector<KWayland::Client::Output *> outputs;
QVector<WaylandOutputDeviceV2 *> outputDevicesV2;
QList<KWayland::Client::Output *> outputs;
QList<WaylandOutputDeviceV2 *> outputDevicesV2;
IdleInhibitManagerV1 *idleInhibitManagerV1 = nullptr;
KWayland::Client::AppMenuManager *appMenu = nullptr;
XdgDecorationManagerV1 *xdgDecorationManagerV1 = nullptr;
@ -697,7 +697,7 @@ TextInputManagerV3 *waylandTextInputManagerV3()
return s_waylandConnection.textInputManagerV3;
}
QVector<KWayland::Client::Output *> waylandOutputs()
QList<KWayland::Client::Output *> waylandOutputs()
{
return s_waylandConnection.outputs;
}
@ -717,7 +717,7 @@ ScreencastingV1 *screencasting()
return s_waylandConnection.screencastingV1;
}
QVector<KWin::Test::WaylandOutputDeviceV2 *> waylandOutputDevicesV2()
QList<KWin::Test::WaylandOutputDeviceV2 *> waylandOutputDevicesV2()
{
return s_waylandConnection.outputDevicesV2;
}
@ -1131,7 +1131,7 @@ bool renderNodeAvailable()
return false;
}
QVector<drmDevice *> devices(deviceCount);
QList<drmDevice *> devices(deviceCount);
if (drmGetDevices2(0, devices.data(), devices.size()) < 0) {
return false;
}

View file

@ -160,7 +160,7 @@ void VirtualDesktopTest::testWindowOnMultipleDesktops()
std::unique_ptr<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.get()));
auto window = Test::renderAndWaitForShown(surface.get(), QSize(100, 50), Qt::blue);
QVERIFY(window);
QCOMPARE(window->desktops(), (QVector<VirtualDesktop *>{desktops.at(2)}));
QCOMPARE(window->desktops(), (QList<VirtualDesktop *>{desktops.at(2)}));
// Set the window on desktop 2 as well
window->enterDesktop(VirtualDesktopManager::self()->desktopForX11Id(2));
@ -170,10 +170,10 @@ void VirtualDesktopTest::testWindowOnMultipleDesktops()
// leave desktop 3
window->leaveDesktop(desktops.at(2));
QCOMPARE(window->desktops(), (QVector<VirtualDesktop *>{desktops.at(1)}));
QCOMPARE(window->desktops(), (QList<VirtualDesktop *>{desktops.at(1)}));
// leave desktop 2
window->leaveDesktop(desktops.at(1));
QCOMPARE(window->desktops(), QVector<VirtualDesktop *>{});
QCOMPARE(window->desktops(), QList<VirtualDesktop *>{});
// we should be on all desktops now
QVERIFY(window->isOnAllDesktops());
// put on desktop 1

View file

@ -863,7 +863,7 @@ void TestXdgShellWindow::testSendClientWithTransientToDesktop()
VirtualDesktopManager *vds = VirtualDesktopManager::self();
vds->setCount(2);
const QVector<VirtualDesktop *> desktops = vds->desktops();
const QList<VirtualDesktop *> desktops = vds->desktops();
std::unique_ptr<KWayland::Client::Surface> surface{Test::createSurface()};
std::unique_ptr<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.get()));
@ -883,15 +883,15 @@ void TestXdgShellWindow::testSendClientWithTransientToDesktop()
QVERIFY(window->transients().contains(transient));
// initially, the parent and the transient are on the first virtual desktop
QCOMPARE(window->desktops(), QVector<VirtualDesktop *>{desktops[0]});
QCOMPARE(window->desktops(), QList<VirtualDesktop *>{desktops[0]});
QVERIFY(!window->isOnAllDesktops());
QCOMPARE(transient->desktops(), QVector<VirtualDesktop *>{desktops[0]});
QCOMPARE(transient->desktops(), QList<VirtualDesktop *>{desktops[0]});
QVERIFY(!transient->isOnAllDesktops());
// send the transient to the second virtual desktop
workspace()->slotWindowToDesktop(desktops[1]);
QCOMPARE(window->desktops(), QVector<VirtualDesktop *>{desktops[0]});
QCOMPARE(transient->desktops(), QVector<VirtualDesktop *>{desktops[1]});
QCOMPARE(window->desktops(), QList<VirtualDesktop *>{desktops[0]});
QCOMPARE(transient->desktops(), QList<VirtualDesktop *>{desktops[1]});
// activate c
workspace()->activateWindow(window);
@ -899,13 +899,13 @@ void TestXdgShellWindow::testSendClientWithTransientToDesktop()
QVERIFY(window->isActive());
// and send it to the desktop it's already on
QCOMPARE(window->desktops(), QVector<VirtualDesktop *>{desktops[0]});
QCOMPARE(transient->desktops(), QVector<VirtualDesktop *>{desktops[1]});
QCOMPARE(window->desktops(), QList<VirtualDesktop *>{desktops[0]});
QCOMPARE(transient->desktops(), QList<VirtualDesktop *>{desktops[1]});
workspace()->slotWindowToDesktop(desktops[0]);
// which should move the transient back to the desktop
QCOMPARE(window->desktops(), QVector<VirtualDesktop *>{desktops[0]});
QCOMPARE(transient->desktops(), QVector<VirtualDesktop *>{desktops[0]});
QCOMPARE(window->desktops(), QList<VirtualDesktop *>{desktops[0]});
QCOMPARE(transient->desktops(), QList<VirtualDesktop *>{desktops[0]});
}
void TestXdgShellWindow::testMinimizeWindowWithTransients()

View file

@ -966,10 +966,10 @@ void TestLibinputDevice::testSupportedButtons()
void TestLibinputDevice::testAlphaNumericKeyboard_data()
{
QTest::addColumn<QVector<quint32>>("supportedKeys");
QTest::addColumn<QList<quint32>>("supportedKeys");
QTest::addColumn<bool>("isAlpha");
QVector<quint32> keys;
QList<quint32> keys;
for (int i = KEY_1; i <= KEY_0; i++) {
keys << i;
@ -1006,7 +1006,7 @@ void TestLibinputDevice::testAlphaNumericKeyboard_data()
void TestLibinputDevice::testAlphaNumericKeyboard()
{
QFETCH(QVector<quint32>, supportedKeys);
QFETCH(QList<quint32>, supportedKeys);
libinput_device device;
device.keyboard = true;
device.keys = supportedKeys;

View file

@ -11,9 +11,9 @@
#include <libinput.h>
#include <QByteArray>
#include <QList>
#include <QPointF>
#include <QSizeF>
#include <QVector>
#include <array>
#include <chrono>
@ -74,7 +74,7 @@ struct libinput_device
quint32 scrollButton = 0;
int setScrollButtonReturnValue = 0;
Qt::MouseButtons supportedButtons;
QVector<quint32> keys;
QList<quint32> keys;
bool enabled = true;
int setEnableModeReturnValue = 0;
int setTapToClickReturnValue = 0;

View file

@ -201,7 +201,7 @@ static Version readVersion(const KConfigGroup &group, const char *entry)
if (parts.count() < 2) {
return Version();
}
QVector<qint64> versionParts;
QList<qint64> versionParts;
for (int i = 0; i < parts.count(); ++i) {
bool ok = false;
const auto value = parts.at(i).toLongLong(&ok);
@ -227,10 +227,10 @@ void GLPlatformTest::testDetect()
s_gl->getString.renderer = driverGroup.readEntry("Renderer").toUtf8();
s_gl->getString.version = driverGroup.readEntry("Version").toUtf8();
s_gl->getString.shadingLanguageVersion = driverGroup.readEntry("ShadingLanguageVersion").toUtf8();
s_gl->getString.extensions = QVector<QByteArray>{QByteArrayLiteral("GL_ARB_shader_objects"),
QByteArrayLiteral("GL_ARB_fragment_shader"),
QByteArrayLiteral("GL_ARB_vertex_shader"),
QByteArrayLiteral("GL_ARB_texture_non_power_of_two")};
s_gl->getString.extensions = QList<QByteArray>{QByteArrayLiteral("GL_ARB_shader_objects"),
QByteArrayLiteral("GL_ARB_fragment_shader"),
QByteArrayLiteral("GL_ARB_vertex_shader"),
QByteArrayLiteral("GL_ARB_texture_non_power_of_two")};
s_gl->getString.extensionsString = QByteArray();
auto *gl = GLPlatform::instance();

View file

@ -10,7 +10,7 @@
#define MOCK_GL_H
#include <QByteArray>
#include <QVector>
#include <QList>
struct MockGL
{
@ -19,7 +19,7 @@ struct MockGL
QByteArray vendor;
QByteArray renderer;
QByteArray version;
QVector<QByteArray> extensions;
QList<QByteArray> extensions;
QByteArray extensionsString;
QByteArray shadingLanguageVersion;
} getString;

View file

@ -843,7 +843,7 @@ void TestWaylandSurface::testOutput()
QVERIFY(surfaceCreatedSpy.wait());
auto serverSurface = surfaceCreatedSpy.first().first().value<SurfaceInterface *>();
QVERIFY(serverSurface);
QCOMPARE(serverSurface->outputs(), QVector<OutputInterface *>());
QCOMPARE(serverSurface->outputs(), QList<OutputInterface *>());
// create another registry to get notified about added outputs
KWayland::Client::Registry registry;
@ -865,31 +865,31 @@ void TestWaylandSurface::testOutput()
m_display->dispatchEvents();
// now enter it
serverSurface->setOutputs(QVector<OutputInterface *>{serverOutput.get()});
QCOMPARE(serverSurface->outputs(), QVector<OutputInterface *>{serverOutput.get()});
serverSurface->setOutputs(QList<OutputInterface *>{serverOutput.get()});
QCOMPARE(serverSurface->outputs(), QList<OutputInterface *>{serverOutput.get()});
QVERIFY(enteredSpy.wait());
QCOMPARE(enteredSpy.count(), 1);
QCOMPARE(enteredSpy.first().first().value<KWayland::Client::Output *>(), clientOutput.get());
QCOMPARE(s->outputs(), QVector<KWayland::Client::Output *>{clientOutput.get()});
QCOMPARE(s->outputs(), QList<KWayland::Client::Output *>{clientOutput.get()});
// adding to same should not trigger
serverSurface->setOutputs(QVector<OutputInterface *>{serverOutput.get()});
serverSurface->setOutputs(QList<OutputInterface *>{serverOutput.get()});
// leave again
serverSurface->setOutputs(QVector<OutputInterface *>());
QCOMPARE(serverSurface->outputs(), QVector<OutputInterface *>());
serverSurface->setOutputs(QList<OutputInterface *>());
QCOMPARE(serverSurface->outputs(), QList<OutputInterface *>());
QVERIFY(leftSpy.wait());
QCOMPARE(enteredSpy.count(), 1);
QCOMPARE(leftSpy.count(), 1);
QCOMPARE(leftSpy.first().first().value<KWayland::Client::Output *>(), clientOutput.get());
QCOMPARE(s->outputs(), QVector<KWayland::Client::Output *>());
QCOMPARE(s->outputs(), QList<KWayland::Client::Output *>());
// leave again should not trigger
serverSurface->setOutputs(QVector<OutputInterface *>());
serverSurface->setOutputs(QList<OutputInterface *>());
// and enter again, just to verify
serverSurface->setOutputs(QVector<OutputInterface *>{serverOutput.get()});
QCOMPARE(serverSurface->outputs(), QVector<OutputInterface *>{serverOutput.get()});
serverSurface->setOutputs(QList<OutputInterface *>{serverOutput.get()});
QCOMPARE(serverSurface->outputs(), QList<OutputInterface *>{serverOutput.get()});
QVERIFY(enteredSpy.wait());
QCOMPARE(enteredSpy.count(), 2);
QCOMPARE(leftSpy.count(), 1);
@ -899,7 +899,7 @@ void TestWaylandSurface::testOutput()
serverOutput.reset();
outputHandle.reset();
QVERIFY(leftSpy.wait());
QCOMPARE(serverSurface->outputs(), QVector<OutputInterface *>());
QCOMPARE(serverSurface->outputs(), QList<OutputInterface *>());
}
void TestWaylandSurface::testInhibit()

View file

@ -158,7 +158,7 @@ private:
DataControlDeviceManager *m_dataControlDeviceManager;
QVector<SurfaceInterface *> m_surfaces;
QList<SurfaceInterface *> m_surfaces;
};
static const QString s_socketName = QStringLiteral("kwin-wayland-datacontrol-test-0");

View file

@ -184,7 +184,7 @@ private:
KWin::InputMethodV1Interface *m_inputMethodIface;
KWin::InputPanelV1Interface *m_inputPanelIface;
QVector<SurfaceInterface *> m_surfaces;
QList<SurfaceInterface *> m_surfaces;
};
static const QString s_socketName = QStringLiteral("kwin-wayland-server-inputmethod-test-0");

View file

@ -85,8 +85,8 @@ private:
CompositorInterface *m_serverCompositor;
KeyboardShortcutsInhibitManagerV1Interface *m_manager;
QVector<SurfaceInterface *> m_surfaces;
QVector<wl_surface *> m_clientSurfaces;
QList<SurfaceInterface *> m_surfaces;
QList<wl_surface *> m_clientSurfaces;
KeyboardShortcutsInhibitManager *m_inhibitManagerClient = nullptr;
};

View file

@ -125,9 +125,9 @@ public:
Q_EMIT padAdded();
}
QVector<Tablet *> m_tablets;
QVector<TabletPad *> m_pads;
QVector<Tool *> m_tools;
QList<Tablet *> m_tablets;
QList<TabletPad *> m_pads;
QList<Tool *> m_tools;
Q_SIGNALS:
void padAdded();
@ -164,13 +164,13 @@ private:
TabletSeat *m_tabletSeatClient = nullptr;
TabletManagerV2Interface *m_tabletManager;
QVector<KWayland::Client::Surface *> m_surfacesClient;
QList<KWayland::Client::Surface *> m_surfacesClient;
TabletV2Interface *m_tablet;
TabletPadV2Interface *m_tabletPad = nullptr;
TabletToolV2Interface *m_tool;
QVector<SurfaceInterface *> m_surfaces;
QList<SurfaceInterface *> m_surfaces;
};
static const QString s_socketName = QStringLiteral("kwin-wayland-server-tablet-test-0");

View file

@ -297,9 +297,9 @@ void DrmBackend::sceneInitialized()
}
}
QVector<CompositingType> DrmBackend::supportedCompositors() const
QList<CompositingType> DrmBackend::supportedCompositors() const
{
return QVector<CompositingType>{OpenGLCompositing, QPainterCompositing};
return QList<CompositingType>{OpenGLCompositing, QPainterCompositing};
}
QString DrmBackend::supportInformation() const
@ -352,8 +352,8 @@ size_t DrmBackend::gpuCount() const
bool DrmBackend::applyOutputChanges(const OutputConfiguration &config)
{
QVector<DrmOutput *> toBeEnabled;
QVector<DrmOutput *> toBeDisabled;
QList<DrmOutput *> toBeEnabled;
QList<DrmOutput *> toBeDisabled;
for (const auto &gpu : std::as_const(m_gpus)) {
const auto &outputs = gpu->drmOutputs();
for (const auto &output : outputs) {

View file

@ -9,10 +9,10 @@
#pragma once
#include "core/outputbackend.h"
#include <QList>
#include <QPointer>
#include <QSize>
#include <QSocketNotifier>
#include <QVector>
#include <memory>
#include <sys/types.h>
@ -49,7 +49,7 @@ public:
Outputs outputs() const override;
Session *session() const override;
QVector<CompositingType> supportedCompositors() const override;
QList<CompositingType> supportedCompositors() const override;
QString supportInformation() const override;
Output *createVirtualOutput(const QString &name, const QSize &size, double scale) override;
@ -88,8 +88,8 @@ private:
std::unique_ptr<UdevMonitor> m_udevMonitor;
std::unique_ptr<QSocketNotifier> m_socketNotifier;
Session *m_session;
QVector<DrmAbstractOutput *> m_outputs;
QVector<QUuid> m_recentlyUnpluggedDpmsOffOutputs;
QList<DrmAbstractOutput *> m_outputs;
QList<QUuid> m_recentlyUnpluggedDpmsOffOutputs;
const QStringList m_explicitGpus;
std::vector<std::unique_ptr<DrmGpu>> m_gpus;

View file

@ -36,7 +36,7 @@ DrmGpu *DrmCommit::gpu() const
return m_gpu;
}
DrmAtomicCommit::DrmAtomicCommit(const QVector<DrmPipeline *> &pipelines)
DrmAtomicCommit::DrmAtomicCommit(const QList<DrmPipeline *> &pipelines)
: DrmCommit(pipelines.front()->gpu())
, m_pipelines(pipelines)
{

View file

@ -49,7 +49,7 @@ protected:
class DrmAtomicCommit : public DrmCommit
{
public:
DrmAtomicCommit(const QVector<DrmPipeline *> &pipelines);
DrmAtomicCommit(const QList<DrmPipeline *> &pipelines);
DrmAtomicCommit(const DrmAtomicCommit &copy) = default;
void addProperty(const DrmProperty &prop, uint64_t value);
@ -81,7 +81,7 @@ public:
private:
bool doCommit(uint32_t flags);
const QVector<DrmPipeline *> m_pipelines;
const QList<DrmPipeline *> m_pipelines;
std::unordered_map<const DrmProperty *, std::shared_ptr<DrmBlob>> m_blobs;
std::unordered_map<DrmPlane *, std::shared_ptr<DrmFramebuffer>> m_buffers;
std::unordered_set<DrmPlane *> m_planes;

View file

@ -326,7 +326,7 @@ void DrmConnector::disable(DrmAtomicCommit *commit)
commit->addProperty(crtcId, 0);
}
static const QVector<QSize> s_commonModes = {
static const QList<QSize> s_commonModes = {
/* 4:3 (1.33) */
QSize(1600, 1200),
QSize(1280, 1024), /* 5:4 (1.25) */

View file

@ -43,7 +43,7 @@ void DmabufFeedback::scanoutSuccessful(SurfaceInterface *surface)
}
}
void DmabufFeedback::scanoutFailed(SurfaceInterface *surface, const QMap<uint32_t, QVector<uint64_t>> &formats)
void DmabufFeedback::scanoutFailed(SurfaceInterface *surface, const QMap<uint32_t, QList<uint64_t>> &formats)
{
m_attemptedThisFrame = true;
if (surface != m_surface) {
@ -57,7 +57,7 @@ void DmabufFeedback::scanoutFailed(SurfaceInterface *surface, const QMap<uint32_
const DmaBufAttributes *dmabufAttrs = surface->buffer()->dmabufAttributes();
if (!m_attemptedFormats[dmabufAttrs->format].contains(dmabufAttrs->modifier)) {
m_attemptedFormats[dmabufAttrs->format] << dmabufAttrs->modifier;
QVector<LinuxDmaBufV1Feedback::Tranche> scanoutTranches;
QList<LinuxDmaBufV1Feedback::Tranche> scanoutTranches;
const auto tranches = m_eglBackend->tranches();
for (const auto &tranche : tranches) {
LinuxDmaBufV1Feedback::Tranche scanoutTranche;

View file

@ -8,9 +8,9 @@
*/
#pragma once
#include <QList>
#include <QMap>
#include <QPointer>
#include <QVector>
namespace KWin
{
@ -26,11 +26,11 @@ public:
void renderingSurface();
void scanoutSuccessful(SurfaceInterface *surface);
void scanoutFailed(SurfaceInterface *surface, const QMap<uint32_t, QVector<uint64_t>> &formats);
void scanoutFailed(SurfaceInterface *surface, const QMap<uint32_t, QList<uint64_t>> &formats);
private:
QPointer<SurfaceInterface> m_surface;
QMap<uint32_t, QVector<uint64_t>> m_attemptedFormats;
QMap<uint32_t, QList<uint64_t>> m_attemptedFormats;
bool m_attemptedThisFrame = false;
DrmGpu *const m_gpu;

View file

@ -27,9 +27,9 @@
namespace KWin
{
static const QVector<uint64_t> linearModifier = {DRM_FORMAT_MOD_LINEAR};
static const QVector<uint64_t> implicitModifier = {DRM_FORMAT_MOD_INVALID};
static const QVector<uint32_t> cpuCopyFormats = {DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888};
static const QList<uint64_t> linearModifier = {DRM_FORMAT_MOD_LINEAR};
static const QList<uint64_t> implicitModifier = {DRM_FORMAT_MOD_INVALID};
static const QList<uint32_t> cpuCopyFormats = {DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888};
static const bool bufferAgeEnabled = qEnvironmentVariable("KWIN_USE_BUFFER_AGE") != QStringLiteral("0");
@ -69,7 +69,7 @@ void EglGbmLayerSurface::destroyResources()
m_oldSurface = {};
}
std::optional<OutputLayerBeginFrameInfo> EglGbmLayerSurface::startRendering(const QSize &bufferSize, TextureTransforms transformation, const QMap<uint32_t, QVector<uint64_t>> &formats, const ColorDescription &colorDescription, const QVector3D &channelFactors, bool enableColormanagement)
std::optional<OutputLayerBeginFrameInfo> EglGbmLayerSurface::startRendering(const QSize &bufferSize, TextureTransforms transformation, const QMap<uint32_t, QList<uint64_t>> &formats, const ColorDescription &colorDescription, const QVector3D &channelFactors, bool enableColormanagement)
{
if (!checkSurface(bufferSize, formats)) {
return std::nullopt;
@ -206,7 +206,7 @@ const ColorDescription &EglGbmLayerSurface::colorDescription() const
}
}
bool EglGbmLayerSurface::doesSurfaceFit(const QSize &size, const QMap<uint32_t, QVector<uint64_t>> &formats) const
bool EglGbmLayerSurface::doesSurfaceFit(const QSize &size, const QMap<uint32_t, QList<uint64_t>> &formats) const
{
return doesSurfaceFit(m_surface.get(), size, formats);
}
@ -220,7 +220,7 @@ std::shared_ptr<GLTexture> EglGbmLayerSurface::texture() const
}
}
std::shared_ptr<DrmFramebuffer> EglGbmLayerSurface::renderTestBuffer(const QSize &bufferSize, const QMap<uint32_t, QVector<uint64_t>> &formats)
std::shared_ptr<DrmFramebuffer> EglGbmLayerSurface::renderTestBuffer(const QSize &bufferSize, const QMap<uint32_t, QList<uint64_t>> &formats)
{
if (checkSurface(bufferSize, formats)) {
return m_surface->currentFramebuffer;
@ -229,7 +229,7 @@ std::shared_ptr<DrmFramebuffer> EglGbmLayerSurface::renderTestBuffer(const QSize
}
}
bool EglGbmLayerSurface::checkSurface(const QSize &size, const QMap<uint32_t, QVector<uint64_t>> &formats)
bool EglGbmLayerSurface::checkSurface(const QSize &size, const QMap<uint32_t, QList<uint64_t>> &formats)
{
if (doesSurfaceFit(m_surface.get(), size, formats)) {
return true;
@ -246,7 +246,7 @@ bool EglGbmLayerSurface::checkSurface(const QSize &size, const QMap<uint32_t, QV
return false;
}
bool EglGbmLayerSurface::doesSurfaceFit(Surface *surface, const QSize &size, const QMap<uint32_t, QVector<uint64_t>> &formats) const
bool EglGbmLayerSurface::doesSurfaceFit(Surface *surface, const QSize &size, const QMap<uint32_t, QList<uint64_t>> &formats) const
{
if (!surface) {
return false;
@ -258,10 +258,10 @@ bool EglGbmLayerSurface::doesSurfaceFit(Surface *surface, const QSize &size, con
&& (surface->forceLinear || swapchain->modifier() == DRM_FORMAT_MOD_INVALID || formats[swapchain->format()].contains(swapchain->modifier()));
}
std::unique_ptr<EglGbmLayerSurface::Surface> EglGbmLayerSurface::createSurface(const QSize &size, const QMap<uint32_t, QVector<uint64_t>> &formats) const
std::unique_ptr<EglGbmLayerSurface::Surface> EglGbmLayerSurface::createSurface(const QSize &size, const QMap<uint32_t, QList<uint64_t>> &formats) const
{
QVector<FormatInfo> preferredFormats;
QVector<FormatInfo> fallbackFormats;
QList<FormatInfo> preferredFormats;
QList<FormatInfo> fallbackFormats;
for (auto it = formats.begin(); it != formats.end(); it++) {
const auto format = formatInfo(it.key());
if (format.has_value() && format->bitsPerColor >= 8) {
@ -284,7 +284,7 @@ std::unique_ptr<EglGbmLayerSurface::Surface> EglGbmLayerSurface::createSurface(c
return lhs.bitsPerPixel < rhs.bitsPerPixel;
}
};
const auto doTestFormats = [this, &size, &formats](const QVector<FormatInfo> &gbmFormats, MultiGpuImportMode importMode) -> std::unique_ptr<Surface> {
const auto doTestFormats = [this, &size, &formats](const QList<FormatInfo> &gbmFormats, MultiGpuImportMode importMode) -> std::unique_ptr<Surface> {
for (const auto &format : gbmFormats) {
if (m_formatOption == FormatOption::RequireAlpha && format.alphaBits == 0) {
continue;
@ -296,7 +296,7 @@ std::unique_ptr<EglGbmLayerSurface::Surface> EglGbmLayerSurface::createSurface(c
}
return nullptr;
};
const auto testFormats = [this, &sort, &doTestFormats](QVector<FormatInfo> &formats) -> std::unique_ptr<Surface> {
const auto testFormats = [this, &sort, &doTestFormats](QList<FormatInfo> &formats) -> std::unique_ptr<Surface> {
std::sort(formats.begin(), formats.end(), sort);
if (m_gpu == m_eglBackend->gpu()) {
return doTestFormats(formats, MultiGpuImportMode::None);
@ -328,9 +328,9 @@ std::unique_ptr<EglGbmLayerSurface::Surface> EglGbmLayerSurface::createSurface(c
}
}
static QVector<uint64_t> filterModifiers(const QVector<uint64_t> &one, const QVector<uint64_t> &two)
static QList<uint64_t> filterModifiers(const QList<uint64_t> &one, const QList<uint64_t> &two)
{
QVector<uint64_t> ret = one;
QList<uint64_t> ret = one;
ret.erase(std::remove_if(ret.begin(), ret.end(), [&two](uint64_t mod) {
return !two.contains(mod);
}),
@ -338,10 +338,10 @@ static QVector<uint64_t> filterModifiers(const QVector<uint64_t> &one, const QVe
return ret;
}
std::unique_ptr<EglGbmLayerSurface::Surface> EglGbmLayerSurface::createSurface(const QSize &size, uint32_t format, const QVector<uint64_t> &modifiers, MultiGpuImportMode importMode) const
std::unique_ptr<EglGbmLayerSurface::Surface> EglGbmLayerSurface::createSurface(const QSize &size, uint32_t format, const QList<uint64_t> &modifiers, MultiGpuImportMode importMode) const
{
const bool cpuCopy = importMode == MultiGpuImportMode::DumbBuffer || m_bufferTarget == BufferTarget::Dumb;
QVector<uint64_t> renderModifiers;
QList<uint64_t> renderModifiers;
auto ret = std::make_unique<Surface>();
if (importMode == MultiGpuImportMode::Egl) {
ret->importContext = m_eglBackend->contextForGpu(m_gpu);
@ -384,7 +384,7 @@ std::unique_ptr<EglGbmLayerSurface::Surface> EglGbmLayerSurface::createSurface(c
return ret;
}
std::shared_ptr<EglSwapchain> EglGbmLayerSurface::createGbmSwapchain(DrmGpu *gpu, EglContext *context, const QSize &size, uint32_t format, const QVector<uint64_t> &modifiers, bool preferLinear) const
std::shared_ptr<EglSwapchain> EglGbmLayerSurface::createGbmSwapchain(DrmGpu *gpu, EglContext *context, const QSize &size, uint32_t format, const QList<uint64_t> &modifiers, bool preferLinear) const
{
static bool modifiersEnvSet = false;
static const bool modifiersEnv = qEnvironmentVariableIntValue("KWIN_DRM_USE_MODIFIERS", &modifiersEnvSet) != 0;

View file

@ -53,15 +53,15 @@ public:
EglGbmLayerSurface(DrmGpu *gpu, EglGbmBackend *eglBackend, BufferTarget target = BufferTarget::Normal, FormatOption formatOption = FormatOption::PreferAlpha);
~EglGbmLayerSurface();
std::optional<OutputLayerBeginFrameInfo> startRendering(const QSize &bufferSize, TextureTransforms transformation, const QMap<uint32_t, QVector<uint64_t>> &formats, const ColorDescription &colorDescription, const QVector3D &channelFactors, bool enableColormanagement);
std::optional<OutputLayerBeginFrameInfo> startRendering(const QSize &bufferSize, TextureTransforms transformation, const QMap<uint32_t, QList<uint64_t>> &formats, const ColorDescription &colorDescription, const QVector3D &channelFactors, bool enableColormanagement);
bool endRendering(const QRegion &damagedRegion);
std::chrono::nanoseconds queryRenderTime() const;
bool doesSurfaceFit(const QSize &size, const QMap<uint32_t, QVector<uint64_t>> &formats) const;
bool doesSurfaceFit(const QSize &size, const QMap<uint32_t, QList<uint64_t>> &formats) const;
std::shared_ptr<GLTexture> texture() const;
void destroyResources();
EglGbmBackend *eglBackend() const;
std::shared_ptr<DrmFramebuffer> renderTestBuffer(const QSize &bufferSize, const QMap<uint32_t, QVector<uint64_t>> &formats);
std::shared_ptr<DrmFramebuffer> renderTestBuffer(const QSize &bufferSize, const QMap<uint32_t, QList<uint64_t>> &formats);
std::shared_ptr<DrmFramebuffer> currentBuffer() const;
const ColorDescription &colorDescription() const;
@ -103,11 +103,11 @@ private:
std::chrono::steady_clock::time_point renderStart;
std::chrono::steady_clock::time_point renderEnd;
};
bool checkSurface(const QSize &size, const QMap<uint32_t, QVector<uint64_t>> &formats);
bool doesSurfaceFit(Surface *surface, const QSize &size, const QMap<uint32_t, QVector<uint64_t>> &formats) const;
std::unique_ptr<Surface> createSurface(const QSize &size, const QMap<uint32_t, QVector<uint64_t>> &formats) const;
std::unique_ptr<Surface> createSurface(const QSize &size, uint32_t format, const QVector<uint64_t> &modifiers, MultiGpuImportMode importMode) const;
std::shared_ptr<EglSwapchain> createGbmSwapchain(DrmGpu *gpu, EglContext *context, const QSize &size, uint32_t format, const QVector<uint64_t> &modifiers, bool forceLinear) const;
bool checkSurface(const QSize &size, const QMap<uint32_t, QList<uint64_t>> &formats);
bool doesSurfaceFit(Surface *surface, const QSize &size, const QMap<uint32_t, QList<uint64_t>> &formats) const;
std::unique_ptr<Surface> createSurface(const QSize &size, const QMap<uint32_t, QList<uint64_t>> &formats) const;
std::unique_ptr<Surface> createSurface(const QSize &size, uint32_t format, const QList<uint64_t> &modifiers, MultiGpuImportMode importMode) const;
std::shared_ptr<EglSwapchain> createGbmSwapchain(DrmGpu *gpu, EglContext *context, const QSize &size, uint32_t format, const QList<uint64_t> &modifiers, bool forceLinear) const;
std::shared_ptr<DrmFramebuffer> doRenderTestBuffer(Surface *surface) const;
std::shared_ptr<DrmFramebuffer> importBuffer(Surface *surface, EglSwapchainSlot *source) const;

View file

@ -180,11 +180,11 @@ void DrmGpu::initDrmResources()
qCCritical(KWIN_DRM) << "drmModeGetResources for getting CRTCs failed on GPU" << m_devNode;
return;
}
QVector<DrmPlane *> assignedPlanes;
QList<DrmPlane *> assignedPlanes;
for (int i = 0; i < resources->count_crtcs; ++i) {
uint32_t crtcId = resources->crtcs[i];
QVector<DrmPlane *> primaryCandidates;
QVector<DrmPlane *> cursorCandidates;
QList<DrmPlane *> primaryCandidates;
QList<DrmPlane *> cursorCandidates;
for (const auto &plane : m_planes) {
if (plane->isCrtcSupported(i) && !assignedPlanes.contains(plane.get())) {
if (plane->type.enumValue() == DrmPlane::TypeIndex::Primary) {
@ -198,7 +198,7 @@ void DrmGpu::initDrmResources()
qCWarning(KWIN_DRM) << "Could not find a suitable primary plane for crtc" << resources->crtcs[i];
continue;
}
const auto findBestPlane = [crtcId](const QVector<DrmPlane *> &list) {
const auto findBestPlane = [crtcId](const QList<DrmPlane *> &list) {
// if the plane is already used with this crtc, prefer it
const auto connected = std::find_if(list.begin(), list.end(), [crtcId](DrmPlane *plane) {
return plane->crtcId.value() == crtcId;
@ -261,8 +261,8 @@ bool DrmGpu::updateOutputs()
}
// check for added and removed connectors
QVector<DrmConnector *> existing;
QVector<DrmOutput *> addedOutputs;
QList<DrmConnector *> existing;
QList<DrmOutput *> addedOutputs;
for (int i = 0; i < resources->count_connectors; ++i) {
const uint32_t currentConnector = resources->connectors[i];
const auto it = std::find_if(m_connectors.begin(), m_connectors.end(), [currentConnector](const auto &connector) {
@ -367,7 +367,7 @@ void DrmGpu::removeOutputs()
}
}
DrmPipeline::Error DrmGpu::checkCrtcAssignment(QVector<DrmConnector *> connectors, const QVector<DrmCrtc *> &crtcs)
DrmPipeline::Error DrmGpu::checkCrtcAssignment(QList<DrmConnector *> connectors, const QList<DrmCrtc *> &crtcs)
{
if (connectors.isEmpty() || crtcs.isEmpty()) {
if (m_pipelines.isEmpty()) {
@ -426,8 +426,8 @@ DrmPipeline::Error DrmGpu::checkCrtcAssignment(QVector<DrmConnector *> connector
DrmPipeline::Error DrmGpu::testPendingConfiguration()
{
QVector<DrmConnector *> connectors;
QVector<DrmCrtc *> crtcs;
QList<DrmConnector *> connectors;
QList<DrmCrtc *> crtcs;
// only change resources that aren't currently leased away
for (const auto &conn : m_connectors) {
bool isLeased = std::any_of(m_drmOutputs.cbegin(), m_drmOutputs.cend(), [&conn](const auto output) {
@ -456,7 +456,7 @@ DrmPipeline::Error DrmGpu::testPendingConfiguration()
DrmPipeline::Error DrmGpu::testPipelines()
{
QVector<DrmPipeline *> inactivePipelines;
QList<DrmPipeline *> inactivePipelines;
std::copy_if(m_pipelines.constBegin(), m_pipelines.constEnd(), std::back_inserter(inactivePipelines), [](const auto pipeline) {
return pipeline->enabled() && !pipeline->active();
});
@ -582,7 +582,7 @@ DrmBackend *DrmGpu::platform() const
return m_platform;
}
const QVector<DrmPipeline *> DrmGpu::pipelines() const
const QList<DrmPipeline *> DrmGpu::pipelines() const
{
return m_pipelines;
}
@ -603,9 +603,9 @@ void DrmGpu::removeVirtualOutput(DrmVirtualOutput *output)
}
}
std::unique_ptr<DrmLease> DrmGpu::leaseOutputs(const QVector<DrmOutput *> &outputs)
std::unique_ptr<DrmLease> DrmGpu::leaseOutputs(const QList<DrmOutput *> &outputs)
{
QVector<uint32_t> objects;
QList<uint32_t> objects;
for (DrmOutput *output : outputs) {
if (output->lease() || !output->addLeaseObjects(objects)) {
return nullptr;
@ -630,12 +630,12 @@ std::unique_ptr<DrmLease> DrmGpu::leaseOutputs(const QVector<DrmOutput *> &outpu
}
}
QVector<DrmVirtualOutput *> DrmGpu::virtualOutputs() const
QList<DrmVirtualOutput *> DrmGpu::virtualOutputs() const
{
return m_virtualOutputs;
}
QVector<DrmOutput *> DrmGpu::drmOutputs() const
QList<DrmOutput *> DrmGpu::drmOutputs() const
{
return m_drmOutputs;
}
@ -773,12 +773,12 @@ bool DrmGpu::maybeModeset()
}
}
QVector<DrmObject *> DrmGpu::unusedObjects() const
QList<DrmObject *> DrmGpu::unusedObjects() const
{
if (!m_atomicModeSetting) {
return {};
}
QVector<DrmObject *> ret = m_allObjects;
QList<DrmObject *> ret = m_allObjects;
for (const auto &pipeline : m_pipelines) {
ret.removeOne(pipeline->connector());
if (pipeline->crtc()) {
@ -906,7 +906,7 @@ std::shared_ptr<DrmFramebuffer> DrmGpu::importBuffer(GraphicsBuffer *buffer)
return std::make_shared<DrmFramebuffer>(this, framebufferId, buffer);
}
DrmLease::DrmLease(DrmGpu *gpu, FileDescriptor &&fd, uint32_t lesseeId, const QVector<DrmOutput *> &outputs)
DrmLease::DrmLease(DrmGpu *gpu, FileDescriptor &&fd, uint32_t lesseeId, const QList<DrmOutput *> &outputs)
: m_gpu(gpu)
, m_fd(std::move(fd))
, m_lesseeId(lesseeId)

View file

@ -11,10 +11,10 @@
#include "drm_pipeline.h"
#include "utils/filedescriptor.h"
#include <QList>
#include <QPointer>
#include <QSize>
#include <QSocketNotifier>
#include <QVector>
#include <qobject.h>
#include <epoxy/egl.h>
@ -43,7 +43,7 @@ class DrmLease : public QObject
{
Q_OBJECT
public:
DrmLease(DrmGpu *gpu, FileDescriptor &&fd, uint32_t lesseeId, const QVector<DrmOutput *> &outputs);
DrmLease(DrmGpu *gpu, FileDescriptor &&fd, uint32_t lesseeId, const QList<DrmOutput *> &outputs);
~DrmLease();
FileDescriptor &fd();
@ -56,7 +56,7 @@ private:
DrmGpu *const m_gpu;
FileDescriptor m_fd;
const uint32_t m_lesseeId;
const QVector<DrmOutput *> m_outputs;
const QList<DrmOutput *> m_outputs;
};
class DrmGpu : public QObject
@ -89,9 +89,9 @@ public:
clockid_t presentationClock() const;
QSize cursorSize() const;
QVector<DrmVirtualOutput *> virtualOutputs() const;
QVector<DrmOutput *> drmOutputs() const;
const QVector<DrmPipeline *> pipelines() const;
QList<DrmVirtualOutput *> virtualOutputs() const;
QList<DrmOutput *> drmOutputs() const;
const QList<DrmPipeline *> pipelines() const;
void setEglDisplay(std::unique_ptr<EglDisplay> &&display);
@ -111,7 +111,7 @@ public:
void recreateSurfaces();
FileDescriptor createNonMasterFd() const;
std::unique_ptr<DrmLease> leaseOutputs(const QVector<DrmOutput *> &outputs);
std::unique_ptr<DrmLease> leaseOutputs(const QList<DrmOutput *> &outputs);
void waitIdle();
Q_SIGNALS:
@ -125,9 +125,9 @@ private:
void removeOutput(DrmOutput *output);
void initDrmResources();
DrmPipeline::Error checkCrtcAssignment(QVector<DrmConnector *> connectors, const QVector<DrmCrtc *> &crtcs);
DrmPipeline::Error checkCrtcAssignment(QList<DrmConnector *> connectors, const QList<DrmCrtc *> &crtcs);
DrmPipeline::Error testPipelines();
QVector<DrmObject *> unusedObjects() const;
QList<DrmObject *> unusedObjects() const;
static void pageFlipHandler(int fd, unsigned int sequence, unsigned int sec, unsigned int usec, unsigned int crtc_id, void *user_data);
@ -151,11 +151,11 @@ private:
std::vector<std::unique_ptr<DrmPlane>> m_planes;
std::vector<std::unique_ptr<DrmCrtc>> m_crtcs;
std::vector<std::shared_ptr<DrmConnector>> m_connectors;
QVector<DrmObject *> m_allObjects;
QVector<DrmPipeline *> m_pipelines;
QList<DrmObject *> m_allObjects;
QList<DrmPipeline *> m_pipelines;
QVector<DrmOutput *> m_drmOutputs;
QVector<DrmVirtualOutput *> m_virtualOutputs;
QList<DrmOutput *> m_drmOutputs;
QList<DrmVirtualOutput *> m_virtualOutputs;
std::unique_ptr<QSocketNotifier> m_socketNotifier;
QSize m_cursorSize;

View file

@ -9,8 +9,8 @@
#pragma once
#include <QByteArray>
#include <QList>
#include <QMap>
#include <QVector>
#include <vector>

View file

@ -105,7 +105,7 @@ DrmOutput::~DrmOutput()
m_pipeline->setOutput(nullptr);
}
bool DrmOutput::addLeaseObjects(QVector<uint32_t> &objectList)
bool DrmOutput::addLeaseObjects(QList<uint32_t> &objectList)
{
if (!m_pipeline->crtc()) {
qCWarning(KWIN_DRM) << "Can't lease connector: No suitable crtc available";

View file

@ -12,12 +12,12 @@
#include "drm_object.h"
#include "drm_plane.h"
#include <QList>
#include <QObject>
#include <QPoint>
#include <QPointer>
#include <QSize>
#include <QTimer>
#include <QVector>
#include <chrono>
#include <xf86drmMode.h>
@ -54,7 +54,7 @@ public:
bool updateCursorLayer() override;
DrmLease *lease() const;
bool addLeaseObjects(QVector<uint32_t> &objectList);
bool addLeaseObjects(QList<uint32_t> &objectList);
void leased(DrmLease *lease);
void leaseEnded();

View file

@ -33,9 +33,9 @@ using namespace std::literals;
namespace KWin
{
static const QVector<uint64_t> implicitModifier = {DRM_FORMAT_MOD_INVALID};
static const QMap<uint32_t, QVector<uint64_t>> legacyFormats = {{DRM_FORMAT_XRGB8888, implicitModifier}};
static const QMap<uint32_t, QVector<uint64_t>> legacyCursorFormats = {{DRM_FORMAT_ARGB8888, implicitModifier}};
static const QList<uint64_t> implicitModifier = {DRM_FORMAT_MOD_INVALID};
static const QMap<uint32_t, QList<uint64_t>> legacyFormats = {{DRM_FORMAT_XRGB8888, implicitModifier}};
static const QMap<uint32_t, QList<uint64_t>> legacyCursorFormats = {{DRM_FORMAT_ARGB8888, implicitModifier}};
DrmPipeline::DrmPipeline(DrmConnector *conn)
: m_connector(conn)
@ -79,7 +79,7 @@ DrmPipeline::Error DrmPipeline::present()
Q_ASSERT(m_pending.crtc);
if (gpu()->atomicModeSetting()) {
// test the full state, to take pending commits into account
auto fullState = std::make_unique<DrmAtomicCommit>(QVector<DrmPipeline *>{this});
auto fullState = std::make_unique<DrmAtomicCommit>(QList<DrmPipeline *>{this});
if (Error err = prepareAtomicPresentation(fullState.get()); err != Error::None) {
return err;
}
@ -90,7 +90,7 @@ DrmPipeline::Error DrmPipeline::present()
return errnoToError();
}
// only give the actual state update to the commit thread, so that it can potentially reorder the commits
auto primaryPlaneUpdate = std::make_unique<DrmAtomicCommit>(QVector<DrmPipeline *>{this});
auto primaryPlaneUpdate = std::make_unique<DrmAtomicCommit>(QList<DrmPipeline *>{this});
if (Error err = prepareAtomicPresentation(primaryPlaneUpdate.get()); err != Error::None) {
return err;
}
@ -111,7 +111,7 @@ bool DrmPipeline::maybeModeset()
return gpu()->maybeModeset();
}
DrmPipeline::Error DrmPipeline::commitPipelines(const QVector<DrmPipeline *> &pipelines, CommitMode mode, const QVector<DrmObject *> &unusedObjects)
DrmPipeline::Error DrmPipeline::commitPipelines(const QList<DrmPipeline *> &pipelines, CommitMode mode, const QList<DrmObject *> &unusedObjects)
{
Q_ASSERT(!pipelines.isEmpty());
if (pipelines[0]->gpu()->atomicModeSetting()) {
@ -121,7 +121,7 @@ DrmPipeline::Error DrmPipeline::commitPipelines(const QVector<DrmPipeline *> &pi
}
}
DrmPipeline::Error DrmPipeline::commitPipelinesAtomic(const QVector<DrmPipeline *> &pipelines, CommitMode mode, const QVector<DrmObject *> &unusedObjects)
DrmPipeline::Error DrmPipeline::commitPipelinesAtomic(const QList<DrmPipeline *> &pipelines, CommitMode mode, const QList<DrmObject *> &unusedObjects)
{
auto commit = std::make_unique<DrmAtomicCommit>(pipelines);
if (mode == CommitMode::Test) {
@ -376,7 +376,7 @@ bool DrmPipeline::updateCursor()
return false;
}
// test the full state, to take pending commits into account
auto fullState = std::make_unique<DrmAtomicCommit>(QVector<DrmPipeline *>{this});
auto fullState = std::make_unique<DrmAtomicCommit>(QList<DrmPipeline *>{this});
if (prepareAtomicPresentation(fullState.get()) != Error::None) {
return false;
}
@ -385,7 +385,7 @@ bool DrmPipeline::updateCursor()
return false;
}
// only give the actual state update to the commit thread, so that it can potentially reorder the commits
auto cursorOnly = std::make_unique<DrmAtomicCommit>(QVector<DrmPipeline *>{this});
auto cursorOnly = std::make_unique<DrmAtomicCommit>(QList<DrmPipeline *>{this});
prepareAtomicCursor(cursorOnly.get());
cursorOnly->setCursorOnly(true);
m_commitThread->addCommit(std::move(cursorOnly));
@ -434,12 +434,12 @@ DrmOutput *DrmPipeline::output() const
return m_output;
}
QMap<uint32_t, QVector<uint64_t>> DrmPipeline::formats() const
QMap<uint32_t, QList<uint64_t>> DrmPipeline::formats() const
{
return m_pending.formats;
}
QMap<uint32_t, QVector<uint64_t>> DrmPipeline::cursorFormats() const
QMap<uint32_t, QList<uint64_t>> DrmPipeline::cursorFormats() const
{
if (m_pending.crtc && m_pending.crtc->cursorPlane()) {
return m_pending.crtc->cursorPlane()->formats();
@ -502,7 +502,7 @@ DrmGammaRamp::DrmGammaRamp(DrmCrtc *crtc, const std::shared_ptr<ColorTransformat
: m_lut(transformation, crtc->gammaRampSize())
{
if (crtc->gpu()->atomicModeSetting()) {
QVector<drm_color_lut> atomicLut(m_lut.size());
QList<drm_color_lut> atomicLut(m_lut.size());
for (uint32_t i = 0; i < m_lut.size(); i++) {
atomicLut[i].red = m_lut.red()[i];
atomicLut[i].green = m_lut.green()[i];

View file

@ -9,9 +9,9 @@
#pragma once
#include <QList>
#include <QPoint>
#include <QSize>
#include <QVector>
#include <chrono>
#include <xf86drmMode.h>
@ -93,8 +93,8 @@ public:
bool modesetPresentPending() const;
void resetModesetPresentPending();
QMap<uint32_t, QVector<uint64_t>> formats() const;
QMap<uint32_t, QVector<uint64_t>> cursorFormats() const;
QMap<uint32_t, QList<uint64_t>> formats() const;
QMap<uint32_t, QList<uint64_t>> cursorFormats() const;
bool pruneModifier();
void setOutput(DrmOutput *output);
@ -139,7 +139,7 @@ public:
CommitModeset
};
Q_ENUM(CommitMode)
static Error commitPipelines(const QVector<DrmPipeline *> &pipelines, CommitMode mode, const QVector<DrmObject *> &unusedObjects = {});
static Error commitPipelines(const QList<DrmPipeline *> &pipelines, CommitMode mode, const QList<DrmObject *> &unusedObjects = {});
private:
bool isBufferForDirectScanout() const;
@ -153,7 +153,7 @@ private:
Error legacyModeset();
Error applyPendingChangesLegacy();
bool setCursorLegacy();
static Error commitPipelinesLegacy(const QVector<DrmPipeline *> &pipelines, CommitMode mode);
static Error commitPipelinesLegacy(const QList<DrmPipeline *> &pipelines, CommitMode mode);
// atomic modesetting only
void atomicCommitSuccessful();
@ -161,7 +161,7 @@ private:
Error prepareAtomicPresentation(DrmAtomicCommit *commit);
void prepareAtomicCursor(DrmAtomicCommit *commit);
void prepareAtomicDisable(DrmAtomicCommit *commit);
static Error commitPipelinesAtomic(const QVector<DrmPipeline *> &pipelines, CommitMode mode, const QVector<DrmObject *> &unusedObjects);
static Error commitPipelinesAtomic(const QList<DrmPipeline *> &pipelines, CommitMode mode, const QList<DrmObject *> &unusedObjects);
DrmOutput *m_output = nullptr;
DrmConnector *m_connector = nullptr;
@ -172,7 +172,7 @@ private:
struct State
{
DrmCrtc *crtc = nullptr;
QMap<uint32_t, QVector<uint64_t>> formats;
QMap<uint32_t, QList<uint64_t>> formats;
bool active = true; // whether or not the pipeline should be currently used
bool enabled = true; // whether or not the pipeline needs a crtc
bool needsModeset = false;

View file

@ -65,7 +65,7 @@ DrmPipeline::Error DrmPipeline::legacyModeset()
return Error::None;
}
DrmPipeline::Error DrmPipeline::commitPipelinesLegacy(const QVector<DrmPipeline *> &pipelines, CommitMode mode)
DrmPipeline::Error DrmPipeline::commitPipelinesLegacy(const QList<DrmPipeline *> &pipelines, CommitMode mode)
{
Error err = Error::None;
for (const auto &pipeline : pipelines) {

View file

@ -96,7 +96,7 @@ bool DrmPlane::updateProperties()
}
} else {
// if we don't have modifier support, assume the cursor needs a linear buffer
const QVector<uint64_t> modifiers = {type.enumValue() == TypeIndex::Cursor ? DRM_FORMAT_MOD_LINEAR : DRM_FORMAT_MOD_INVALID};
const QList<uint64_t> modifiers = {type.enumValue() == TypeIndex::Cursor ? DRM_FORMAT_MOD_LINEAR : DRM_FORMAT_MOD_INVALID};
for (uint32_t i = 0; i < p->count_formats; i++) {
m_supportedFormats.insert(p->formats[i], modifiers);
}
@ -127,7 +127,7 @@ bool DrmPlane::isCrtcSupported(int pipeIndex) const
return (m_possibleCrtcs & (1 << pipeIndex));
}
QMap<uint32_t, QVector<uint64_t>> DrmPlane::formats() const
QMap<uint32_t, QList<uint64_t>> DrmPlane::formats() const
{
return m_supportedFormats;
}

View file

@ -33,7 +33,7 @@ public:
void disable(DrmAtomicCommit *commit) override;
bool isCrtcSupported(int pipeIndex) const;
QMap<uint32_t, QVector<uint64_t>> formats() const;
QMap<uint32_t, QList<uint64_t>> formats() const;
std::shared_ptr<DrmFramebuffer> currentBuffer() const;
void setCurrentBuffer(const std::shared_ptr<DrmFramebuffer> &b);
@ -83,7 +83,7 @@ public:
private:
std::shared_ptr<DrmFramebuffer> m_current;
QMap<uint32_t, QVector<uint64_t>> m_supportedFormats;
QMap<uint32_t, QList<uint64_t>> m_supportedFormats;
uint32_t m_possibleCrtcs;
};

View file

@ -17,7 +17,7 @@
namespace KWin
{
DrmProperty::DrmProperty(DrmObject *obj, const QByteArray &name, const QVector<QByteArray> &enumNames)
DrmProperty::DrmProperty(DrmObject *obj, const QByteArray &name, const QList<QByteArray> &enumNames)
: m_obj(obj)
, m_propName(name)
, m_enumNames(enumNames)

View file

@ -13,8 +13,8 @@
#include "drm_logging.h"
#include <QByteArray>
#include <QList>
#include <QMap>
#include <QVector>
#include <xf86drmMode.h>
@ -27,7 +27,7 @@ class DrmPropertyList;
class DrmProperty
{
public:
DrmProperty(DrmObject *obj, const QByteArray &name, const QVector<QByteArray> &enumNames = {});
DrmProperty(DrmObject *obj, const QByteArray &name, const QList<QByteArray> &enumNames = {});
const QByteArray &name() const;
DrmObject *drmObject() const;
@ -48,7 +48,7 @@ public:
protected:
DrmObject *const m_obj;
const QByteArray m_propName;
const QVector<QByteArray> m_enumNames;
const QList<QByteArray> m_enumNames;
uint32_t m_propId = 0;
// the last known value from the kernel
@ -69,7 +69,7 @@ template<typename Enum>
class DrmEnumProperty : public DrmProperty
{
public:
DrmEnumProperty(DrmObject *obj, const QByteArray &name, const QVector<QByteArray> &enumNames)
DrmEnumProperty(DrmObject *obj, const QByteArray &name, const QList<QByteArray> &enumNames)
: DrmProperty(obj, name, enumNames)
{
}

View file

@ -10,8 +10,8 @@
#include "drm_render_backend.h"
#include "platformsupport/scenes/qpainter/qpainterbackend.h"
#include <QList>
#include <QObject>
#include <QVector>
namespace KWin
{

View file

@ -117,7 +117,7 @@ std::shared_ptr<EglSwapchain> VirtualEglGbmLayer::createGbmSwapchain() const
}
}
static const QVector<uint64_t> implicitModifier{DRM_FORMAT_MOD_INVALID};
static const QList<uint64_t> implicitModifier{DRM_FORMAT_MOD_INVALID};
if (auto swapchain = EglSwapchain::create(m_eglBackend->gpu()->graphicsBufferAllocator(), m_eglBackend->contextObject(), size, format, implicitModifier)) {
return swapchain;
}

View file

@ -226,7 +226,7 @@ KWin::TabletToolId createTabletId(libinput_tablet_tool *tool, Device *dev)
toolType = InputRedirection::Totem;
break;
}
QVector<InputRedirection::Capability> capabilities;
QList<InputRedirection::Capability> capabilities;
if (libinput_tablet_tool_has_pressure(tool)) {
capabilities << InputRedirection::Pressure;
}
@ -586,7 +586,7 @@ void Connection::applyScreenToDevice(Device *device)
}
Output *deviceOutput = nullptr;
const QVector<Output *> outputs = kwinApp()->outputBackend()->outputs();
const QList<Output *> outputs = kwinApp()->outputBackend()->outputs();
// let's try to find a screen for it
if (!device->outputName().isEmpty()) {

View file

@ -12,12 +12,12 @@
#include <KSharedConfig>
#include <QList>
#include <QObject>
#include <QPointer>
#include <QRecursiveMutex>
#include <QSize>
#include <QStringList>
#include <QVector>
#include <deque>
class QSocketNotifier;
@ -76,7 +76,7 @@ private:
std::unique_ptr<QSocketNotifier> m_notifier;
QRecursiveMutex m_mutex;
std::deque<std::unique_ptr<Event>> m_eventQueue;
QVector<Device *> m_devices;
QList<Device *> m_devices;
KSharedConfigPtr m_config;
std::unique_ptr<ConnectionAdaptor> m_connectionAdaptor;
std::unique_ptr<Context> m_input;

View file

@ -14,11 +14,11 @@
#include <KConfigGroup>
#include <QList>
#include <QMatrix4x4>
#include <QObject>
#include <QPointer>
#include <QSizeF>
#include <QVector>
struct libinput_device;

View file

@ -186,9 +186,9 @@ InputRedirection::PointerButtonState PointerEvent::buttonState() const
}
}
QVector<InputRedirection::PointerAxis> PointerEvent::axis() const
QList<InputRedirection::PointerAxis> PointerEvent::axis() const
{
QVector<InputRedirection::PointerAxis> a;
QList<InputRedirection::PointerAxis> a;
if (libinput_event_pointer_has_axis(m_pointerEvent, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL)) {
a << InputRedirection::PointerAxisHorizontal;
}

View file

@ -84,7 +84,7 @@ public:
uint32_t button() const;
InputRedirection::PointerButtonState buttonState() const;
std::chrono::microseconds time() const;
QVector<InputRedirection::PointerAxis> axis() const;
QList<InputRedirection::PointerAxis> axis() const;
qreal scrollValue(InputRedirection::PointerAxis a) const;
qint32 scrollValueV120(InputRedirection::PointerAxis axis) const;

View file

@ -26,7 +26,7 @@ static FileDescriptor findRenderDevice()
return FileDescriptor{};
}
QVector<drmDevice *> devices(deviceCount);
QList<drmDevice *> devices(deviceCount);
if (drmGetDevices2(0, devices.data(), devices.size()) < 0) {
return FileDescriptor{};
}
@ -76,9 +76,9 @@ bool VirtualBackend::initialize()
return true;
}
QVector<CompositingType> VirtualBackend::supportedCompositors() const
QList<CompositingType> VirtualBackend::supportedCompositors() const
{
QVector<CompositingType> compositingTypes;
QList<CompositingType> compositingTypes;
if (m_gbmDevice) {
compositingTypes.append(OpenGLCompositing);
}
@ -123,9 +123,9 @@ Output *VirtualBackend::addOutput(const OutputInfo &info)
return output;
}
void VirtualBackend::setVirtualOutputs(const QVector<OutputInfo> &infos)
void VirtualBackend::setVirtualOutputs(const QList<OutputInfo> &infos)
{
const QVector<VirtualOutput *> removed = m_outputs;
const QList<VirtualOutput *> removed = m_outputs;
for (const auto &info : infos) {
createOutput(info);

View file

@ -40,11 +40,11 @@ public:
bool internal = false;
};
Output *addOutput(const OutputInfo &info);
void setVirtualOutputs(const QVector<OutputInfo> &infos);
void setVirtualOutputs(const QList<OutputInfo> &infos);
Outputs outputs() const override;
QVector<CompositingType> supportedCompositors() const override;
QList<CompositingType> supportedCompositors() const override;
void setEglDisplay(std::unique_ptr<EglDisplay> &&display);
EglDisplay *sceneEglDisplayObject() const override;
@ -57,7 +57,7 @@ Q_SIGNALS:
private:
VirtualOutput *createOutput(const OutputInfo &info);
QVector<VirtualOutput *> m_outputs;
QList<VirtualOutput *> m_outputs;
std::unique_ptr<EglDisplay> m_display;
FileDescriptor m_drmFileDescriptor;
gbm_device *m_gbmDevice = nullptr;

View file

@ -11,9 +11,9 @@
#include "core/outputlayer.h"
#include "platformsupport/scenes/qpainter/qpainterbackend.h"
#include <QList>
#include <QMap>
#include <QObject>
#include <QVector>
#include <chrono>
#include <memory>

View file

@ -562,9 +562,9 @@ void WaylandBackend::togglePointerLock()
m_pointerLockRequested = !m_pointerLockRequested;
}
QVector<CompositingType> WaylandBackend::supportedCompositors() const
QList<CompositingType> WaylandBackend::supportedCompositors() const
{
QVector<CompositingType> ret;
QList<CompositingType> ret;
if (m_display->linuxDmabuf() && m_gbmDevice) {
ret.append(OpenGLCompositing);
}

View file

@ -227,11 +227,11 @@ public:
bool supportsPointerLock();
void togglePointerLock();
QVector<CompositingType> supportedCompositors() const override;
QList<CompositingType> supportedCompositors() const override;
WaylandOutput *findOutput(KWayland::Client::Surface *nativeSurface) const;
Outputs outputs() const override;
QVector<WaylandOutput *> waylandOutputs() const
QList<WaylandOutput *> waylandOutputs() const
{
return m_outputs;
}
@ -265,7 +265,7 @@ private:
std::unique_ptr<WaylandDisplay> m_display;
std::unique_ptr<WaylandSeat> m_seat;
WaylandEglBackend *m_eglBackend = nullptr;
QVector<WaylandOutput *> m_outputs;
QList<WaylandOutput *> m_outputs;
bool m_pointerLockRequested = false;
FileDescriptor m_drmFileDescriptor;
gbm_device *m_gbmDevice = nullptr;

View file

@ -187,7 +187,7 @@ public:
dev_t mainDeviceId = 0;
dev_t trancheDeviceId = 0;
MemoryMap formatTable;
QHash<uint32_t, QVector<uint64_t>> formats;
QHash<uint32_t, QList<uint64_t>> formats;
private:
static void done(void *data, zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1)
@ -299,7 +299,7 @@ QByteArray WaylandLinuxDmabufV1::mainDevice() const
return m_defaultFeedback->mainDevice;
}
QHash<uint32_t, QVector<uint64_t>> WaylandLinuxDmabufV1::formats() const
QHash<uint32_t, QList<uint64_t>> WaylandLinuxDmabufV1::formats() const
{
return m_defaultFeedback->formats;
}

View file

@ -46,7 +46,7 @@ public:
zwp_linux_dmabuf_v1 *handle() const;
QByteArray mainDevice() const;
QHash<uint32_t, QVector<uint64_t>> formats() const;
QHash<uint32_t, QList<uint64_t>> formats() const;
private:
static void format(void *data, struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, uint32_t format);

View file

@ -62,9 +62,9 @@ std::optional<OutputLayerBeginFrameInfo> WaylandEglPrimaryLayer::beginFrame()
const QSize nativeSize = m_waylandOutput->modeSize();
if (!m_swapchain || m_swapchain->size() != nativeSize) {
const QHash<uint32_t, QVector<uint64_t>> formatTable = m_backend->backend()->display()->linuxDmabuf()->formats();
const QHash<uint32_t, QList<uint64_t>> formatTable = m_backend->backend()->display()->linuxDmabuf()->formats();
uint32_t format = DRM_FORMAT_INVALID;
QVector<uint64_t> modifiers;
QList<uint64_t> modifiers;
for (const uint32_t &candidateFormat : {DRM_FORMAT_XRGB2101010, DRM_FORMAT_XRGB8888}) {
auto it = formatTable.constFind(candidateFormat);
if (it != formatTable.constEnd()) {
@ -156,9 +156,9 @@ std::optional<OutputLayerBeginFrameInfo> WaylandEglCursorLayer::beginFrame()
const auto tmp = size().expandedTo(QSize(64, 64));
const QSize bufferSize(std::ceil(tmp.width()), std::ceil(tmp.height()));
if (!m_swapchain || m_swapchain->size() != bufferSize) {
const QHash<uint32_t, QVector<uint64_t>> formatTable = m_backend->backend()->display()->linuxDmabuf()->formats();
const QHash<uint32_t, QList<uint64_t>> formatTable = m_backend->backend()->display()->linuxDmabuf()->formats();
uint32_t format = DRM_FORMAT_INVALID;
QVector<uint64_t> modifiers;
QList<uint64_t> modifiers;
for (const uint32_t &candidateFormat : {DRM_FORMAT_ARGB2101010, DRM_FORMAT_ARGB8888}) {
auto it = formatTable.constFind(candidateFormat);
if (it != formatTable.constEnd()) {

View file

@ -256,9 +256,9 @@ void X11StandaloneBackend::createEffectsHandler(Compositor *compositor, Workspac
new EffectsHandlerImplX11(compositor, scene);
}
QVector<CompositingType> X11StandaloneBackend::supportedCompositors() const
QList<CompositingType> X11StandaloneBackend::supportedCompositors() const
{
QVector<CompositingType> compositors;
QList<CompositingType> compositors;
#if HAVE_GLX
compositors << OpenGLCompositing;
#endif
@ -286,9 +286,9 @@ void X11StandaloneBackend::updateOutputs()
template<typename T>
void X11StandaloneBackend::doUpdateOutputs()
{
QVector<Output *> changed;
QVector<Output *> added;
QVector<Output *> removed = m_outputs;
QList<Output *> changed;
QList<Output *> added;
QList<Output *> removed = m_outputs;
if (Xcb::Extensions::self()->isRandrAvailable()) {
T resources(rootWindow());
@ -481,7 +481,7 @@ static int currentRefreshRate()
return refreshRate;
}
const QVector<Output *> outputs = kwinApp()->outputBackend()->outputs();
const QList<Output *> outputs = kwinApp()->outputBackend()->outputs();
if (outputs.isEmpty()) {
return 60000;
}

View file

@ -52,7 +52,7 @@ public:
xcb_window_t rootWindow() const;
std::unique_ptr<OpenGLBackend> createOpenGLBackend() override;
QVector<CompositingType> supportedCompositors() const override;
QList<CompositingType> supportedCompositors() const override;
void initOutputs();
void scheduleUpdateOutputs();
@ -101,7 +101,7 @@ private:
std::unique_ptr<X11EventFilter> m_randrEventFilter;
std::unique_ptr<X11Keyboard> m_keyboard;
std::unique_ptr<RenderLoop> m_renderLoop;
QVector<Output *> m_outputs;
QList<Output *> m_outputs;
std::unique_ptr<EglDisplay> m_eglDisplay;
};

View file

@ -16,7 +16,7 @@ namespace KWin
{
EffectsKeyboardInterceptionX11Filter::EffectsKeyboardInterceptionX11Filter(EffectsHandlerImpl *effects, X11Keyboard *keyboard)
: X11EventFilter(QVector<int>{XCB_KEY_PRESS, XCB_KEY_RELEASE})
: X11EventFilter(QList<int>{XCB_KEY_PRESS, XCB_KEY_RELEASE})
, m_effects(effects)
, m_keyboard(keyboard)
{

View file

@ -16,7 +16,7 @@ namespace KWin
{
EffectsMouseInterceptionX11Filter::EffectsMouseInterceptionX11Filter(xcb_window_t window, EffectsHandlerImpl *effects)
: X11EventFilter(QVector<int>{XCB_BUTTON_PRESS, XCB_BUTTON_RELEASE, XCB_MOTION_NOTIFY})
: X11EventFilter(QList<int>{XCB_BUTTON_PRESS, XCB_BUTTON_RELEASE, XCB_MOTION_NOTIFY})
, m_effects(effects)
, m_window(window)
{

View file

@ -17,7 +17,7 @@
#include "workspace.h"
#include "x11_standalone_backend.h"
#include <QVector>
#include <QList>
#include <xcb/composite.h>
#include <xcb/shape.h>
@ -29,7 +29,7 @@ namespace KWin
{
OverlayWindowX11::OverlayWindowX11(X11StandaloneBackend *backend)
: OverlayWindow()
, X11EventFilter(QVector<int>{XCB_EXPOSE, XCB_VISIBILITY_NOTIFY})
, X11EventFilter(QList<int>{XCB_EXPOSE, XCB_VISIBILITY_NOTIFY})
, m_backend(backend)
, m_visible(true)
, m_shown(false)
@ -120,7 +120,7 @@ void OverlayWindowX11::setShape(const QRegion &reg)
if (reg == m_shape) {
return;
}
const QVector<xcb_rectangle_t> xrects = Xcb::regionToRects(reg);
const QList<xcb_rectangle_t> xrects = Xcb::regionToRects(reg);
xcb_shape_rectangles(connection(), XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED,
m_window, 0, 0, xrects.count(), xrects.data());
setupInputShape(m_window);

View file

@ -18,7 +18,7 @@ namespace KWin
{
ScreenEdgesFilter::ScreenEdgesFilter()
: X11EventFilter(QVector<int>{XCB_MOTION_NOTIFY, XCB_ENTER_NOTIFY, XCB_CLIENT_MESSAGE})
: X11EventFilter(QList<int>{XCB_MOTION_NOTIFY, XCB_ENTER_NOTIFY, XCB_CLIENT_MESSAGE})
{
}

View file

@ -24,7 +24,7 @@ namespace KWin
{
WindowSelector::WindowSelector()
: X11EventFilter(QVector<int>{
: X11EventFilter(QList<int>{
XCB_BUTTON_PRESS,
XCB_BUTTON_RELEASE,
XCB_MOTION_NOTIFY,

View file

@ -14,7 +14,7 @@ namespace KWin
{
XFixesCursorEventFilter::XFixesCursorEventFilter(X11Cursor *cursor)
: X11EventFilter(QVector<int>{Xcb::Extensions::self()->fixesCursorNotifyEvent()})
: X11EventFilter(QList<int>{Xcb::Extensions::self()->fixesCursorNotifyEvent()})
, m_cursor(cursor)
{
}

View file

@ -42,7 +42,7 @@ class XInputEventFilter : public X11EventFilter
{
public:
XInputEventFilter(int xi_opcode)
: X11EventFilter(XCB_GE_GENERIC, xi_opcode, QVector<int>{XI_RawMotion, XI_RawButtonPress, XI_RawButtonRelease, XI_RawKeyPress, XI_RawKeyRelease, XI_TouchBegin, XI_TouchUpdate, XI_TouchOwnership, XI_TouchEnd})
: X11EventFilter(XCB_GE_GENERIC, xi_opcode, QList<int>{XI_RawMotion, XI_RawButtonPress, XI_RawButtonRelease, XI_RawKeyPress, XI_RawKeyRelease, XI_TouchBegin, XI_TouchUpdate, XI_TouchOwnership, XI_TouchEnd})
{
}
~XInputEventFilter() override = default;

View file

@ -324,7 +324,7 @@ void X11WindowedBackend::initDri3()
while (it.rem > 0) {
uint32_t format = driFormatForDepth(it.data->depth);
if (format) {
QVector<uint64_t> &mods = m_driFormats[format];
QList<uint64_t> &mods = m_driFormats[format];
if (m_driMajorVersion > 1 || m_driMinorVersion >= 2) {
xcb_dri3_get_supported_modifiers_cookie_t cookie = xcb_dri3_get_supported_modifiers(m_connection, m_screen->root, it.data->depth, 32);
@ -754,7 +754,7 @@ bool X11WindowedBackend::hasXInput() const
return m_hasXInput;
}
QHash<uint32_t, QVector<uint64_t>> X11WindowedBackend::driFormats() const
QHash<uint32_t, QList<uint64_t>> X11WindowedBackend::driFormats() const
{
return m_driFormats;
}
@ -781,9 +781,9 @@ int X11WindowedBackend::driMinorVersion() const
return m_driMinorVersion;
}
QVector<CompositingType> X11WindowedBackend::supportedCompositors() const
QList<CompositingType> X11WindowedBackend::supportedCompositors() const
{
QVector<CompositingType> ret;
QList<CompositingType> ret;
if (m_gbmDevice) {
ret.append(OpenGLCompositing);
}

View file

@ -108,7 +108,7 @@ public:
bool hasXInput() const;
QHash<uint32_t, QVector<uint64_t>> driFormats() const;
QHash<uint32_t, QList<uint64_t>> driFormats() const;
uint32_t driFormatForDepth(int depth) const;
int driMajorVersion() const;
int driMinorVersion() const;
@ -117,7 +117,7 @@ public:
std::unique_ptr<OpenGLBackend> createOpenGLBackend() override;
std::unique_ptr<QPainterBackend> createQPainterBackend() override;
std::unique_ptr<InputBackend> createInputBackend() override;
QVector<CompositingType> supportedCompositors() const override;
QList<CompositingType> supportedCompositors() const override;
Outputs outputs() const override;
X11WindowedInputDevice *pointerDevice() const;
@ -173,13 +173,13 @@ private:
bool m_hasDri = false;
int m_driMajorVersion = 0;
int m_driMinorVersion = 0;
QHash<uint32_t, QVector<uint64_t>> m_driFormats;
QHash<uint32_t, QList<uint64_t>> m_driFormats;
FileDescriptor m_drmFileDescriptor;
gbm_device *m_gbmDevice = nullptr;
std::unique_ptr<EglDisplay> m_eglDisplay;
QVector<X11WindowedOutput *> m_outputs;
QList<X11WindowedOutput *> m_outputs;
};
} // namespace KWin

View file

@ -39,7 +39,7 @@ std::optional<OutputLayerBeginFrameInfo> X11WindowedEglPrimaryLayer::beginFrame(
const QSize bufferSize = m_output->modeSize();
if (!m_swapchain || m_swapchain->size() != bufferSize) {
const uint32_t format = DRM_FORMAT_XRGB8888;
const QHash<uint32_t, QVector<uint64_t>> formatTable = m_backend->backend()->driFormats();
const QHash<uint32_t, QList<uint64_t>> formatTable = m_backend->backend()->driFormats();
if (!formatTable.contains(format)) {
return std::nullopt;
}

View file

@ -12,8 +12,8 @@
#include "platformsupport/scenes/qpainter/qpainterbackend.h"
#include <QImage>
#include <QList>
#include <QObject>
#include <QVector>
#include <chrono>
#include <memory>

View file

@ -18,7 +18,7 @@ namespace KWin
class ColorManagerPrivate
{
public:
QVector<ColorDevice *> devices;
QList<ColorDevice *> devices;
};
ColorManager::ColorManager()
@ -36,7 +36,7 @@ ColorManager::ColorManager()
ColorManager::~ColorManager() = default;
QVector<ColorDevice *> ColorManager::devices() const
QList<ColorDevice *> ColorManager::devices() const
{
return d->devices;
}

View file

@ -38,7 +38,7 @@ public:
/**
* Returns the list of all available color devices.
*/
QVector<ColorDevice *> devices() const;
QList<ColorDevice *> devices() const;
Q_SIGNALS:
/**

View file

@ -120,8 +120,8 @@ void WaylandCompositor::start()
m_state = State::Starting;
// If compositing has been restarted, try to use the last used compositing type.
const QVector<CompositingType> availableCompositors = kwinApp()->outputBackend()->supportedCompositors();
QVector<CompositingType> candidateCompositors;
const QList<CompositingType> availableCompositors = kwinApp()->outputBackend()->supportedCompositors();
QList<CompositingType> candidateCompositors;
if (m_selectedCompositor != NoCompositing) {
candidateCompositors.append(m_selectedCompositor);

View file

@ -280,7 +280,7 @@ void X11Compositor::start()
XCB_COMPOSITE_REDIRECT_MANUAL);
// Decide what compositing types can be used.
QVector<CompositingType> candidateCompositors = kwinApp()->outputBackend()->supportedCompositors();
QList<CompositingType> candidateCompositors = kwinApp()->outputBackend()->supportedCompositors();
const auto userConfigIt = std::find(candidateCompositors.begin(), candidateCompositors.end(), options->compositingMode());
if (userConfigIt != candidateCompositors.end()) {
candidateCompositors.erase(userConfigIt);

View file

@ -8,7 +8,7 @@
*/
#pragma once
#include <QVector>
#include <QList>
#include <memory>
#include "kwin_export.h"
@ -30,7 +30,7 @@ public:
std::shared_ptr<ColorTransformation> transformation() const;
private:
QVector<uint16_t> m_data;
QList<uint16_t> m_data;
const std::shared_ptr<ColorTransformation> m_transformation;
};

View file

@ -8,8 +8,8 @@
#include "kwin_export.h"
#include <QList>
#include <QSize>
#include <QVector>
namespace KWin
{
@ -28,7 +28,7 @@ struct GraphicsBufferOptions
uint32_t format;
/// An optional list of modifiers, see DRM_FORMAT_MOD_*.
QVector<uint64_t> modifiers;
QList<uint64_t> modifiers;
/// Whether the graphics buffer should be suitable for software rendering.
bool software = false;

View file

@ -14,13 +14,13 @@
#include "utils/edid.h"
#include <QDebug>
#include <QList>
#include <QMatrix3x3>
#include <QMatrix4x4>
#include <QObject>
#include <QRect>
#include <QSize>
#include <QUuid>
#include <QVector>
namespace KWin
{

View file

@ -46,8 +46,8 @@ std::unique_ptr<QPainterBackend> OutputBackend::createQPainterBackend()
bool OutputBackend::applyOutputChanges(const OutputConfiguration &config)
{
const auto availableOutputs = outputs();
QVector<Output *> toBeEnabledOutputs;
QVector<Output *> toBeDisabledOutputs;
QList<Output *> toBeEnabledOutputs;
QList<Output *> toBeDisabledOutputs;
for (const auto &output : availableOutputs) {
if (const auto changeset = config.constChangeSet(output)) {
if (changeset->enabled) {

View file

@ -29,12 +29,12 @@ class OutputConfiguration;
class EglDisplay;
class Session;
class KWIN_EXPORT Outputs : public QVector<Output *>
class KWIN_EXPORT Outputs : public QList<Output *>
{
public:
Outputs(){};
template<typename T>
Outputs(const QVector<T> &other)
Outputs(const QList<T> &other)
{
resize(other.size());
std::copy(other.constBegin(), other.constEnd(), begin());
@ -72,7 +72,7 @@ public:
* The first item should be the most preferred one.
* @since 5.11
*/
virtual QVector<CompositingType> supportedCompositors() const = 0;
virtual QList<CompositingType> supportedCompositors() const = 0;
virtual Outputs outputs() const = 0;
Output *findOutput(const QString &name) const;

View file

@ -42,9 +42,9 @@ bool RenderBackend::testImportBuffer(GraphicsBuffer *buffer)
return false;
}
QHash<uint32_t, QVector<uint64_t>> RenderBackend::supportedFormats() const
QHash<uint32_t, QList<uint64_t>> RenderBackend::supportedFormats() const
{
return QHash<uint32_t, QVector<uint64_t>>{{DRM_FORMAT_XRGB8888, QVector<uint64_t>{DRM_FORMAT_MOD_LINEAR}}};
return QHash<uint32_t, QList<uint64_t>>{{DRM_FORMAT_XRGB8888, QList<uint64_t>{DRM_FORMAT_MOD_LINEAR}}};
}
std::unique_ptr<SurfaceTexture> RenderBackend::createSurfaceTextureX11(SurfacePixmapX11 *pixmap)

View file

@ -47,7 +47,7 @@ public:
virtual GraphicsBufferAllocator *graphicsBufferAllocator() const;
virtual bool testImportBuffer(GraphicsBuffer *buffer);
virtual QHash<uint32_t, QVector<uint64_t>> supportedFormats() const;
virtual QHash<uint32_t, QList<uint64_t>> supportedFormats() const;
virtual std::unique_ptr<SurfaceTexture> createSurfaceTextureX11(SurfacePixmapX11 *pixmap);
virtual std::unique_ptr<SurfaceTexture> createSurfaceTextureWayland(SurfacePixmap *pixmap);

View file

@ -330,9 +330,9 @@ void Cursor::doStopCursorTracking()
{
}
QVector<QByteArray> Cursor::cursorAlternativeNames(const QByteArray &name)
QList<QByteArray> Cursor::cursorAlternativeNames(const QByteArray &name)
{
static const QHash<QByteArray, QVector<QByteArray>> alternatives = {
static const QHash<QByteArray, QList<QByteArray>> alternatives = {
{
QByteArrayLiteral("left_ptr"),
{
@ -604,7 +604,7 @@ QVector<QByteArray> Cursor::cursorAlternativeNames(const QByteArray &name)
if (it != alternatives.end()) {
return it.value();
}
return QVector<QByteArray>();
return QList<QByteArray>();
}
QString Cursor::defaultThemeName()

View file

@ -139,7 +139,7 @@ public:
/**
* @return list of alternative names for the cursor with @p name
*/
static QVector<QByteArray> cursorAlternativeNames(const QByteArray &name);
static QList<QByteArray> cursorAlternativeNames(const QByteArray &name);
/**
* Returns the default Xcursor theme name.
*/
@ -304,7 +304,7 @@ private:
static Cursors *s_self;
Cursor *m_currentCursor = nullptr;
Cursor *m_mouse = nullptr;
QVector<Cursor *> m_cursors;
QList<Cursor *> m_cursors;
int m_cursorHideCounter = 0;
};

View file

@ -66,7 +66,7 @@ private:
KXcursorTheme m_theme;
QByteArray m_shape;
QVector<KXcursorSprite> m_sprites;
QList<KXcursorSprite> m_sprites;
QTimer m_delayTimer;
QImage m_image;
int m_currentSprite = -1;

View file

@ -361,7 +361,7 @@ VirtualDesktopManagerDBusInterface::VirtualDesktopManagerDBusInterface(VirtualDe
connect(m_manager, &VirtualDesktopManager::rowsChanged, this, &VirtualDesktopManagerDBusInterface::rowsChanged);
const QVector<VirtualDesktop *> allDesks = m_manager->desktops();
const QList<VirtualDesktop *> allDesks = m_manager->desktops();
for (auto *vd : allDesks) {
connect(vd, &VirtualDesktop::x11DesktopNumberChanged, this, [this, vd]() {
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};

View file

@ -899,7 +899,7 @@ static const quint32 s_windowBitMask = 0x0000FFFF;
static const quint32 s_idDistance = 10000;
template<class T>
void DebugConsoleModel::add(int parentRow, QVector<T *> &windows, T *window)
void DebugConsoleModel::add(int parentRow, QList<T *> &windows, T *window)
{
beginInsertRows(index(parentRow, 0, QModelIndex()), windows.count(), windows.count());
windows.append(window);
@ -907,7 +907,7 @@ void DebugConsoleModel::add(int parentRow, QVector<T *> &windows, T *window)
}
template<class T>
void DebugConsoleModel::remove(int parentRow, QVector<T *> &windows, T *window)
void DebugConsoleModel::remove(int parentRow, QList<T *> &windows, T *window)
{
const int remove = windows.indexOf(window);
if (remove == -1) {
@ -1032,7 +1032,7 @@ int DebugConsoleModel::rowCount(const QModelIndex &parent) const
}
template<class T>
QModelIndex DebugConsoleModel::indexForWindow(int row, int column, const QVector<T *> &windows, int id) const
QModelIndex DebugConsoleModel::indexForWindow(int row, int column, const QList<T *> &windows, int id) const
{
if (column != 0) {
return QModelIndex();
@ -1187,7 +1187,7 @@ QVariant DebugConsoleModel::propertyData(QObject *object, const QModelIndex &ind
}
template<class T>
QVariant DebugConsoleModel::windowData(const QModelIndex &index, int role, const QVector<T *> windows, const std::function<QString(T *)> &toString) const
QVariant DebugConsoleModel::windowData(const QModelIndex &index, int role, const QList<T *> windows, const std::function<QString(T *)> &toString) const
{
if (index.row() >= windows.count()) {
return QVariant();
@ -1273,7 +1273,7 @@ QVariant DebugConsoleModel::data(const QModelIndex &index, int role) const
}
template<class T>
static T *windowForIndex(const QModelIndex &index, const QVector<T *> &windows, int id)
static T *windowForIndex(const QModelIndex &index, const QList<T *> &windows, int id)
{
const qint32 row = (index.internalId() & s_windowBitMask) - (s_idDistance * id);
if (row < 0 || row >= windows.count()) {
@ -1561,7 +1561,7 @@ void InputDeviceModel::slotPropertyChanged()
if (metaProperty.notifySignalIndex() == senderSignalIndex()) {
const QModelIndex parent = index(m_devices.indexOf(device), 0, QModelIndex());
const QModelIndex child = index(i, 1, parent);
Q_EMIT dataChanged(child, child, QVector<int>{Qt::DisplayRole});
Q_EMIT dataChanged(child, child, QList<int>{Qt::DisplayRole});
}
}
}

View file

@ -14,8 +14,8 @@
#include <kwin_export.h>
#include <QAbstractItemModel>
#include <QList>
#include <QStyledItemDelegate>
#include <QVector>
#include <functional>
#include <memory>
@ -55,28 +55,28 @@ private Q_SLOTS:
private:
template<class T>
QModelIndex indexForWindow(int row, int column, const QVector<T *> &windows, int id) const;
QModelIndex indexForWindow(int row, int column, const QList<T *> &windows, int id) const;
template<class T>
QModelIndex indexForProperty(int row, int column, const QModelIndex &parent, T *(DebugConsoleModel::*filter)(const QModelIndex &) const) const;
template<class T>
int propertyCount(const QModelIndex &parent, T *(DebugConsoleModel::*filter)(const QModelIndex &) const) const;
QVariant propertyData(QObject *object, const QModelIndex &index, int role) const;
template<class T>
QVariant windowData(const QModelIndex &index, int role, const QVector<T *> windows, const std::function<QString(T *)> &toString) const;
QVariant windowData(const QModelIndex &index, int role, const QList<T *> windows, const std::function<QString(T *)> &toString) const;
template<class T>
void add(int parentRow, QVector<T *> &windows, T *window);
void add(int parentRow, QList<T *> &windows, T *window);
template<class T>
void remove(int parentRow, QVector<T *> &windows, T *window);
void remove(int parentRow, QList<T *> &windows, T *window);
WaylandWindow *waylandWindow(const QModelIndex &index) const;
InternalWindow *internalWindow(const QModelIndex &index) const;
X11Window *x11Window(const QModelIndex &index) const;
X11Window *unmanaged(const QModelIndex &index) const;
int topLevelRowCount() const;
QVector<WaylandWindow *> m_waylandWindows;
QVector<InternalWindow *> m_internalWindows;
QVector<X11Window *> m_x11Windows;
QVector<X11Window *> m_unmanageds;
QList<WaylandWindow *> m_waylandWindows;
QList<InternalWindow *> m_internalWindows;
QList<X11Window *> m_x11Windows;
QList<X11Window *> m_unmanageds;
};
class DebugConsoleDelegate : public QStyledItemDelegate
@ -196,6 +196,6 @@ public:
private:
AbstractDataSource *m_source = nullptr;
QVector<QByteArray> m_data;
QList<QByteArray> m_data;
};
}

View file

@ -251,8 +251,8 @@ static QString settingsProperty(const QVariant &variant)
{
if (QLatin1String(variant.typeName()) == QLatin1String("KDecoration2::BorderSize")) {
return QString::number(variant.toInt());
} else if (QLatin1String(variant.typeName()) == QLatin1String("QVector<KDecoration2::DecorationButtonType>")) {
const auto &b = variant.value<QVector<KDecoration2::DecorationButtonType>>();
} else if (QLatin1String(variant.typeName()) == QLatin1String("QList<KDecoration2::DecorationButtonType>")) {
const auto &b = variant.value<QList<KDecoration2::DecorationButtonType>>();
QString buffer;
for (auto it = b.begin(); it != b.end(); ++it) {
if (it != b.begin()) {

View file

@ -82,7 +82,7 @@ static void initButtons()
s_buttonNames[KDecoration2::DecorationButtonType::Shade] = QChar('L');
}
static QString buttonsToString(const QVector<KDecoration2::DecorationButtonType> &buttons)
static QString buttonsToString(const QList<KDecoration2::DecorationButtonType> &buttons)
{
auto buttonToString = [](KDecoration2::DecorationButtonType button) -> QChar {
const auto it = s_buttonNames.constFind(button);
@ -98,13 +98,13 @@ static QString buttonsToString(const QVector<KDecoration2::DecorationButtonType>
return ret;
}
QVector<KDecoration2::DecorationButtonType> SettingsImpl::readDecorationButtons(const KConfigGroup &config,
const char *key,
const QVector<KDecoration2::DecorationButtonType> &defaultValue) const
QList<KDecoration2::DecorationButtonType> SettingsImpl::readDecorationButtons(const KConfigGroup &config,
const char *key,
const QList<KDecoration2::DecorationButtonType> &defaultValue) const
{
initButtons();
auto buttonsFromString = [](const QString &buttons) -> QVector<KDecoration2::DecorationButtonType> {
QVector<KDecoration2::DecorationButtonType> ret;
auto buttonsFromString = [](const QString &buttons) -> QList<KDecoration2::DecorationButtonType> {
QList<KDecoration2::DecorationButtonType> ret;
for (auto it = buttons.begin(); it != buttons.end(); ++it) {
for (auto it2 = s_buttonNames.constBegin(); it2 != s_buttonNames.constEnd(); ++it2) {
if (it2.value() == (*it)) {
@ -139,12 +139,12 @@ static KDecoration2::BorderSize stringToSize(const QString &name)
void SettingsImpl::readSettings()
{
KConfigGroup config = kwinApp()->config()->group(QStringLiteral("org.kde.kdecoration2"));
const auto &left = readDecorationButtons(config, "ButtonsOnLeft", QVector<KDecoration2::DecorationButtonType>({KDecoration2::DecorationButtonType::Menu, KDecoration2::DecorationButtonType::OnAllDesktops}));
const auto &left = readDecorationButtons(config, "ButtonsOnLeft", QList<KDecoration2::DecorationButtonType>({KDecoration2::DecorationButtonType::Menu, KDecoration2::DecorationButtonType::OnAllDesktops}));
if (left != m_leftButtons) {
m_leftButtons = left;
Q_EMIT decorationSettings()->decorationButtonsLeftChanged(m_leftButtons);
}
const auto &right = readDecorationButtons(config, "ButtonsOnRight", QVector<KDecoration2::DecorationButtonType>({KDecoration2::DecorationButtonType::ContextHelp, KDecoration2::DecorationButtonType::Minimize, KDecoration2::DecorationButtonType::Maximize, KDecoration2::DecorationButtonType::Close}));
const auto &right = readDecorationButtons(config, "ButtonsOnRight", QList<KDecoration2::DecorationButtonType>({KDecoration2::DecorationButtonType::ContextHelp, KDecoration2::DecorationButtonType::Minimize, KDecoration2::DecorationButtonType::Maximize, KDecoration2::DecorationButtonType::Close}));
if (right != m_rightButtons) {
m_rightButtons = right;
Q_EMIT decorationSettings()->decorationButtonsRightChanged(m_rightButtons);

View file

@ -32,11 +32,11 @@ public:
{
return m_borderSize;
}
QVector<KDecoration2::DecorationButtonType> decorationButtonsLeft() const override
QList<KDecoration2::DecorationButtonType> decorationButtonsLeft() const override
{
return m_leftButtons;
}
QVector<KDecoration2::DecorationButtonType> decorationButtonsRight() const override
QList<KDecoration2::DecorationButtonType> decorationButtonsRight() const override
{
return m_rightButtons;
}
@ -47,11 +47,11 @@ public:
private:
void readSettings();
QVector<KDecoration2::DecorationButtonType> readDecorationButtons(const KConfigGroup &config,
const char *key,
const QVector<KDecoration2::DecorationButtonType> &defaultValue) const;
QVector<KDecoration2::DecorationButtonType> m_leftButtons;
QVector<KDecoration2::DecorationButtonType> m_rightButtons;
QList<KDecoration2::DecorationButtonType> readDecorationButtons(const KConfigGroup &config,
const char *key,
const QList<KDecoration2::DecorationButtonType> &defaultValue) const;
QList<KDecoration2::DecorationButtonType> m_leftButtons;
QList<KDecoration2::DecorationButtonType> m_rightButtons;
KDecoration2::BorderSize m_borderSize;
bool m_autoBorderSize = true;
bool m_closeDoubleClickMenu = false;

View file

@ -36,7 +36,7 @@ public:
private:
void notify();
QElapsedTimer m_doubleTapTimer;
QVector<qint32> m_touchPoints;
QList<qint32> m_touchPoints;
bool m_secondTap = false;
bool m_enableDoubleTap;
};

View file

@ -390,7 +390,7 @@ void PluginEffectLoader::queryAndLoadAll()
}
}
QVector<KPluginMetaData> PluginEffectLoader::findAllEffects() const
QList<KPluginMetaData> PluginEffectLoader::findAllEffects() const
{
return KPluginMetaData::findPlugins(m_pluginSubDirectory);
}

View file

@ -317,7 +317,7 @@ public:
void setPluginSubDirectory(const QString &directory);
private:
QVector<KPluginMetaData> findAllEffects() const;
QList<KPluginMetaData> findAllEffects() const;
KPluginMetaData findEffect(const QString &name) const;
EffectPluginFactory *factory(const KPluginMetaData &info) const;
QStringList m_loadedEffects;

View file

@ -128,7 +128,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, WorkspaceScene *s
, m_effectLoader(new EffectLoader(this))
, m_trackingCursorChanges(0)
{
qRegisterMetaType<QVector<KWin::EffectWindow *>>();
qRegisterMetaType<QList<KWin::EffectWindow *>>();
qRegisterMetaType<KWin::SessionState>();
connect(m_effectLoader, &AbstractEffectLoader::effectLoaded, this, [this](Effect *effect, const QString &name) {
effect_order.insert(effect->requestedEffectChainPosition(), EffectPair(name, effect));
@ -369,7 +369,7 @@ void EffectsHandlerImpl::startPaint()
{
m_activeEffects.clear();
m_activeEffects.reserve(loaded_effects.count());
for (QVector<KWin::EffectPair>::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
for (QList<KWin::EffectPair>::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if (it->second->isActive()) {
m_activeEffects << it->second;
}
@ -720,20 +720,20 @@ void EffectsHandlerImpl::moveWindow(EffectWindow *w, const QPoint &pos, bool sna
void EffectsHandlerImpl::windowToDesktop(EffectWindow *w, int desktop)
{
QVector<uint> desktopIds;
QList<uint> desktopIds;
if (desktop != -1) {
desktopIds.append(desktop);
}
windowToDesktops(w, desktopIds);
}
void EffectsHandlerImpl::windowToDesktops(EffectWindow *w, const QVector<uint> &desktopIds)
void EffectsHandlerImpl::windowToDesktops(EffectWindow *w, const QList<uint> &desktopIds)
{
auto window = static_cast<EffectWindowImpl *>(w)->window();
if (!window->isClient() || window->isDesktop() || window->isDock()) {
return;
}
QVector<VirtualDesktop *> desktops;
QList<VirtualDesktop *> desktops;
desktops.reserve(desktopIds.count());
for (uint x11Id : desktopIds) {
if (x11Id > VirtualDesktopManager::self()->count()) {
@ -1242,7 +1242,7 @@ void EffectsHandlerImpl::destroyEffect(Effect *effect)
void EffectsHandlerImpl::reconfigureEffect(const QString &name)
{
for (QVector<EffectPair>::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
for (QList<EffectPair>::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if ((*it).first == name) {
kwinApp()->config()->reparseConfiguration();
makeOpenGLContextCurrent();
@ -1289,7 +1289,7 @@ QList<bool> EffectsHandlerImpl::areEffectsSupported(const QStringList &names)
void EffectsHandlerImpl::reloadEffect(Effect *effect)
{
QString effectName;
for (QVector<EffectPair>::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
for (QList<EffectPair>::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if ((*it).second == effect) {
effectName = (*it).first;
break;
@ -1320,8 +1320,8 @@ void EffectsHandlerImpl::effectsChanged()
QStringList EffectsHandlerImpl::activeEffects() const
{
QStringList ret;
for (QVector<KWin::EffectPair>::const_iterator it = loaded_effects.constBegin(),
end = loaded_effects.constEnd();
for (QList<KWin::EffectPair>::const_iterator it = loaded_effects.constBegin(),
end = loaded_effects.constEnd();
it != end; ++it) {
if (it->second->isActive()) {
ret << it->first;
@ -1413,7 +1413,7 @@ bool EffectsHandlerImpl::isScreenLocked() const
QString EffectsHandlerImpl::debug(const QString &name, const QString &parameter) const
{
QString internalName = name.toLower();
for (QVector<EffectPair>::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
for (QList<EffectPair>::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if ((*it).first == internalName) {
return it->second->debug(parameter);
}
@ -1441,7 +1441,7 @@ bool EffectsHandlerImpl::animationsSupported() const
return m_scene->animationsSupported();
}
void EffectsHandlerImpl::highlightWindows(const QVector<EffectWindow *> &windows)
void EffectsHandlerImpl::highlightWindows(const QList<EffectWindow *> &windows)
{
Effect *e = provides(Effect::HighlightWindows);
if (!e) {
@ -1955,10 +1955,10 @@ qlonglong EffectWindowImpl::windowId() const
return 0;
}
QVector<uint> EffectWindowImpl::desktops() const
QList<uint> EffectWindowImpl::desktops() const
{
const auto desks = m_window->desktops();
QVector<uint> ids;
QList<uint> ids;
ids.reserve(desks.count());
std::transform(desks.constBegin(), desks.constEnd(), std::back_inserter(ids), [](const VirtualDesktop *vd) {
return vd->x11DesktopNumber();

Some files were not shown because too many files have changed in this diff Show more