fix (Qt) issues found by clang's clazy tool:
+ -Wclazy-incorrect-emit + -Wclazy-strict-iterators + -Wclazy-overloaded-signal + -Wclazy-qstring-arg + -Wclazy-unused-non-trivial-variable + -Wclazy-container-anti-pattern + -Wclazy-range-loop-reference + -Wclazy-const-signal-or-slot + -Wclazy-detaching-temporary + -Wclazy-qfileinfo-exists
This commit is contained in:
@@ -132,54 +132,54 @@ bool DlgParameterFind::matches(QTreeWidgetItem* item, const Options& opt) const
|
||||
// check the name of an entry in the group
|
||||
if (opt.name) {
|
||||
if (opt.match) {
|
||||
for (auto it : boolMap) {
|
||||
for (const auto& it : boolMap) {
|
||||
QString text = QString::fromUtf8(it.first.c_str());
|
||||
if (text.compare(opt.text, Qt::CaseInsensitive) == 0)
|
||||
return true;
|
||||
}
|
||||
for (auto it : intMap) {
|
||||
for (const auto& it : intMap) {
|
||||
QString text = QString::fromUtf8(it.first.c_str());
|
||||
if (text.compare(opt.text, Qt::CaseInsensitive) == 0)
|
||||
return true;
|
||||
}
|
||||
for (auto it : uintMap) {
|
||||
for (const auto& it : uintMap) {
|
||||
QString text = QString::fromUtf8(it.first.c_str());
|
||||
if (text.compare(opt.text, Qt::CaseInsensitive) == 0)
|
||||
return true;
|
||||
}
|
||||
for (auto it : floatMap) {
|
||||
for (const auto& it : floatMap) {
|
||||
QString text = QString::fromUtf8(it.first.c_str());
|
||||
if (text.compare(opt.text, Qt::CaseInsensitive) == 0)
|
||||
return true;
|
||||
}
|
||||
for (auto it : asciiMap) {
|
||||
for (const auto& it : asciiMap) {
|
||||
QString text = QString::fromUtf8(it.first.c_str());
|
||||
if (text.compare(opt.text, Qt::CaseInsensitive) == 0)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (auto it : boolMap) {
|
||||
for (const auto& it : boolMap) {
|
||||
QString text = QString::fromUtf8(it.first.c_str());
|
||||
if (text.indexOf(opt.text, 0, Qt::CaseInsensitive) >= 0)
|
||||
return true;
|
||||
}
|
||||
for (auto it : intMap) {
|
||||
for (const auto& it : intMap) {
|
||||
QString text = QString::fromUtf8(it.first.c_str());
|
||||
if (text.indexOf(opt.text, 0, Qt::CaseInsensitive) >= 0)
|
||||
return true;
|
||||
}
|
||||
for (auto it : uintMap) {
|
||||
for (const auto& it : uintMap) {
|
||||
QString text = QString::fromUtf8(it.first.c_str());
|
||||
if (text.indexOf(opt.text, 0, Qt::CaseInsensitive) >= 0)
|
||||
return true;
|
||||
}
|
||||
for (auto it : floatMap) {
|
||||
for (const auto& it : floatMap) {
|
||||
QString text = QString::fromUtf8(it.first.c_str());
|
||||
if (text.indexOf(opt.text, 0, Qt::CaseInsensitive) >= 0)
|
||||
return true;
|
||||
}
|
||||
for (auto it : asciiMap) {
|
||||
for (const auto& it : asciiMap) {
|
||||
QString text = QString::fromUtf8(it.first.c_str());
|
||||
if (text.indexOf(opt.text, 0, Qt::CaseInsensitive) >= 0)
|
||||
return true;
|
||||
@@ -190,14 +190,14 @@ bool DlgParameterFind::matches(QTreeWidgetItem* item, const Options& opt) const
|
||||
// check the value of an entry in the group
|
||||
if (opt.value) {
|
||||
if (opt.match) {
|
||||
for (auto it : asciiMap) {
|
||||
for (const auto& it : asciiMap) {
|
||||
QString text = QString::fromUtf8(it.second.c_str());
|
||||
if (text.compare(opt.text, Qt::CaseInsensitive) == 0)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (auto it : asciiMap) {
|
||||
for (const auto& it : asciiMap) {
|
||||
QString text = QString::fromUtf8(it.second.c_str());
|
||||
if (text.indexOf(opt.text, 0, Qt::CaseInsensitive) >= 0)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user