Hello dear list,
now wonder, that nobody came up with a solution. The patch is quite short, but tricky too because the Qt4 Quarterly solution only fails with more complex recursion levels.
When interested look at the attachment. Please note that my "patch" is inherited from "mainWindow" instead of the original "TextEdit" and my Q(Plain)TextEdit is my own "textEdit" instead of "this". For sure you can abstract this minor difference only affecting a few lines.
So what really changed?
a) matchParentheses()
.. only added a reset for new parenthesis counters
b) matchLeftParenthesis(...
nothing as this stuff works perfect
c) matchRightParenthesis(...
added some missing checks and an additional recursion level when necessary
All other functions/files from the original Qt4 Quarterly code can stay completely unchanged.
Kind regards, Heinz
Bookmarks