aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppfunctiondecldeflink.h
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-08-17 14:11:35 +0200
committerChristian Kamm <christian.d.kamm@nokia.com>2011-08-19 11:12:17 +0200
commit6235ec51201976e08b86591969e3b9b94011076e (patch)
tree388a897421e6a188f39787208e87da8e4847d646 /src/plugins/cppeditor/cppfunctiondecldeflink.h
parent8a6d767a8f2f98ea4e04847f92cff40d661b806f (diff)
C++ function links: Use line+column instead of offset for target.
It's more robust if text before the target is changed in a minor way. Change-Id: I48e27c5d194dd2dcff4b064bf59538b4660015d7 Reviewed-on: http://codereview.qt.nokia.com/3097 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/plugins/cppeditor/cppfunctiondecldeflink.h')
-rw-r--r--src/plugins/cppeditor/cppfunctiondecldeflink.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cppfunctiondecldeflink.h b/src/plugins/cppeditor/cppfunctiondecldeflink.h
index a75e71f3ef..d27833bced 100644
--- a/src/plugins/cppeditor/cppfunctiondecldeflink.h
+++ b/src/plugins/cppeditor/cppfunctiondecldeflink.h
@@ -89,10 +89,12 @@ public:
void apply(CPPEditorWidget *editor, bool jumpToMatch);
void hideMarker(CPPEditorWidget *editor);
void showMarker(CPPEditorWidget *editor);
- Utils::ChangeSet changes(const CPlusPlus::Snapshot &snapshot);
+ Utils::ChangeSet changes(const CPlusPlus::Snapshot &snapshot, int targetOffset = -1);
QTextCursor linkSelection;
- int targetOffset;
+ // 1-based line and column
+ unsigned targetLine;
+ unsigned targetColumn;
QString targetInitial;
CPlusPlus::Document::Ptr sourceDocument;