chore: clean up lints

This commit is contained in:
outfoxxed 2024-02-28 21:30:06 -08:00
parent 4eac0b40c3
commit cbdfba1a3f
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
13 changed files with 32 additions and 52 deletions

View file

@ -5,14 +5,13 @@
#include <private/qwaylandwindow_p.h>
#include "surface.hpp"
#include "wayland-wlr-layer-shell-unstable-v1-client-protocol.h"
QSWaylandLayerShellIntegration::QSWaylandLayerShellIntegration()
: QtWaylandClient::QWaylandShellIntegrationTemplate<QSWaylandLayerShellIntegration>(4) {}
QSWaylandLayerShellIntegration::~QSWaylandLayerShellIntegration() {
if (this->object() != nullptr) {
zwlr_layer_shell_v1_destroy(this->object());
if (this->isInitialized()) {
this->destroy();
}
}

View file

@ -2,7 +2,7 @@
#include <private/qwaylandshellintegration_p.h>
#include <private/qwaylandshellsurface_p.h>
#include <qtwaylandclientexports.h>
#include <qtclasshelpermacros.h>
#include <qwayland-wlr-layer-shell-unstable-v1.h>
class QSWaylandLayerShellIntegration
@ -11,10 +11,7 @@ class QSWaylandLayerShellIntegration
public:
QSWaylandLayerShellIntegration();
~QSWaylandLayerShellIntegration() override;
QSWaylandLayerShellIntegration(QSWaylandLayerShellIntegration&&) = delete;
QSWaylandLayerShellIntegration(const QSWaylandLayerShellIntegration&) = delete;
void operator=(QSWaylandLayerShellIntegration&&) = delete;
void operator=(const QSWaylandLayerShellIntegration&) = delete;
Q_DISABLE_COPY_MOVE(QSWaylandLayerShellIntegration);
QtWaylandClient::QWaylandShellSurface* createShellSurface(QtWaylandClient::QWaylandWindow* window
) override;

View file

@ -23,12 +23,11 @@
[[nodiscard]] QSize constrainedSize(const Anchors& anchors, const QSize& size) noexcept;
// clang-format on
// clang-format off
QSWaylandLayerSurface::QSWaylandLayerSurface(
QSWaylandLayerShellIntegration* shell,
QtWaylandClient::QWaylandWindow* window
): QtWaylandClient::QWaylandShellSurface(window) {
// clang-format on
)
: QtWaylandClient::QWaylandShellSurface(window) {
auto* qwindow = window->window();
this->ext = LayershellWindowExtension::get(qwindow);
@ -37,7 +36,7 @@ QSWaylandLayerSurface::QSWaylandLayerSurface(
throw "QSWaylandLayerSurface created with null LayershellWindowExtension";
}
wl_output* output = nullptr; // NOLINT (import)
wl_output* output = nullptr; // NOLINT (include)
if (this->ext->useWindowScreen) {
auto* waylandScreen =
dynamic_cast<QtWaylandClient::QWaylandScreen*>(qwindow->screen()->handle());
@ -45,8 +44,8 @@ QSWaylandLayerSurface::QSWaylandLayerSurface(
if (waylandScreen != nullptr) {
output = waylandScreen->output();
} else {
qWarning() << "Layershell screen is set but does not corrospond to a real screen. Letting "
"the compositor pick.";
qWarning(
) << "Layershell screen does not corrospond to a real screen. Letting the compositor pick.";
}
}

View file

@ -2,6 +2,7 @@
#include <private/qwaylandshellsurface_p.h>
#include <private/qwaylandwindow_p.h>
#include <qtclasshelpermacros.h>
#include <qtwaylandclientexports.h>
#include <qtypes.h>
#include <qwayland-wlr-layer-shell-unstable-v1.h>
@ -20,10 +21,7 @@ public:
);
~QSWaylandLayerSurface() override;
QSWaylandLayerSurface(QSWaylandLayerSurface&&) = delete;
QSWaylandLayerSurface(const QSWaylandLayerSurface&) = delete;
void operator=(QSWaylandLayerSurface&&) = delete;
void operator=(const QSWaylandLayerSurface&) = delete;
Q_DISABLE_COPY_MOVE(QSWaylandLayerSurface);
[[nodiscard]] bool isExposed() const override;
void applyConfigure() override;

View file

@ -56,17 +56,12 @@ class LayershellWindowExtension: public QObject {
public:
LayershellWindowExtension(QObject* parent = nullptr): QObject(parent) {}
~LayershellWindowExtension() override = default;
LayershellWindowExtension(LayershellWindowExtension&&) = delete;
LayershellWindowExtension(const LayershellWindowExtension&) = delete;
void operator=(LayershellWindowExtension&&) = delete;
void operator=(const LayershellWindowExtension&) = delete;
// returns the layershell extension if attached, otherwise nullptr
static LayershellWindowExtension* get(QWindow* window);
// Attach this layershell extension to the given window.
// The extension is reparented to the window and replaces any existing extensions.
// The extension is reparented to the window and replaces any existing layershell extension.
// Returns false if the window cannot be used.
bool attach(QWindow* window);