all: fix new lints

This commit is contained in:
outfoxxed committed 2025-01-07 03:11:19 -08:00
1 parent 26d443aa50
commit 2c411fce5a
43 files changed
+351 -316

No files matched your search

+6
View File
@@ -13,10 +13,12 @@
namespace qs::debug {
namespace {
Q_LOGGING_CATEGORY(logLint, "quickshell.linter", QtWarningMsg);
void lintZeroSized(QQuickItem* item);
bool isRenderable(QQuickItem* item);
} // namespace
void lintObjectTree(QObject* object) {
if (!logLint().isWarningEnabled()) return;
@@ -41,6 +43,8 @@ void lintItemTree(QQuickItem* item) {
}
}
namespace {
void lintZeroSized(QQuickItem* item) {
if (!item->isEnabled() || !item->isVisible()) return;
if (item->childItems().isEmpty()) return;
@@ -71,4 +75,6 @@ bool isRenderable(QQuickItem* item) {
return std::ranges::any_of(item->childItems(), [](auto* item) { return isRenderable(item); });
}
} // namespace
} // namespace qs::debug