Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit fed84e0c authored by Laurent Montel's avatar Laurent Montel 😁

Store length directly

parent 48f749f1
cmake_minimum_required(VERSION 3.5)
set(PIM_VERSION "5.10.49")
set(PIM_VERSION "5.10.50")
if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW)
......
......@@ -85,14 +85,14 @@ void PluginGrammarAction::setStart(int start)
mStart = start;
}
int PluginGrammarAction::end() const
int PluginGrammarAction::length() const
{
return mEnd;
return mLength;
}
void PluginGrammarAction::setEnd(int end)
void PluginGrammarAction::setLength(int end)
{
mEnd = end;
mLength = end;
}
QStringList PluginGrammarAction::suggestions() const
......@@ -118,7 +118,7 @@ void PluginGrammarAction::setBlockId(int blockId)
QDebug operator <<(QDebug d, const PluginGrammarAction &t)
{
d << "start " << t.start();
d << "end " << t.end();
d << "length " << t.length();
d << "blockId " << t.blockId();
d << "suggestion " << t.suggestions();
d << "replacement " << t.replacement();
......
......@@ -40,8 +40,8 @@ public:
Q_REQUIRED_RESULT int start() const;
void setStart(int start);
Q_REQUIRED_RESULT int end() const;
void setEnd(int end);
Q_REQUIRED_RESULT int length() const;
void setLength(int length);
Q_REQUIRED_RESULT QStringList suggestions() const;
void setSuggestions(const QStringList &suggestions);
......@@ -53,7 +53,7 @@ private:
QStringList mSuggestions;
QString mReplacement;
int mStart = -1;
int mEnd = -1;
int mLength = -1;
int mBlockId = -1;
};
......
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