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

Bug in matching parentheses code example from Qt Quarterly 31

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P5: Not important
    • 5.14.2, 5.15.0 Beta1
    • 5.14.0
    • Documentation
    • None
    • b26b40f7e1f67dd3de1c81bd022aa202b5b5cad5 (qt/qtbase/5.14)
    • DaVinci sprint 3

    Description

      On the bottom of the page

      https://doc.qt.io/qt-5/qtwidgets-richtext-syntaxhighlighter-example.html

      there is a link to

      Qt Quarterly 31 (http://doc.qt.io/archives/qq/)

      with an example code for matching parentheses with QSyntaxHighlighter. The example code contains a bug within

      bool TextEdit::matchRightParenthesis(QTextBlock currentBlock, int i, int numRightParentheses)

      I attach a file with a possible correction and extension of your code example - it contains some additional code, you can ignore.

      Attachments

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

        Activity

          People

            paulwicking Paul Wicking
            juergenboehm Jürgen Böhm
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes