0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 08:34:38 +03:00

Script editor fixed

This commit is contained in:
Arin Alexander 2017-10-04 17:14:07 +03:00
parent 6cd3f96907
commit 0f915a9581

View File

@ -148,6 +148,7 @@ QString CodeEditor::textUnderCursor() const
bool CodeEditor::matchLeftParenthesis(QTextBlock currentBlock, QChar parenthesisType, int i, int numLeftParentheses)
{
TextBlockData *data = static_cast<TextBlockData *>(currentBlock.userData());
if (data){
QVector<ParenthesisInfo *> infos = data->parentheses();
int docPos = currentBlock.position();
@ -172,6 +173,7 @@ bool CodeEditor::matchLeftParenthesis(QTextBlock currentBlock, QChar parenthesis
currentBlock = currentBlock.next();
if (currentBlock.isValid())
return matchLeftParenthesis(currentBlock, parenthesisType, 0, numLeftParentheses);
}
return false;
}
@ -180,7 +182,7 @@ bool CodeEditor::matchRightParenthesis(QTextBlock currentBlock, QChar parenthesi
{
TextBlockData *data = static_cast<TextBlockData *>(currentBlock.userData());
QVector<ParenthesisInfo *> parentheses = data->parentheses();
if (data){
int docPos = currentBlock.position();
for (; i > -1 && parentheses.size() > 0; --i) {
ParenthesisInfo *info = parentheses.at(i);
@ -201,6 +203,7 @@ bool CodeEditor::matchRightParenthesis(QTextBlock currentBlock, QChar parenthesi
if (currentBlock.isValid())
return matchRightParenthesis(currentBlock, parenthesisType, 0, numRightParentheses);
}
return false;
}