Commit 77934449 authored by Leandro Melo's avatar Leandro Melo
Browse files

Gen. highlighter: Fix spelling

parent 0a777f26
......@@ -52,7 +52,7 @@ bool DynamicRule::isActive() const
void DynamicRule::replaceExpressions(const QStringList &captures)
{
doReplaceExpressions(captures);
updateDynamicRules(childs(), captures);
updateDynamicRules(children(), captures);
}
namespace TextEditor {
......
......@@ -273,7 +273,7 @@ void HighlightDefinitionHandler::itemDataElementStarted(const QXmlAttributes &at
itemData->setItalic(atts.value(kItalic));
itemData->setBold(atts.value(kBold));
itemData->setUnderlined(atts.value(kUnderline));
itemData->setStrikedOut(atts.value(kStrikeout));
itemData->setStrikeOut(atts.value(kStrikeout));
}
void HighlightDefinitionHandler::commentElementStarted(const QXmlAttributes &atts) const
......
......@@ -260,8 +260,8 @@ void Highlighter::iterateThroughRules(const QString &text,
createWillContinueBlock();
progress->setWillContinueLine(false);
} else {
if (rule->hasChild())
iterateThroughRules(text, length, progress, true, rule->childs());
if (rule->hasChildren())
iterateThroughRules(text, length, progress, true, rule->children());
if (!rule->context().isEmpty() && contextChangeRequired(rule->context())) {
m_currentCaptures = progress->captures();
......@@ -406,8 +406,8 @@ void Highlighter::applyFormat(int offset,
format.setFontWeight(toFontWeight(itemData->isBold()));
if (itemData->isUnderlinedSpecified())
format.setFontUnderline(itemData->isUnderlined());
if (itemData->isStrikedOutSpecified())
format.setFontStrikeOut(itemData->isStrikedOut());
if (itemData->isStrikeOutSpecified())
format.setFontStrikeOut(itemData->isStrikeOut());
}
setFormat(offset, count, format);
......
......@@ -45,7 +45,7 @@ ItemData::ItemData() :
m_underlined(false),
m_underlinedSpecified(false),
m_strikedOut(false),
m_strikedOutSpecified(false),
m_strikeOutSpecified(false),
m_isCustomized(false)
{}
......@@ -122,20 +122,20 @@ bool ItemData::isUnderlined() const
bool ItemData::isUnderlinedSpecified() const
{ return m_underlinedSpecified; }
void ItemData::setStrikedOut(const QString &striked)
void ItemData::setStrikeOut(const QString &strike)
{
if (!striked.isEmpty()) {
m_strikedOut = toBool(striked);
m_strikedOutSpecified = true;
if (!strike.isEmpty()) {
m_strikedOut = toBool(strike);
m_strikeOutSpecified = true;
m_isCustomized = true;
}
}
bool ItemData::isStrikedOut() const
bool ItemData::isStrikeOut() const
{ return m_strikedOut; }
bool ItemData::isStrikedOutSpecified() const
{ return m_strikedOutSpecified; }
bool ItemData::isStrikeOutSpecified() const
{ return m_strikeOutSpecified; }
bool ItemData::isCustomized() const
{ return m_isCustomized; }
......@@ -66,9 +66,9 @@ public:
bool isUnderlined() const;
bool isUnderlinedSpecified() const;
void setStrikedOut(const QString &striked);
bool isStrikedOut() const;
bool isStrikedOutSpecified() const;
void setStrikeOut(const QString &strike);
bool isStrikeOut() const;
bool isStrikeOutSpecified() const;
bool isCustomized() const;
......@@ -80,7 +80,7 @@ private:
bool m_underlined;
bool m_underlinedSpecified;
bool m_strikedOut;
bool m_strikedOutSpecified;
bool m_strikeOutSpecified;
bool m_isCustomized;
QString m_style;
QColor m_color;
......
......@@ -120,13 +120,13 @@ int Rule::column() const
{ return m_column; }
void Rule::addChild(const QSharedPointer<Rule> &rule)
{ m_childRules.append(rule); }
{ m_children.append(rule); }
bool Rule::hasChild() const
{ return !m_childRules.isEmpty(); }
bool Rule::hasChildren() const
{ return !m_children.isEmpty(); }
const QList<QSharedPointer<Rule> > &Rule::childs() const
{ return m_childRules; }
const QList<QSharedPointer<Rule> > &Rule::children() const
{ return m_children; }
void Rule::setDefinition(const QSharedPointer<HighlightDefinition> &definition)
{ m_definition = definition; }
......
......@@ -72,8 +72,8 @@ public:
int column() const;
void addChild(const QSharedPointer<Rule> &rule);
const QList<QSharedPointer<Rule> > &childs() const;
bool hasChild() const;
const QList<QSharedPointer<Rule> > &children() const;
bool hasChildren() const;
void setDefinition(const QSharedPointer<HighlightDefinition> &definition);
const QSharedPointer<HighlightDefinition> &definition() const;
......@@ -155,7 +155,7 @@ private:
int m_column;
bool m_consumesNonSpace;
QList<QSharedPointer<Rule> > m_childRules;
QList<QSharedPointer<Rule> > m_children;
// Rules are represented within contexts. However, they have their own definition because
// of externally included rules.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment