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:
@@ -259,7 +259,7 @@ void InputField::newInput(const QString & text)
|
||||
QString errorText = QString::fromLatin1(e.what());
|
||||
QPixmap pixmap = getValidationIcon(":/icons/button_invalid.svg", QSize(sizeHint().height(),sizeHint().height()));
|
||||
iconLabel->setPixmap(pixmap);
|
||||
parseError(errorText);
|
||||
Q_EMIT parseError(errorText);
|
||||
validInput = false;
|
||||
return;
|
||||
}
|
||||
@@ -271,7 +271,7 @@ void InputField::newInput(const QString & text)
|
||||
if(!actUnit.isEmpty() && !res.getUnit().isEmpty() && actUnit != res.getUnit()){
|
||||
QPixmap pixmap = getValidationIcon(":/icons/button_invalid.svg", QSize(sizeHint().height(),sizeHint().height()));
|
||||
iconLabel->setPixmap(pixmap);
|
||||
parseError(QString::fromLatin1("Wrong unit"));
|
||||
Q_EMIT parseError(QString::fromLatin1("Wrong unit"));
|
||||
validInput = false;
|
||||
return;
|
||||
}
|
||||
@@ -297,8 +297,8 @@ void InputField::newInput(const QString & text)
|
||||
actQuantity = res;
|
||||
|
||||
// signaling
|
||||
valueChanged(res);
|
||||
valueChanged(res.getValue());
|
||||
Q_EMIT valueChanged(res);
|
||||
Q_EMIT valueChanged(res.getValue());
|
||||
}
|
||||
|
||||
void InputField::pushToHistory(const QString &valueq)
|
||||
@@ -600,7 +600,7 @@ void InputField::selectNumber(void)
|
||||
QChar n = locale().negativeSign();
|
||||
QChar e = locale().exponential();
|
||||
|
||||
for (QString::iterator it = str.begin(); it != str.end(); ++it) {
|
||||
for (QString::const_iterator it = str.cbegin(); it != str.cend(); ++it) {
|
||||
if (it->isDigit())
|
||||
i++;
|
||||
else if (*it == d)
|
||||
|
||||
Reference in New Issue
Block a user