diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2010-09-03 17:59:14 +0200 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2010-09-08 13:46:52 +0200 |
commit | 47f51a5c523bed9220f0a8b7c4153a75df270324 (patch) | |
tree | fdb691614d4b6012f6c01247b5c4ceedb47c9296 | |
parent | c51384584191b662928b568931789d536c7cafdb (diff) |
MIME Profile: setting one rule also activates all included ruleslibsynthesis_3.4.0.6+syncevolution-1-0-99-6parameter-rule
The MAKE/PARSETEXTWITHPROFILE() macro calls can only active one
rule. Allowing that rule to have <include> elements for other
rules *and* activating them together with the main rule allows
the macros to enables multiple rules.
Note that this activation is not recursive: subrules included by
subrules are not activated - perhaps they should be? This patch
follows the code in TSyncSession::checkRemoteSpecifics() which also
only activates the <remoterule> and the rules included in it,
without recursing.
-rw-r--r-- | src/sysync/mimedirprofile.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sysync/mimedirprofile.cpp b/src/sysync/mimedirprofile.cpp index df385d0..2cbce65 100644 --- a/src/sysync/mimedirprofile.cpp +++ b/src/sysync/mimedirprofile.cpp @@ -5155,9 +5155,13 @@ void TMimeDirProfileHandler::setRemoteRule(const string &aRemoteRuleName) TRemoteRulesList::iterator pos; for(pos=scP->fRemoteRulesList.begin();pos!=scP->fRemoteRulesList.end();pos++) { if((*pos)->fElementName == aRemoteRuleName) { - // only this rule must be active + // only this rule and all rules included by it rule must be active fActiveRemoteRules.clear(); fActiveRemoteRules.push_back(*pos); + TRemoteRulesList::iterator spos; + for(spos=(*pos)->fSubRulesList.begin();spos!=(*pos)->fSubRulesList.end();spos++) { + fActiveRemoteRules.push_back(*spos); + } break; } } |