From 022b80613bc5ef3ac56fb4e0a2fcd13bdfdbda0f Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Thu, 17 Sep 2020 10:35:48 +0300 Subject: [PATCH] script highlighter has been fixed --- common.pri | 2 +- limereport/scripteditor/lrscripthighlighter.cpp | 8 ++++---- limereport/scripteditor/lrscripthighlighter.h | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/common.pri b/common.pri index b3e0192..6fed45f 100644 --- a/common.pri +++ b/common.pri @@ -133,7 +133,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 68 +LIMEREPORT_VERSION_RELEASE = 69 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/scripteditor/lrscripthighlighter.cpp b/limereport/scripteditor/lrscripthighlighter.cpp index 0af09ba..6a65546 100644 --- a/limereport/scripteditor/lrscripthighlighter.cpp +++ b/limereport/scripteditor/lrscripthighlighter.cpp @@ -175,15 +175,15 @@ void ScriptHighlighter::highlightBlock(const QString& text) bool ScriptHighlighter::isKeyWord(const QString& word) { - for (int i = 0; i < KEYWORDS_COUNT-1; ++i){ - if (QLatin1String(keywords[i]) == word) return true; - } - return false; + return m_keywords.contains(word); } ScriptHighlighter::ScriptHighlighter(QTextDocument* parent): QSyntaxHighlighter(parent) { + for(int i=0; i m_keywords; };