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:
wmayer
2022-06-29 21:00:54 +02:00
parent fc8ccd59ed
commit 82a6241fc5
49 changed files with 185 additions and 180 deletions

View File

@@ -450,7 +450,7 @@ void TextEditor::OnChange(Base::Subject<const char*> &rCaller,const char* sReaso
lineNumberArea->setFont(font);
}
else {
QMap<QString, QColor>::ConstIterator it = d->colormap.find(QString::fromLatin1(sReason));
QMap<QString, QColor>::Iterator it = d->colormap.find(QString::fromLatin1(sReason));
if (it != d->colormap.end()) {
QColor color = it.value();
unsigned int col = (color.red() << 24) | (color.green() << 16) | (color.blue() << 8);
@@ -579,7 +579,7 @@ bool CompletionList::eventFilter(QObject * watched, QEvent * event)
hide();
return false;
} else if (ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter) {
itemActivated(currentItem());
Q_EMIT itemActivated(currentItem());
return true;
}
} else if (event->type() == QEvent::FocusOut) {