Commit 5bb7d3c9 authored by Laurent Montel's avatar Laurent Montel 😁

Fix error found by cppcheck

parent 4694baea
......@@ -521,7 +521,7 @@ void SieveScriptListBox::loadBlock(QXmlStreamReader &n, SieveScriptPage *current
const SieveGlobalVariableActionWidget::VariableElement var = currentPage->globalVariableWidget()->loadSetVariable(n, error);
if (var.isValid()) {
qCDebug(LIBKSIEVE_LOG) << "It's not a global variable";
if (!currentPage || (typeBlock == TypeBlockIf) || (typeBlock == TypeBlockElse) || (typeBlock == TypeBlockElsif)) {
if ((typeBlock == TypeBlockIf) || (typeBlock == TypeBlockElse) || (typeBlock == TypeBlockElsif)) {
currentPage = createNewScript(scriptName.isEmpty() ? createUniqName() : scriptName, comment);
}
typeBlock = TypeBlockAction;
......
......@@ -126,9 +126,8 @@ void VacationCreateScriptJob::slotGetScript(KManageSieve::SieveJob *job, bool su
mSieveJob = nullptr;
QString script = mScript;
if (success || !oldScript.trimmed().isEmpty()) {
//TODO ???? why using script for two method ?
script = VacationUtils::mergeRequireLine(oldScript, mScript);
script = VacationUtils::updateVacationBlock(oldScript, mScript);
script = VacationUtils::updateVacationBlock(oldScript, script);
}
if (mKep14Support) {
mSieveJob = KManageSieve::SieveJob::put(mUrl, mScript, false, false);
......
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