D20766: Use appropriate background color for text previews

Méven Car noreply at phabricator.kde.org
Thu Nov 14 18:00:26 GMT 2019


meven added a comment.


  I believe the issue currently is that for text files or files without associated definition we end up with an invalid definition that prevents SyntaxHighlighter::setDefinition to call rehighlight().
  QTextDocument uses then whatever it get from the theme I guess.
  Kate has an explicit special case in KateHighlighting::KateHighlighting to insert a default Format.
  
  I think either KSyntaxHighlighting should have a dummy default definition based on currrent theme or we should here create a dummy default definition when `m_highlightingRepository.definitionForFileName(path)` return an invalid definition.
  What do you think ?

REVISION DETAIL
  https://phabricator.kde.org/D20766

To: eshalygin, kossebau, cfeck
Cc: dhaumann, cullmann, vkrause, cfeck, meven, broulik, kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, LeGast00n, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191114/267b3b65/attachment.html>


More information about the Kde-frameworks-devel mailing list