summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-05-17 08:05:58 +0200
committerMontel Laurent <[email protected]>2017-05-17 08:05:58 +0200
commite5f727f598db061bbd938d95d6508e74aac4cc7c (patch)
tree76a712a3186260bc1d44d3876f2f232a247aa68e
parent4d5a06dc8fd337b1e98fc1ca0c4b0e7f6d086f25 (diff)
Fix generate indentation in sieve condition
-rw-r--r--src/ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp b/src/ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp
index c4ad68b..6e515dd 100644
--- a/src/ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp
+++ b/src/ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp
@@ -70,6 +70,7 @@ void SieveConditionWidget::setFilterCondition(QWidget *widget)
void SieveConditionWidget::generatedScript(QString &script, QStringList &requires, bool inForEveryPartLoop)
{
+ Q_UNUSED(inForEveryPartLoop);
const int index = mComboBox->currentIndex();
if (index != mComboBox->count() - 1) {
KSieveUi::SieveCondition *widgetCondition = mConditionList.at(mComboBox->currentIndex());
@@ -80,9 +81,6 @@ void SieveConditionWidget::generatedScript(QString &script, QStringList &require
requires.append(r);
}
}
- if (inForEveryPartLoop) {
- //FIXME script += AutoCreateScriptUtil::indentation();
- }
script += mConditionList.at(mComboBox->currentIndex())->code(currentWidget) + QLatin1Char('\n');
}
}
@@ -296,6 +294,9 @@ void SieveConditionWidgetLister::generatedScript(QString &script, int &numberOfC
w->generatedScript(condition, requires, inForEveryPartLoop);
if (!condition.isEmpty()) {
if (!wasFirst) {
+ if (inForEveryPartLoop) {
+ script += AutoCreateScriptUtil::indentation();
+ }
script += QLatin1String(", ");
}
script += condition;