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:
@@ -25,11 +25,10 @@
|
||||
|
||||
#include "doxygengenerator.h"
|
||||
|
||||
#include <texteditor/convenience.h>
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
#include <cplusplus/SimpleLexer.h>
|
||||
|
||||
#include <utils/textutils.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -73,10 +72,8 @@ void DoxygenGenerator::setAddLeadingAsterisks(bool add)
|
||||
static int lineBeforeCursor(const QTextCursor &cursor)
|
||||
{
|
||||
int line, column;
|
||||
const bool converted = TextEditor::Convenience::convertPosition(cursor.document(),
|
||||
cursor.position(),
|
||||
&line,
|
||||
&column);
|
||||
const bool converted = Utils::Text::convertPosition(cursor.document(), cursor.position(), &line,
|
||||
&column);
|
||||
QTC_ASSERT(converted, return std::numeric_limits<int>::max());
|
||||
|
||||
return line - 1;
|
||||
|
||||
Reference in New Issue
Block a user