Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-74701

QSyntaxHighlighter interruptable

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: GUI: Text handling
    • Labels:
      None

      Description

       QSyntaxHighlighter isn't interruptable internally. It always runs through ALL lines on the first call which is triggered by the modification of the QTextDocument (that is internally directly connected to the private class). This blocks the ui for user interaction.

      I'd suggest to add a way to pause and resume the highlighting process in QSyntaxHighlighterPrivate::reformatBlocks(..). Maybe a block counter or a special QTextBlock::userState() can be used to interrupt it.

      Discussion: https://forum.qt.io/topic/101077/qsyntaxhighlighter-hardly-threadable

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              esabraha Eskil Abrahamsen Blomfeldt
              Reporter:
              jazzco Jesko von Monkiewitsch
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes