Files
guru/gui-apps/quickshell/files/quickshell-0.3.0-strict-aliasing.patch
Ceres 18d42bafc2 gui-apps/quickshell: add 0.3.0
patch fixes a -Wstrict-aliasing warning. the patch is needed for LTO,
but fixes a number of warnings output even when not using LTO, hence
applying it for all users
patch taken from 46e60df2d6

Signed-off-by: Ceres <ceres@ceressees.dev>
2026-05-09 15:45:57 +01:00

19 lines
544 B
Diff

Fixes strict-aliasing error when building with LTO
From: https://github.com/noctalia-dev/noctalia-qs/commit/46e60df2d6ebb4d52d5bde8a63a9a6255e556097
--- a/src/core/model.hpp
+++ b/src/core/model.hpp
@@ -170,7 +170,11 @@
}
[[nodiscard]] QList<QObject*> values() override {
- return *reinterpret_cast<QList<QObject*>*>(&this->mValuesList);
+ QList<QObject*> result;
+ result.reserve(this->mValuesList.size());
+ for (auto* item: this->mValuesList)
+ result.append(reinterpret_cast<QObject*>(item));
+ return result;
}
private: