diff --git a/src/plugins/texteditor/generichighlighter/highlighter.cpp b/src/plugins/texteditor/generichighlighter/highlighter.cpp index 3e28bb93c56a9a0d86c840baff3c598c3ff2da90..443b2d23387bb3b41fb788df5932709a65457fd3 100644 --- a/src/plugins/texteditor/generichighlighter/highlighter.cpp +++ b/src/plugins/texteditor/generichighlighter/highlighter.cpp @@ -202,7 +202,7 @@ void Highlighter::iterateThroughRules(const QString &text, if (rule->matchSucceed(text, length, progress)) { atLeastOneMatch = true; - if (progress->willContinueLine()) { + if (progress->isWillContinueLine()) { createWillContinueBlock(); progress->setWillContinueLine(false); } else { @@ -247,7 +247,7 @@ void Highlighter::iterateThroughRules(const QString &text, } else { applyFormat(progress->offset(), 1, m_currentContext->itemData(), m_currentContext->definition()); - if (progress->onlySpacesSoFar() && !text.at(progress->offset()).isSpace()) + if (progress->isOnlySpacesSoFar() && !text.at(progress->offset()).isSpace()) progress->setOnlySpacesSoFar(false); progress->incrementOffset(); } diff --git a/src/plugins/texteditor/generichighlighter/progressdata.cpp b/src/plugins/texteditor/generichighlighter/progressdata.cpp index 12c76079d84e6be2a564edcb8215988c44f50684..3cc3ebcc2b20caa94e0b667bd36090d200c9b302 100644 --- a/src/plugins/texteditor/generichighlighter/progressdata.cpp +++ b/src/plugins/texteditor/generichighlighter/progressdata.cpp @@ -66,13 +66,13 @@ void ProgressData::restoreOffset() void ProgressData::setOnlySpacesSoFar(const bool onlySpaces) { m_onlySpacesSoFar = onlySpaces; } -bool ProgressData::onlySpacesSoFar() const +bool ProgressData::isOnlySpacesSoFar() const { return m_onlySpacesSoFar; } void ProgressData::setWillContinueLine(const bool willContinue) { m_willContinueLine = willContinue; } -bool ProgressData::willContinueLine() const +bool ProgressData::isWillContinueLine() const { return m_willContinueLine; } void ProgressData::setCaptures(const QStringList &captures) diff --git a/src/plugins/texteditor/generichighlighter/progressdata.h b/src/plugins/texteditor/generichighlighter/progressdata.h index a621c15dc75e2449169ac23e0adc200e78dda09c..93e1884862ef4653b644111f9defdbc5d1326263 100644 --- a/src/plugins/texteditor/generichighlighter/progressdata.h +++ b/src/plugins/texteditor/generichighlighter/progressdata.h @@ -50,10 +50,10 @@ public: void restoreOffset(); void setOnlySpacesSoFar(const bool onlySpaces); - bool onlySpacesSoFar() const; + bool isOnlySpacesSoFar() const; void setWillContinueLine(const bool willContinue); - bool willContinueLine() const; + bool isWillContinueLine() const; void setCaptures(const QStringList &captures); const QStringList &captures() const; diff --git a/src/plugins/texteditor/generichighlighter/rule.cpp b/src/plugins/texteditor/generichighlighter/rule.cpp index 3ad611938e47411ef48b5d550bf9cc8e4f2c09ca..b21d081f8fbc37eb1b30c4440907ee5bcc1ad0c8 100644 --- a/src/plugins/texteditor/generichighlighter/rule.cpp +++ b/src/plugins/texteditor/generichighlighter/rule.cpp @@ -162,7 +162,7 @@ bool Rule::charPredicateMatchSucceed(const QString &text, bool Rule::matchSucceed(const QString &text, const int length, ProgressData *progress) const { - if (m_firstNonSpace && !progress->onlySpacesSoFar()) + if (m_firstNonSpace && !progress->isOnlySpacesSoFar()) return false; if (m_column != -1 && m_column != progress->offset()) @@ -170,7 +170,7 @@ bool Rule::matchSucceed(const QString &text, const int length, ProgressData *pro int original = progress->offset(); if (doMatchSucceed(text, length, progress)) { - if (progress->onlySpacesSoFar() && !m_lookAhead && m_consumesNonSpace) + if (progress->isOnlySpacesSoFar() && !m_lookAhead && m_consumesNonSpace) progress->setOnlySpacesSoFar(false); if (m_lookAhead) diff --git a/src/plugins/texteditor/generichighlighter/rule.h b/src/plugins/texteditor/generichighlighter/rule.h index a53b2f8e5c408ee6d632746fc90d13b0a0d9f1a9..0ffd57d2e2dd9edd0f21bb4246565e39ad13345f 100644 --- a/src/plugins/texteditor/generichighlighter/rule.h +++ b/src/plugins/texteditor/generichighlighter/rule.h @@ -123,7 +123,7 @@ protected: static const QLatin1Char kN; static const QLatin1Char kR; static const QLatin1Char kT; - static const QLatin1Char kV; + static const QLatin1Char kV; private: virtual bool doMatchSucceed(const QString &text, diff --git a/tests/auto/generichighlighter/specificrules/tst_specificrules.cpp b/tests/auto/generichighlighter/specificrules/tst_specificrules.cpp index 6e482f38b996aeecfe9558e2d472ee1a16200e36..c06b61fbaf5bcabfb7755bd83a455612a83ce6a7 100644 --- a/tests/auto/generichighlighter/specificrules/tst_specificrules.cpp +++ b/tests/auto/generichighlighter/specificrules/tst_specificrules.cpp @@ -149,8 +149,8 @@ void tst_SpecificRules::testMatch(const Rule &rule, ProgressData *progress) cons QTEST(rule.matchSucceed(s, s.length(), progress), "match"); QTEST(progress->offset(), "offset"); - QTEST(progress->onlySpacesSoFar(), "only spaces"); - QTEST(progress->willContinueLine(), "will continue"); + QTEST(progress->isOnlySpacesSoFar(), "only spaces"); + QTEST(progress->isWillContinueLine(), "will continue"); } void tst_SpecificRules::testDetectChar()