forked from qt-creator/qt-creator
TextEditor: move convenience from texteditor to utils
Allows to use this header without texteditor dependency. Change-Id: I706f42799c3ea42473a716fa9ef9f3cfbef6fdd4 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -26,10 +26,11 @@
|
||||
#include "cppcanonicalsymbol.h"
|
||||
|
||||
#include <cpptools/cpptoolsreuse.h>
|
||||
#include <texteditor/convenience.h>
|
||||
|
||||
#include <cplusplus/ExpressionUnderCursor.h>
|
||||
|
||||
#include <utils/textutils.h>
|
||||
|
||||
#include <QTextCursor>
|
||||
#include <QTextDocument>
|
||||
|
||||
@@ -58,7 +59,7 @@ Scope *CanonicalSymbol::getScopeAndExpression(const QTextCursor &cursor, QString
|
||||
|
||||
QTextCursor tc = cursor;
|
||||
int line, column;
|
||||
TextEditor::Convenience::convertPosition(cursor.document(), tc.position(), &line, &column);
|
||||
Utils::Text::convertPosition(cursor.document(), tc.position(), &line, &column);
|
||||
++column; // 1-based line and 1-based column
|
||||
|
||||
int pos = tc.position();
|
||||
|
||||
Reference in New Issue
Block a user