forked from qt-creator/qt-creator
Editors: Move auto-completion code out of the editor
This is basically a continuation of the commits which refactor code out of the base text editor. For instance,36fa1de4c6and3a684586fa. Also removed the doXXXX() forwarding methods.
This commit is contained in:
@@ -47,7 +47,7 @@ CppQtStyleIndenter::CppQtStyleIndenter()
|
||||
CppQtStyleIndenter::~CppQtStyleIndenter()
|
||||
{}
|
||||
|
||||
bool CppQtStyleIndenter::doIsElectricalCharacter(const QChar &ch) const
|
||||
bool CppQtStyleIndenter::isElectricCharacter(const QChar &ch) const
|
||||
{
|
||||
if (ch == QLatin1Char('{') ||
|
||||
ch == QLatin1Char('}') ||
|
||||
@@ -58,10 +58,10 @@ bool CppQtStyleIndenter::doIsElectricalCharacter(const QChar &ch) const
|
||||
return false;
|
||||
}
|
||||
|
||||
void CppQtStyleIndenter::doIndentBlock(QTextDocument *doc,
|
||||
const QTextBlock &block,
|
||||
const QChar &typedChar,
|
||||
TextEditor::BaseTextEditor *editor)
|
||||
void CppQtStyleIndenter::indentBlock(QTextDocument *doc,
|
||||
const QTextBlock &block,
|
||||
const QChar &typedChar,
|
||||
TextEditor::BaseTextEditor *editor)
|
||||
{
|
||||
Q_UNUSED(doc)
|
||||
|
||||
@@ -86,10 +86,10 @@ void CppQtStyleIndenter::doIndentBlock(QTextDocument *doc,
|
||||
ts.indentLine(block, indent + padding, padding);
|
||||
}
|
||||
|
||||
void CppQtStyleIndenter::doIndent(QTextDocument *doc,
|
||||
const QTextCursor &cursor,
|
||||
const QChar &typedChar,
|
||||
TextEditor::BaseTextEditor *editor)
|
||||
void CppQtStyleIndenter::indent(QTextDocument *doc,
|
||||
const QTextCursor &cursor,
|
||||
const QChar &typedChar,
|
||||
TextEditor::BaseTextEditor *editor)
|
||||
{
|
||||
if (cursor.hasSelection()) {
|
||||
QTextBlock block = doc->findBlock(cursor.selectionStart());
|
||||
|
||||
Reference in New Issue
Block a user