fix: Fixed some compiler warnings (#5028)
* fix(C4101): unreferenced local variable * fix(C4189): variable initialized but not referenced * fix(C4305): narrowing from double to float * fix(C4457): declaration hiding function parameter * fix(C4456): shadowing declaration * fix(C4996): remove deprecations * chore: add changelog entry * fix: Remove more unused variables * fix: removed unused lambda captures * Update changelog entry --------- Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -21,36 +21,40 @@ bool filterItemsRec(QObject *object, const QString &query)
|
||||
widget->update();
|
||||
};
|
||||
|
||||
if (auto x = dynamic_cast<SCheckBox *>(child); x)
|
||||
if (auto *checkBox = dynamic_cast<SCheckBox *>(child))
|
||||
{
|
||||
setOpacity(x, x->text().contains(query, Qt::CaseInsensitive));
|
||||
setOpacity(checkBox,
|
||||
checkBox->text().contains(query, Qt::CaseInsensitive));
|
||||
}
|
||||
else if (auto x = dynamic_cast<SLabel *>(child); x)
|
||||
else if (auto *lbl = dynamic_cast<SLabel *>(child))
|
||||
{
|
||||
setOpacity(x, x->text().contains(query, Qt::CaseInsensitive));
|
||||
setOpacity(lbl, lbl->text().contains(query, Qt::CaseInsensitive));
|
||||
}
|
||||
else if (auto x = dynamic_cast<SComboBox *>(child); x)
|
||||
else if (auto *comboBox = dynamic_cast<SComboBox *>(child))
|
||||
{
|
||||
setOpacity(x, [=]() {
|
||||
for (int i = 0; i < x->count(); i++)
|
||||
setOpacity(comboBox, [=]() {
|
||||
for (int i = 0; i < comboBox->count(); i++)
|
||||
{
|
||||
if (x->itemText(i).contains(query, Qt::CaseInsensitive))
|
||||
if (comboBox->itemText(i).contains(query,
|
||||
Qt::CaseInsensitive))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}());
|
||||
}
|
||||
else if (auto x = dynamic_cast<QTabWidget *>(child); x)
|
||||
else if (auto *tabs = dynamic_cast<QTabWidget *>(child))
|
||||
{
|
||||
for (int i = 0; i < x->count(); i++)
|
||||
for (int i = 0; i < tabs->count(); i++)
|
||||
{
|
||||
bool tabAny{};
|
||||
|
||||
if (x->tabText(i).contains(query, Qt::CaseInsensitive))
|
||||
if (tabs->tabText(i).contains(query, Qt::CaseInsensitive))
|
||||
{
|
||||
tabAny = true;
|
||||
}
|
||||
auto widget = x->widget(i);
|
||||
auto *widget = tabs->widget(i);
|
||||
tabAny |= filterItemsRec(widget, query);
|
||||
|
||||
any |= tabAny;
|
||||
|
||||
Reference in New Issue
Block a user