diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2013-03-04 13:05:40 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-03-04 13:16:50 +0100 |
commit | 4cf1ccd16188be4a1fa5ac7b635be20f0e77047f (patch) | |
tree | 1667061bcb5dc4a7b50368a8647fc43a5aca4c97 /src/plugins/texteditor/semantichighlighter.h | |
parent | f4a9f56e3e27f689cbaad1b928ae0f58836c6ad6 (diff) | |
download | qt-creator-4cf1ccd16188be4a1fa5ac7b635be20f0e77047f.tar.gz |
C++: Fix semantic highlighter and tests.
Fixed the chunk size calculation, made the sorting more stable, and
fixed the tests.
Change-Id: I81fcffbf2ce9b63dd81f1a0e251200a31220db88
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src/plugins/texteditor/semantichighlighter.h')
-rw-r--r-- | src/plugins/texteditor/semantichighlighter.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/texteditor/semantichighlighter.h b/src/plugins/texteditor/semantichighlighter.h index 9def1c0db6..e068d3b351 100644 --- a/src/plugins/texteditor/semantichighlighter.h +++ b/src/plugins/texteditor/semantichighlighter.h @@ -65,6 +65,15 @@ public: : line(0), column(0), length(0), kind(-1) {} Result(unsigned line, unsigned column, unsigned length, int kind) : line(line), column(column), length(length), kind(kind) {} + + bool operator==(const Result& other) const + { + return + line == other.line && + column == other.column && + length == other.length && + kind == other.kind; + } }; // Applies the future results [from, to) and applies the extra formats |