MCPcopy Create free account
hub / github.com/KDE/kdevelop / updateInternal

Method updateInternal

kdevplatform/language/highlighting/colorcache.cpp:355–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355void ColorCache::updateInternal()
356{
357 ifDebug(qCDebug(LANGUAGE) << "update internal" << m_self; )
358 generateColors();
359
360 if (!m_self) {
361 // don't do anything else fancy on startup
362 return;
363 }
364
365 emit colorsGotChanged();
366
367 // rehighlight open documents
368 if (!ICore::self() || ICore::self()->shuttingDown()) {
369 return;
370 }
371 const auto documents = ICore::self()->documentController()->openDocuments();
372 for (IDocument* doc : documents) {
373 const auto languages = ICore::self()->languageController()->languagesForUrl(doc->url());
374 for (const auto lang : languages) {
375 ReferencedTopDUContext top;
376 {
377 DUChainReadLocker lock;
378 top = lang->standardContext(doc->url());
379 }
380
381 if (top) {
382 if (ICodeHighlighting* highlighting = lang->codeHighlighting()) {
383 highlighting->highlightDUChain(top);
384 }
385 }
386 }
387 }
388}
389
390QColor ColorCache::blend(QColor color, uchar ratio) const
391{

Callers

nothing calls this directly

Calls 9

shuttingDownMethod · 0.80
openDocumentsMethod · 0.80
documentControllerMethod · 0.80
languagesForUrlMethod · 0.80
languageControllerMethod · 0.80
urlMethod · 0.45
standardContextMethod · 0.45
codeHighlightingMethod · 0.45
highlightDUChainMethod · 0.45

Tested by

no test coverage detected