all: fix new lints

This commit is contained in:
outfoxxed 2025-01-07 03:11:19 -08:00
parent 26d443aa50
commit 2c411fce5a
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
43 changed files with 351 additions and 316 deletions

View file

@ -14,7 +14,9 @@
namespace qs::dbus {
namespace {
Q_LOGGING_CATEGORY(logDbus, "quickshell.dbus", QtWarningMsg);
}
void tryLaunchService(
QObject* parent,

View file

@ -368,11 +368,9 @@ void DBusMenu::updateLayoutRecursive(
auto childrenChanged = false;
auto iter = item->mChildren.begin();
while (iter != item->mChildren.end()) {
auto existing = std::find_if(
layout.children.begin(),
layout.children.end(),
[&](const DBusMenuLayout& layout) { return layout.id == *iter; }
);
auto existing = std::ranges::find_if(layout.children, [&](const DBusMenuLayout& layout) {
return layout.id == *iter;
});
if (!item->mShowChildren || existing == layout.children.end()) {
qCDebug(logDbusMenu) << "Removing missing layout item" << this->items.value(*iter) << "from"

View file

@ -190,11 +190,9 @@ void DBusPropertyGroup::updateAllViaGetAll() {
void DBusPropertyGroup::updatePropertySet(const QVariantMap& properties, bool complainMissing) {
for (const auto [name, value]: properties.asKeyValueRange()) {
auto prop = std::find_if(
this->properties.begin(),
this->properties.end(),
[&name](DBusPropertyCore* prop) { return prop->nameRef() == name; }
);
auto prop = std::ranges::find_if(this->properties, [&name](DBusPropertyCore* prop) {
return prop->nameRef() == name;
});
if (prop == this->properties.end()) {
qCDebug(logDbusProperties) << "Ignoring untracked property update" << name << "for"
@ -312,11 +310,9 @@ void DBusPropertyGroup::onPropertiesChanged(
<< "Received property change set and invalidations for" << this->toString();
for (const auto& name: invalidatedProperties) {
auto prop = std::find_if(
this->properties.begin(),
this->properties.end(),
[&name](DBusPropertyCore* prop) { return prop->nameRef() == name; }
);
auto prop = std::ranges::find_if(this->properties, [&name](DBusPropertyCore* prop) {
return prop->nameRef() == name;
});
if (prop == this->properties.end()) {
qCDebug(logDbusProperties) << "Ignoring untracked property invalidation" << name << "for"

View file

@ -66,7 +66,7 @@ template <typename T>
void asyncReadProperty(
QDBusAbstractInterface& interface,
const QString& property,
std::function<void(T, QDBusError)> callback
const std::function<void(T, QDBusError)>& callback
) {
asyncReadPropertyInternal(
QMetaType::fromType<T>(),