Commit caadde17 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

cppcheck fix

parent 8e8a9b1f
Pipeline #83206 passed with stage
in 17 minutes and 57 seconds
......@@ -67,8 +67,8 @@ void SieveActionDeleteHeader::parseValue(QXmlStreamReader &element, QWidget *w,
if (element.attributes().hasAttribute(QLatin1String("name"))) {
nameValue = element.attributes().value(QLatin1String("name")).toString();
}
const bool isNegative = (nameValue == QLatin1String("not"));
parseValue(element, w, error, isNegative);
const bool isNot = (nameValue == QLatin1String("not"));
parseValue(element, w, error, isNot);
element.skipCurrentElement();
return;
} else if (tagName == QLatin1String("tag")) {
......
......@@ -70,10 +70,9 @@ int main(int argc, char **argv)
QString error;
dialog->loadScript(psb.result(), error);
if (!error.isEmpty()) {
QPointer<KSieveUi::SieveScriptParsingErrorDialog> dlg = new KSieveUi::SieveScriptParsingErrorDialog;
dlg->setError(QString::fromLatin1(script), error);
dlg->exec();
delete dlg;
KSieveUi::SieveScriptParsingErrorDialog dlgError;
dlgError.setError(QString::fromLatin1(script), error);
dlgError.exec();
}
dialog->show();
......
......@@ -27,8 +27,8 @@ void SieveScriptDebuggerWidgetTest::shouldHaveDefaultValue()
const int numberOfStackWidget(2);
QCOMPARE(stackedwidget->count(), numberOfStackWidget);
for (int i = 0; i < numberOfStackWidget; ++i) {
QWidget *w = stackedwidget->widget(i);
QVERIFY((w->objectName() == QLatin1String("sievescriptfrontend")) || (w->objectName() == QLatin1String("sievenoexistingfrontend")));
QWidget *widget = stackedwidget->widget(i);
QVERIFY((widget->objectName() == QLatin1String("sievescriptfrontend")) || (widget->objectName() == QLatin1String("sievenoexistingfrontend")));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment