forked from qt-creator/qt-creator
Compile the C++ parser library with Sun CC 5.9.
Things you mustn't do: 1) end an enum with a comma 2) #include <cxxxx> and not use std:: 3) use anonymous structures All three things are invalid C++. Anonymous structures inside anonymous unions are allowed by GCC, but that doesn't mean it's valid.
This commit is contained in:
@@ -211,7 +211,7 @@ protected:
|
||||
unsigned line, col;
|
||||
getTokenStartPosition(index, &line, &col);
|
||||
QTextCursor tc = _textCursor;
|
||||
tc.setPosition(tc.document()->findBlockByNumber(line - 1).position() + col + tk.length - 1);
|
||||
tc.setPosition(tc.document()->findBlockByNumber(line - 1).position() + col + tk.f.length - 1);
|
||||
return tc;
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ QTextCursor QuickFixOperation::cursor(unsigned index) const
|
||||
getTokenStartPosition(index, &line, &col);
|
||||
QTextCursor tc = _textCursor;
|
||||
tc.setPosition(tc.document()->findBlockByNumber(line - 1).position() + col - 1);
|
||||
tc.setPosition(tc.position() + tk.length, QTextCursor::KeepAnchor);
|
||||
tc.setPosition(tc.position() + tk.f.length, QTextCursor::KeepAnchor);
|
||||
return tc;
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ QTextCursor QuickFixOperation::moveAtEndOfToken(unsigned index) const
|
||||
unsigned line, col;
|
||||
getTokenStartPosition(index, &line, &col);
|
||||
QTextCursor tc = _textCursor;
|
||||
tc.setPosition(tc.document()->findBlockByNumber(line - 1).position() + col + tk.length - 1);
|
||||
tc.setPosition(tc.document()->findBlockByNumber(line - 1).position() + col + tk.f.length - 1);
|
||||
return tc;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user