From 517143adf97fb0df7e9a7584061deecdffb19faf Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 12 Jun 2025 16:51:02 -0700 Subject: [PATCH] all: fix new lints --- src/core/test/scriptmodel.cpp | 2 +- src/services/pipewire/defaults.cpp | 5 ++++- src/wayland/hyprland/surface/surface.cpp | 1 - src/wayland/hyprland/surface/surface.hpp | 1 - src/wayland/session_lock/surface.cpp | 1 + src/x11/i3/ipc/connection.cpp | 3 ++- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/core/test/scriptmodel.cpp b/src/core/test/scriptmodel.cpp index 66746832..0abfdbf3 100644 --- a/src/core/test/scriptmodel.cpp +++ b/src/core/test/scriptmodel.cpp @@ -115,7 +115,7 @@ void TestScriptModel::unique_data() { void TestScriptModel::unique() { QFETCH(const QString, oldstr); QFETCH(const QString, newstr); - QFETCH(OpList, operations); + QFETCH(const OpList, operations); auto strToVariantList = [](const QString& str) -> QVariantList { QVariantList list; diff --git a/src/services/pipewire/defaults.cpp b/src/services/pipewire/defaults.cpp index 9ff37e09..23252e76 100644 --- a/src/services/pipewire/defaults.cpp +++ b/src/services/pipewire/defaults.cpp @@ -16,6 +16,9 @@ #include "node.hpp" #include "registry.hpp" +// This and spa_json_init are part of json-core.h, which is missing from older pw versions. +struct spa_json; + namespace qs::service::pipewire { namespace { @@ -72,7 +75,7 @@ void PwDefaultTracker::onMetadataProperty(const char* key, const char* type, con if (type != nullptr && value != nullptr && strcmp(type, "Spa:String:JSON") == 0) { auto failed = true; auto iter = std::array(); - spa_json_init(&iter[0], value, strlen(value)); + spa_json_init(&iter[0], value, strlen(value)); // NOLINT (misc-include-cleaner) if (spa_json_enter_object(&iter[0], &iter[1]) > 0) { auto buf = std::array(); diff --git a/src/wayland/hyprland/surface/surface.cpp b/src/wayland/hyprland/surface/surface.cpp index 487da40b..f49ab8fd 100644 --- a/src/wayland/hyprland/surface/surface.cpp +++ b/src/wayland/hyprland/surface/surface.cpp @@ -18,7 +18,6 @@ HyprlandSurface::HyprlandSurface( QtWaylandClient::QWaylandWindow* backer ) : QtWayland::hyprland_surface_v1(surface) - , backer(backer) , backerSurface(backer->surface()) {} HyprlandSurface::~HyprlandSurface() { this->destroy(); } diff --git a/src/wayland/hyprland/surface/surface.hpp b/src/wayland/hyprland/surface/surface.hpp index 1c8b5486..48a2cda5 100644 --- a/src/wayland/hyprland/surface/surface.hpp +++ b/src/wayland/hyprland/surface/surface.hpp @@ -24,7 +24,6 @@ public: void setVisibleRegion(const QRegion& region); private: - QtWaylandClient::QWaylandWindow* backer; wl_surface* backerSurface = nullptr; }; diff --git a/src/wayland/session_lock/surface.cpp b/src/wayland/session_lock/surface.cpp index 6b1f652a..a2608dd6 100644 --- a/src/wayland/session_lock/surface.cpp +++ b/src/wayland/session_lock/surface.cpp @@ -169,6 +169,7 @@ void QSWaylandSessionLockSurface::initVisible() { auto& surfacePointer = reinterpret_cast(this->window())->surfacePointer(); // Swap out the surface for a dummy during initWindow. + QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED // swap() { surfacePointer.swap(*tempSurface); diff --git a/src/x11/i3/ipc/connection.cpp b/src/x11/i3/ipc/connection.cpp index 3c1015fa..cce9ba08 100644 --- a/src/x11/i3/ipc/connection.cpp +++ b/src/x11/i3/ipc/connection.cpp @@ -156,7 +156,8 @@ QVector I3Ipc::parseResponse() { break; } - QJsonParseError e; + // Importing this makes CI builds fail for some reason. + QJsonParseError e; // NOLINT (misc-include-cleaner) auto data = QJsonDocument::fromJson(payload, &e); if (e.error != QJsonParseError::NoError) {