| 301 | } |
| 302 | |
| 303 | void ColorCache::updateColorsFromSettings() |
| 304 | { |
| 305 | auto settings = ICore::self()->languageController()->completionSettings(); |
| 306 | |
| 307 | const auto globalColorSource = settings->globalColorSource(); |
| 308 | const auto globalColorSourceChanged = globalColorSource != m_globalColorSource; |
| 309 | m_globalColorSource = globalColorSource; |
| 310 | |
| 311 | const auto globalRatio = settings->globalColorizationLevel(); |
| 312 | const auto globalRatioChanged = globalRatio != m_globalColorRatio; |
| 313 | m_globalColorRatio = globalRatio; |
| 314 | |
| 315 | const auto localRatio = settings->localColorizationLevel(); |
| 316 | const auto localRatioChanged = localRatio != m_localColorRatio; |
| 317 | m_localColorRatio = localRatio; |
| 318 | |
| 319 | const auto boldDeclartions = settings->boldDeclarations(); |
| 320 | const auto boldDeclarationsChanged = boldDeclartions != m_boldDeclarations; |
| 321 | m_boldDeclarations = boldDeclartions; |
| 322 | |
| 323 | if (m_view && (globalRatioChanged || globalColorSourceChanged)) { |
| 324 | updateDefaultColorsFromSource(); |
| 325 | } |
| 326 | |
| 327 | if (globalColorSourceChanged || globalRatioChanged || localRatioChanged || boldDeclarationsChanged) { |
| 328 | update(); |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | void ColorCache::updateDefaultColorsFromSource() |
| 333 | { |
nothing calls this directly
no test coverage detected