From 53686d4ef0d1a52906708e52f64355a4062faed0 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Sun, 19 Apr 2026 07:10:14 +0200 Subject: [PATCH] Fix CI build and REUSE lint failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use QByteArray::data() instead of constData() for the udev_device_set_sysattr_value call — Alpine libudev declares the value parameter as char*, not const char*. Fix the SPDX license identifier in CategoryPanel.qml from "EUPL 1.2" to "EUPL-1.2". --- containments/homescreens/folio/qml/CategoryPanel.qml | 2 +- quicksettings/flashlight/kauth/flashlighthelper.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/containments/homescreens/folio/qml/CategoryPanel.qml b/containments/homescreens/folio/qml/CategoryPanel.qml index 29d05097..78546467 100644 --- a/containments/homescreens/folio/qml/CategoryPanel.qml +++ b/containments/homescreens/folio/qml/CategoryPanel.qml @@ -1,5 +1,5 @@ // SPDX-FileCopyrightText: Marco Allegretti -// SPDX-License-Identifier: EUPL 1.2 +// SPDX-License-Identifier: EUPL-1.2 import QtQuick import QtQuick.Controls as QQC2 diff --git a/quicksettings/flashlight/kauth/flashlighthelper.cpp b/quicksettings/flashlight/kauth/flashlighthelper.cpp index e33cc203..bf287637 100644 --- a/quicksettings/flashlight/kauth/flashlighthelper.cpp +++ b/quicksettings/flashlight/kauth/flashlighthelper.cpp @@ -34,7 +34,7 @@ KAuth::ActionReply Flashlighthelper::setbrightness(const QVariantMap &args) // (need to double-check this, but seems likely to be the cause of the random failures // we were seeing in testing) const QByteArray sysPathBytes = args.value("sysPath"_L1).toString().toUtf8(); - const QByteArray brightnessBytes = args.value("brightness"_L1).toString().toUtf8(); + QByteArray brightnessBytes = args.value("brightness"_L1).toString().toUtf8(); if (sysPathBytes.isEmpty()) { qCWarning(FLASHLIGHTHELPER) << "sysPath argument is missing or empty"; @@ -54,8 +54,7 @@ KAuth::ActionReply Flashlighthelper::setbrightness(const QVariantMap &args) return KAuth::ActionReply::HelperErrorReply(); } - // The libudev header declares value as const char*, so no cast needed. - int ret = udev_device_set_sysattr_value(device, "brightness", brightnessBytes.constData()); + int ret = udev_device_set_sysattr_value(device, "brightness", brightnessBytes.data()); udev_device_unref(device); udev_unref(udev);