Changed BaseTextEditor::Link to use a pair of offsets (begin, end) instead of position and length.

Done with: Thorbjorn.
This commit is contained in:
Roberto Raggi
2010-02-01 16:13:21 +01:00
parent 460c47f5c6
commit 7c88796002
3 changed files with 19 additions and 21 deletions

View File

@@ -567,21 +567,21 @@ protected:
Link(const QString &fileName = QString(),
int line = 0,
int column = 0)
: pos(-1)
, length(-1)
: begin(-1)
, end(-1)
, fileName(fileName)
, line(line)
, column(column)
{}
bool isValid() const
{ return !(pos == -1 || length == -1); }
{ return begin != end; }
bool operator==(const Link &other) const
{ return pos == other.pos && length == other.length; }
{ return begin == other.begin && end == other.end; }
int pos; // Link position
int length; // Link length
int begin; // Link position
int end; // Link end position
QString fileName; // Target file
int line; // Target line