Changeset View
Changeset View
Standalone View
Standalone View
plugins/flake/pathshapes/enhancedpath/EnhancedPathShape.cpp
Context not available. | |||||
66 | m_mirrorHorizontally(rhs.m_mirrorHorizontally), | 66 | m_mirrorHorizontally(rhs.m_mirrorHorizontally), | ||
---|---|---|---|---|---|
67 | m_pathStretchPointX(rhs.m_pathStretchPointX), | 67 | m_pathStretchPointX(rhs.m_pathStretchPointX), | ||
68 | m_pathStretchPointY(rhs.m_pathStretchPointY), | 68 | m_pathStretchPointY(rhs.m_pathStretchPointY), | ||
69 | m_resultChache(rhs.m_resultChache), | 69 | m_resultCache(rhs.m_resultCache), | ||
70 | m_cacheResults(rhs.m_cacheResults) | 70 | m_cacheResults(rhs.m_cacheResults) | ||
71 | { | 71 | { | ||
72 | } | 72 | } | ||
Context not available. | |||||
223 | // referenced formula | 223 | // referenced formula | ||
224 | case '?': { | 224 | case '?': { | ||
225 | QString fname = reference.mid(1); | 225 | QString fname = reference.mid(1); | ||
226 | if (m_cacheResults && m_resultChache.contains(fname)) { | 226 | if (m_cacheResults && m_resultCache.contains(fname)) { | ||
227 | res = m_resultChache.value(fname); | 227 | res = m_resultCache.value(fname); | ||
228 | } else { | 228 | } else { | ||
229 | FormulaStore::const_iterator formulaIt = m_formulae.constFind(fname); | 229 | FormulaStore::const_iterator formulaIt = m_formulae.constFind(fname); | ||
230 | if (formulaIt != m_formulae.constEnd()) { | 230 | if (formulaIt != m_formulae.constEnd()) { | ||
Context not available. | |||||
232 | if (formula) { | 232 | if (formula) { | ||
233 | res = formula->evaluate(); | 233 | res = formula->evaluate(); | ||
234 | if (m_cacheResults) { | 234 | if (m_cacheResults) { | ||
235 | m_resultChache.insert(fname, res); | 235 | m_resultCache.insert(fname, res); | ||
236 | } | 236 | } | ||
237 | } | 237 | } | ||
238 | } | 238 | } | ||
Context not available. | |||||
723 | 723 | | |||
724 | void EnhancedPathShape::enableResultCache(bool enable) | 724 | void EnhancedPathShape::enableResultCache(bool enable) | ||
725 | { | 725 | { | ||
726 | m_resultChache.clear(); | 726 | m_resultCache.clear(); | ||
727 | m_cacheResults = enable; | 727 | m_cacheResults = enable; | ||
728 | } | 728 | } | ||
729 | 729 | | |||
Context not available. |