Introduce VTermAdapter to render build output stream

Introduce VTermAdapter:

  • class to parse build output TTY stream and map to QTextBrowser blocks.
  • receives callback function by caller instance for custom build log rendering.
  • the adapter produces sequences of fragments, passed to the renderer. each sequence includes the original plain text. this way all types of interactive monitoring (clickables) are still possible.
  • the plugin had to be refactored low invasively, especially the rendering pipeline.
  • most irrelevant ANSI escape codes are ignored.
  • carriage returns basically replace the last block of QTextBrowser, but not fully tested yet.
  • needs some more testing with other build systems.

Additional Changes:

  • build process receives env vars CI=1 and TERMINAL_PROMPT=0
  • build process stdin is closed for context aware tools (no terminal interaction)
  • a minimal libvterm (Paul Evan original) is added as 3rdparty library, as only its state machine is used
  • some function naming is made more explicit (eg processOutputLine -> processOutputMeaning)
  • some minor fixes regarding scrollbar stickiness

Ceveats:

  • This feature uses KPtyProcess to stream build output. Sudo requests inside the build pipeline will need the -A|--askpass option. By default sudo always uses TTY when available, which is the case with PTY.
  • Users are responsible to take care their build process will use DISPLAY or WAYLAND_DISPLAY for user interaction

Outlook:

  • This solution should work on Windows also, but I haven't tested the GUI on Windows yet
  • KPtyProcess could probably be provided as package for Windows builds too

output

Edited by Dominik Kummer

Merge request reports

Loading