Fix Build Warning
parent
d97f12c1c6
commit
788c65d260
|
@ -187,7 +187,7 @@ void ScriptedEffectsTest::testEffectsHandler()
|
||||||
// this triggers and tests some of the signals in EffectHandler, which is exposed to JS as context property "effects"
|
// this triggers and tests some of the signals in EffectHandler, which is exposed to JS as context property "effects"
|
||||||
auto *effect = new ScriptedEffectWithDebugSpy; // cleaned up in ::clean
|
auto *effect = new ScriptedEffectWithDebugSpy; // cleaned up in ::clean
|
||||||
QSignalSpy effectOutputSpy(effect, &ScriptedEffectWithDebugSpy::testOutput);
|
QSignalSpy effectOutputSpy(effect, &ScriptedEffectWithDebugSpy::testOutput);
|
||||||
auto waitFor = [&effectOutputSpy, this](const QString &expected) {
|
auto waitFor = [&effectOutputSpy](const QString &expected) {
|
||||||
QVERIFY(effectOutputSpy.count() > 0 || effectOutputSpy.wait());
|
QVERIFY(effectOutputSpy.count() > 0 || effectOutputSpy.wait());
|
||||||
QCOMPARE(effectOutputSpy.first().first(), expected);
|
QCOMPARE(effectOutputSpy.first().first(), expected);
|
||||||
effectOutputSpy.removeFirst();
|
effectOutputSpy.removeFirst();
|
||||||
|
|
|
@ -73,7 +73,6 @@ private:
|
||||||
KWayland::Client::Compositor *m_compositor = nullptr;
|
KWayland::Client::Compositor *m_compositor = nullptr;
|
||||||
KWayland::Client::Seat *m_seat = nullptr;
|
KWayland::Client::Seat *m_seat = nullptr;
|
||||||
KWayland::Client::ShmPool *m_shm = nullptr;
|
KWayland::Client::ShmPool *m_shm = nullptr;
|
||||||
KWayland::Client::Shell *m_shell = nullptr;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class HelperEffect : public Effect
|
class HelperEffect : public Effect
|
||||||
|
|
|
@ -119,7 +119,7 @@ void TestMaximized::testMaximizedPassedToDeco()
|
||||||
// now maximize
|
// now maximize
|
||||||
QSignalSpy bordersChangedSpy(decoration, &KDecoration2::Decoration::bordersChanged);
|
QSignalSpy bordersChangedSpy(decoration, &KDecoration2::Decoration::bordersChanged);
|
||||||
QVERIFY(bordersChangedSpy.isValid());
|
QVERIFY(bordersChangedSpy.isValid());
|
||||||
QSignalSpy maximizedChangedSpy(decoration->client().data(), &KDecoration2::DecoratedClient::maximizedChanged);
|
QSignalSpy maximizedChangedSpy(decoration->client().toStrongRef().data(), &KDecoration2::DecoratedClient::maximizedChanged);
|
||||||
QVERIFY(maximizedChangedSpy.isValid());
|
QVERIFY(maximizedChangedSpy.isValid());
|
||||||
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
||||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||||
|
|
|
@ -388,7 +388,7 @@ void MoveResizeWindowTest::testPackAgainstClient()
|
||||||
QVERIFY(!shellSurface3.isNull());
|
QVERIFY(!shellSurface3.isNull());
|
||||||
QScopedPointer<XdgShellSurface> shellSurface4(Test::createXdgShellStableSurface(surface4.data()));
|
QScopedPointer<XdgShellSurface> shellSurface4(Test::createXdgShellStableSurface(surface4.data()));
|
||||||
QVERIFY(!shellSurface4.isNull());
|
QVERIFY(!shellSurface4.isNull());
|
||||||
auto renderWindow = [this] (Surface *surface, const QString &methodCall, const QRect &expectedGeometry) {
|
auto renderWindow = [] (Surface *surface, const QString &methodCall, const QRect &expectedGeometry) {
|
||||||
// let's render
|
// let's render
|
||||||
auto c = Test::renderAndWaitForShown(surface, QSize(10, 10), Qt::blue);
|
auto c = Test::renderAndWaitForShown(surface, QSize(10, 10), Qt::blue);
|
||||||
|
|
||||||
|
|
|
@ -199,6 +199,7 @@ Device::Device(libinput_device *device, QObject *parent)
|
||||||
, m_scrollButton(libinput_device_config_scroll_get_button(m_device))
|
, m_scrollButton(libinput_device_config_scroll_get_button(m_device))
|
||||||
, m_defaultPointerAcceleration(libinput_device_config_accel_get_default_speed(m_device))
|
, m_defaultPointerAcceleration(libinput_device_config_accel_get_default_speed(m_device))
|
||||||
, m_pointerAcceleration(libinput_device_config_accel_get_speed(m_device))
|
, m_pointerAcceleration(libinput_device_config_accel_get_speed(m_device))
|
||||||
|
, m_scrollFactor(scrollFactorDefault())
|
||||||
, m_supportedPointerAccelerationProfiles(libinput_device_config_accel_get_profiles(m_device))
|
, m_supportedPointerAccelerationProfiles(libinput_device_config_accel_get_profiles(m_device))
|
||||||
, m_defaultPointerAccelerationProfile(libinput_device_config_accel_get_default_profile(m_device))
|
, m_defaultPointerAccelerationProfile(libinput_device_config_accel_get_default_profile(m_device))
|
||||||
, m_pointerAccelerationProfile(libinput_device_config_accel_get_profile(m_device))
|
, m_pointerAccelerationProfile(libinput_device_config_accel_get_profile(m_device))
|
||||||
|
@ -208,7 +209,6 @@ Device::Device(libinput_device *device, QObject *parent)
|
||||||
, m_supportedClickMethods(libinput_device_config_click_get_methods(m_device))
|
, m_supportedClickMethods(libinput_device_config_click_get_methods(m_device))
|
||||||
, m_defaultClickMethod(libinput_device_config_click_get_default_method(m_device))
|
, m_defaultClickMethod(libinput_device_config_click_get_default_method(m_device))
|
||||||
, m_clickMethod(libinput_device_config_click_get_method(m_device))
|
, m_clickMethod(libinput_device_config_click_get_method(m_device))
|
||||||
, m_scrollFactor(scrollFactorDefault())
|
|
||||||
{
|
{
|
||||||
libinput_device_ref(m_device);
|
libinput_device_ref(m_device);
|
||||||
|
|
||||||
|
|
|
@ -2111,7 +2111,7 @@ class KWINEFFECTS_EXPORT EffectWindow : public QObject
|
||||||
*
|
*
|
||||||
* @since 5.18
|
* @since 5.18
|
||||||
*/
|
*/
|
||||||
Q_PROPERTY(bool outline READ isOutline CONSTANT)
|
Q_PROPERTY(pid_t pid READ pid CONSTANT)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** Flags explaining why painting should be disabled */
|
/** Flags explaining why painting should be disabled */
|
||||||
|
|
|
@ -274,7 +274,7 @@ void SceneQPainter::Window::performPaint(int mask, const QRegion &_region, const
|
||||||
void SceneQPainter::Window::renderWindowPixmap(QPainter *painter, QPainterWindowPixmap *windowPixmap)
|
void SceneQPainter::Window::renderWindowPixmap(QPainter *painter, QPainterWindowPixmap *windowPixmap)
|
||||||
{
|
{
|
||||||
const QRegion shape = windowPixmap->shape();
|
const QRegion shape = windowPixmap->shape();
|
||||||
for (const QRectF &rect : shape) {
|
for (const QRectF rect : shape) {
|
||||||
const QPointF windowTopLeft = windowPixmap->mapToWindow(rect.topLeft());
|
const QPointF windowTopLeft = windowPixmap->mapToWindow(rect.topLeft());
|
||||||
const QPointF windowBottomRight = windowPixmap->mapToWindow(rect.bottomRight());
|
const QPointF windowBottomRight = windowPixmap->mapToWindow(rect.bottomRight());
|
||||||
|
|
||||||
|
|
|
@ -1030,7 +1030,7 @@ WindowQuadList Scene::Window::makeContentsQuads() const
|
||||||
const QRegion region = windowPixmap->shape();
|
const QRegion region = windowPixmap->shape();
|
||||||
const int quadId = id++;
|
const int quadId = id++;
|
||||||
|
|
||||||
for (const QRectF &rect : region) {
|
for (const QRectF rect : region) {
|
||||||
// Note that the window quad id is not unique if the window is shaped, i.e. the
|
// Note that the window quad id is not unique if the window is shaped, i.e. the
|
||||||
// region contains more than just one rectangle. We assume that the "source" quad
|
// region contains more than just one rectangle. We assume that the "source" quad
|
||||||
// had been subdivided.
|
// had been subdivided.
|
||||||
|
|
|
@ -177,12 +177,12 @@ void TabBoxHandlerPrivate::updateHighlightWindows()
|
||||||
TabBoxClientList order = q->stackingOrder();
|
TabBoxClientList order = q->stackingOrder();
|
||||||
int succIdx = order.count() + 1;
|
int succIdx = order.count() + 1;
|
||||||
for (int i=0; i<order.count(); ++i) {
|
for (int i=0; i<order.count(); ++i) {
|
||||||
if (order.at(i).data() == lastRaisedClient) {
|
if (order.at(i).toStrongRef() == lastRaisedClient) {
|
||||||
succIdx = i + 1;
|
succIdx = i + 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lastRaisedClientSucc = (succIdx < order.count()) ? order.at(succIdx).data() : nullptr;
|
lastRaisedClientSucc = (succIdx < order.count()) ? order.at(succIdx).toStrongRef().data() : nullptr;
|
||||||
q->raiseClient(lastRaisedClient);
|
q->raiseClient(lastRaisedClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,8 +116,8 @@ Workspace::Workspace()
|
||||||
, workspaceInit(true)
|
, workspaceInit(true)
|
||||||
, set_active_client_recursion(0)
|
, set_active_client_recursion(0)
|
||||||
, block_stacking_updates(0)
|
, block_stacking_updates(0)
|
||||||
, m_sessionManager(new SessionManager(this))
|
|
||||||
, m_quickTileCombineTimer(nullptr)
|
, m_quickTileCombineTimer(nullptr)
|
||||||
|
, m_sessionManager(new SessionManager(this))
|
||||||
, m_lastTilingMode(0)
|
, m_lastTilingMode(0)
|
||||||
{
|
{
|
||||||
// If KWin was already running it saved its configuration after loosing the selection -> Reread
|
// If KWin was already running it saved its configuration after loosing the selection -> Reread
|
||||||
|
|
|
@ -4395,7 +4395,7 @@ void X11Client::changeMaximize(bool horizontal, bool vertical, bool adjust)
|
||||||
// call into decoration update borders
|
// call into decoration update borders
|
||||||
if (isDecorated() && decoration()->client() && !(options->borderlessMaximizedWindows() && max_mode == KWin::MaximizeFull)) {
|
if (isDecorated() && decoration()->client() && !(options->borderlessMaximizedWindows() && max_mode == KWin::MaximizeFull)) {
|
||||||
changeMaximizeRecursion = true;
|
changeMaximizeRecursion = true;
|
||||||
const auto c = decoration()->client().data();
|
const auto c = decoration()->client().toStrongRef();
|
||||||
if ((max_mode & MaximizeVertical) != (old_mode & MaximizeVertical)) {
|
if ((max_mode & MaximizeVertical) != (old_mode & MaximizeVertical)) {
|
||||||
emit c->maximizedVerticallyChanged(max_mode & MaximizeVertical);
|
emit c->maximizedVerticallyChanged(max_mode & MaximizeVertical);
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,7 +218,7 @@ void Xvisit::sendPosition(const QPointF &globalPos)
|
||||||
}
|
}
|
||||||
m_pos.pending = true;
|
m_pos.pending = true;
|
||||||
|
|
||||||
xcb_client_message_data_t data = {0};
|
xcb_client_message_data_t data = {};
|
||||||
data.data32[0] = DataBridge::self()->dnd()->window();
|
data.data32[0] = DataBridge::self()->dnd()->window();
|
||||||
data.data32[2] = (x << 16) | y;
|
data.data32[2] = (x << 16) | y;
|
||||||
data.data32[3] = XCB_CURRENT_TIME;
|
data.data32[3] = XCB_CURRENT_TIME;
|
||||||
|
@ -273,7 +273,7 @@ void Xvisit::enter()
|
||||||
|
|
||||||
void Xvisit::sendEnter()
|
void Xvisit::sendEnter()
|
||||||
{
|
{
|
||||||
xcb_client_message_data_t data = {0};
|
xcb_client_message_data_t data = {};
|
||||||
data.data32[0] = DataBridge::self()->dnd()->window();
|
data.data32[0] = DataBridge::self()->dnd()->window();
|
||||||
data.data32[1] = m_version << 24;
|
data.data32[1] = m_version << 24;
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ void Xvisit::sendEnter()
|
||||||
const int mimesCount = mimeTypesNames.size();
|
const int mimesCount = mimeTypesNames.size();
|
||||||
size_t cnt = 0;
|
size_t cnt = 0;
|
||||||
size_t totalCnt = 0;
|
size_t totalCnt = 0;
|
||||||
for (const auto mimeName : mimeTypesNames) {
|
for (const auto &mimeName : mimeTypesNames) {
|
||||||
// 3 mimes and less can be sent directly in the XdndEnter message
|
// 3 mimes and less can be sent directly in the XdndEnter message
|
||||||
if (totalCnt == 3) {
|
if (totalCnt == 3) {
|
||||||
break;
|
break;
|
||||||
|
@ -308,7 +308,7 @@ void Xvisit::sendEnter()
|
||||||
targets.resize(mimesCount);
|
targets.resize(mimesCount);
|
||||||
|
|
||||||
size_t cnt = 0;
|
size_t cnt = 0;
|
||||||
for (const auto mimeName : mimeTypesNames) {
|
for (const auto &mimeName : mimeTypesNames) {
|
||||||
const auto atom = Selection::mimeTypeToAtom(mimeName);
|
const auto atom = Selection::mimeTypeToAtom(mimeName);
|
||||||
if (atom != XCB_ATOM_NONE) {
|
if (atom != XCB_ATOM_NONE) {
|
||||||
targets[cnt] = atom;
|
targets[cnt] = atom;
|
||||||
|
@ -328,7 +328,7 @@ void Xvisit::sendEnter()
|
||||||
|
|
||||||
void Xvisit::sendDrop(uint32_t time)
|
void Xvisit::sendDrop(uint32_t time)
|
||||||
{
|
{
|
||||||
xcb_client_message_data_t data = {0};
|
xcb_client_message_data_t data = {};
|
||||||
data.data32[0] = DataBridge::self()->dnd()->window();
|
data.data32[0] = DataBridge::self()->dnd()->window();
|
||||||
data.data32[2] = time;
|
data.data32[2] = time;
|
||||||
|
|
||||||
|
@ -341,7 +341,7 @@ void Xvisit::sendDrop(uint32_t time)
|
||||||
|
|
||||||
void Xvisit::sendLeave()
|
void Xvisit::sendLeave()
|
||||||
{
|
{
|
||||||
xcb_client_message_data_t data = {0};
|
xcb_client_message_data_t data = {};
|
||||||
data.data32[0] = DataBridge::self()->dnd()->window();
|
data.data32[0] = DataBridge::self()->dnd()->window();
|
||||||
Drag::sendClientMessage(m_target->window(), atoms->xdnd_leave, &data);
|
Drag::sendClientMessage(m_target->window(), atoms->xdnd_leave, &data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -227,7 +227,7 @@ void XToWlDrag::setOffers(const Mimes &offers)
|
||||||
// TODO: make sure that offers are not changed in between visits
|
// TODO: make sure that offers are not changed in between visits
|
||||||
|
|
||||||
m_offersPending = m_offers = offers;
|
m_offersPending = m_offers = offers;
|
||||||
for (const auto mimePair : offers) {
|
for (const auto &mimePair : offers) {
|
||||||
m_dataSource->offer(mimePair.first);
|
m_dataSource->offer(mimePair.first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -371,7 +371,7 @@ bool WlVisit::handleEnter(xcb_client_message_event_t *event)
|
||||||
for (size_t i = 0; i < 3; i++) {
|
for (size_t i = 0; i < 3; i++) {
|
||||||
xcb_atom_t mimeAtom = data->data32[2 + i];
|
xcb_atom_t mimeAtom = data->data32[2 + i];
|
||||||
const auto mimeStrings = atomToMimeTypes(mimeAtom);
|
const auto mimeStrings = atomToMimeTypes(mimeAtom);
|
||||||
for (const auto mime : mimeStrings ) {
|
for (const auto &mime : mimeStrings ) {
|
||||||
if (!hasMimeName(offers, mime)) {
|
if (!hasMimeName(offers, mime)) {
|
||||||
offers << Mime(mime, mimeAtom);
|
offers << Mime(mime, mimeAtom);
|
||||||
}
|
}
|
||||||
|
@ -409,7 +409,7 @@ void WlVisit::getMimesFromWinProperty(Mimes &offers)
|
||||||
xcb_atom_t *mimeAtoms = static_cast<xcb_atom_t *>(xcb_get_property_value(reply));
|
xcb_atom_t *mimeAtoms = static_cast<xcb_atom_t *>(xcb_get_property_value(reply));
|
||||||
for (size_t i = 0; i < reply->value_len; ++i) {
|
for (size_t i = 0; i < reply->value_len; ++i) {
|
||||||
const auto mimeStrings = atomToMimeTypes(mimeAtoms[i]);
|
const auto mimeStrings = atomToMimeTypes(mimeAtoms[i]);
|
||||||
for (const auto mime : mimeStrings) {
|
for (const auto &mime : mimeStrings) {
|
||||||
if (!hasMimeName(offers, mime)) {
|
if (!hasMimeName(offers, mime)) {
|
||||||
offers << Mime(mime, mimeAtoms[i]);
|
offers << Mime(mime, mimeAtoms[i]);
|
||||||
}
|
}
|
||||||
|
@ -495,7 +495,7 @@ void WlVisit::sendStatus()
|
||||||
// accept the drop
|
// accept the drop
|
||||||
flags |= (1 << 0);
|
flags |= (1 << 0);
|
||||||
}
|
}
|
||||||
xcb_client_message_data_t data = {0};
|
xcb_client_message_data_t data = {};
|
||||||
data.data32[0] = m_window;
|
data.data32[0] = m_window;
|
||||||
data.data32[1] = flags;
|
data.data32[1] = flags;
|
||||||
data.data32[4] = flags & (1 << 0) ? m_actionAtom : static_cast<uint32_t>(XCB_ATOM_NONE);
|
data.data32[4] = flags & (1 << 0) ? m_actionAtom : static_cast<uint32_t>(XCB_ATOM_NONE);
|
||||||
|
@ -505,7 +505,7 @@ void WlVisit::sendStatus()
|
||||||
void WlVisit::sendFinished()
|
void WlVisit::sendFinished()
|
||||||
{
|
{
|
||||||
const bool accepted = m_entered && m_action != DnDAction::None;
|
const bool accepted = m_entered && m_action != DnDAction::None;
|
||||||
xcb_client_message_data_t data = {0};
|
xcb_client_message_data_t data = {};
|
||||||
data.data32[0] = m_window;
|
data.data32[0] = m_window;
|
||||||
data.data32[1] = accepted;
|
data.data32[1] = accepted;
|
||||||
data.data32[2] = accepted ? m_actionAtom : static_cast<uint32_t>(XCB_ATOM_NONE);
|
data.data32[2] = accepted ? m_actionAtom : static_cast<uint32_t>(XCB_ATOM_NONE);
|
||||||
|
|
|
@ -92,7 +92,7 @@ void WlSource::sendTargets(xcb_selection_request_event_t *event)
|
||||||
targets[1] = atoms->targets;
|
targets[1] = atoms->targets;
|
||||||
|
|
||||||
size_t cnt = 2;
|
size_t cnt = 2;
|
||||||
for (const auto mime : m_offers) {
|
for (const auto &mime : m_offers) {
|
||||||
targets[cnt] = Selection::mimeTypeToAtom(mime);
|
targets[cnt] = Selection::mimeTypeToAtom(mime);
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ void X11Source::handleTargets()
|
||||||
all << mimePair;
|
all << mimePair;
|
||||||
}
|
}
|
||||||
// all left in m_offers are not in the updated targets
|
// all left in m_offers are not in the updated targets
|
||||||
for (const auto mimePair : m_offers) {
|
for (const auto &mimePair : m_offers) {
|
||||||
removed << mimePair.first;
|
removed << mimePair.first;
|
||||||
}
|
}
|
||||||
m_offers = all;
|
m_offers = all;
|
||||||
|
|
Loading…
Reference in New Issue