forked from qt-creator/qt-creator
Removed CppQuickFixOperation::cppRefactoringChanges().
This commit is contained in:
@@ -149,7 +149,7 @@ public:
|
|||||||
changes.insert(endOf(binary), ")");
|
changes.insert(endOf(binary), ")");
|
||||||
}
|
}
|
||||||
replace(&changes, binary->binary_op_token, replacement);
|
replace(&changes, binary->binary_op_token, replacement);
|
||||||
cppRefactoringChanges()->changeFile(fileName(), changes);
|
refactoringChanges()->changeFile(fileName(), changes);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -232,7 +232,7 @@ public:
|
|||||||
if (! replacement.isEmpty())
|
if (! replacement.isEmpty())
|
||||||
replace(&changes, binary->binary_op_token, replacement);
|
replace(&changes, binary->binary_op_token, replacement);
|
||||||
|
|
||||||
cppRefactoringChanges()->changeFile(fileName(), changes);
|
refactoringChanges()->changeFile(fileName(), changes);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -301,8 +301,8 @@ public:
|
|||||||
changes.insert(start, QLatin1String("!("));
|
changes.insert(start, QLatin1String("!("));
|
||||||
changes.insert(end, QLatin1String(")"));
|
changes.insert(end, QLatin1String(")"));
|
||||||
|
|
||||||
cppRefactoringChanges()->changeFile(fileName(), changes);
|
refactoringChanges()->changeFile(fileName(), changes);
|
||||||
cppRefactoringChanges()->reindent(fileName(), range(start, end));
|
refactoringChanges()->reindent(fileName(), range(start, end));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -412,8 +412,8 @@ public:
|
|||||||
prevDeclarator = declarator;
|
prevDeclarator = declarator;
|
||||||
}
|
}
|
||||||
|
|
||||||
cppRefactoringChanges()->changeFile(fileName(), changes);
|
refactoringChanges()->changeFile(fileName(), changes);
|
||||||
cppRefactoringChanges()->reindent(fileName(), range(startOf(declaration->firstToken()),
|
refactoringChanges()->reindent(fileName(), range(startOf(declaration->firstToken()),
|
||||||
endOf(declaration->lastToken() - 1)));
|
endOf(declaration->lastToken() - 1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -476,8 +476,8 @@ public:
|
|||||||
const int end = endOf(_statement->lastToken() - 1);
|
const int end = endOf(_statement->lastToken() - 1);
|
||||||
changes.insert(end, "\n}");
|
changes.insert(end, "\n}");
|
||||||
|
|
||||||
cppRefactoringChanges()->changeFile(fileName(), changes);
|
refactoringChanges()->changeFile(fileName(), changes);
|
||||||
cppRefactoringChanges()->reindent(fileName(), range(start, end));
|
refactoringChanges()->reindent(fileName(), range(start, end));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -537,8 +537,8 @@ public:
|
|||||||
move(&changes, condition, insertPos);
|
move(&changes, condition, insertPos);
|
||||||
changes.insert(insertPos, QLatin1String(";\n"));
|
changes.insert(insertPos, QLatin1String(";\n"));
|
||||||
|
|
||||||
cppRefactoringChanges()->changeFile(fileName(), changes);
|
refactoringChanges()->changeFile(fileName(), changes);
|
||||||
cppRefactoringChanges()->reindent(fileName(), range(startOf(pattern),
|
refactoringChanges()->reindent(fileName(), range(startOf(pattern),
|
||||||
endOf(pattern)));
|
endOf(pattern)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -614,8 +614,8 @@ public:
|
|||||||
copy(&changes, core, insertPos);
|
copy(&changes, core, insertPos);
|
||||||
changes.insert(insertPos, QLatin1String(";\n"));
|
changes.insert(insertPos, QLatin1String(";\n"));
|
||||||
|
|
||||||
cppRefactoringChanges()->changeFile(fileName(), changes);
|
refactoringChanges()->changeFile(fileName(), changes);
|
||||||
cppRefactoringChanges()->reindent(fileName(), range(startOf(pattern),
|
refactoringChanges()->reindent(fileName(), range(startOf(pattern),
|
||||||
endOf(pattern)));
|
endOf(pattern)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -729,8 +729,8 @@ public:
|
|||||||
startOf(condition->right_expression) - lExprEnd);
|
startOf(condition->right_expression) - lExprEnd);
|
||||||
changes.insert(endOf(pattern), QLatin1String("\n}"));
|
changes.insert(endOf(pattern), QLatin1String("\n}"));
|
||||||
|
|
||||||
cppRefactoringChanges()->changeFile(fileName(), changes);
|
refactoringChanges()->changeFile(fileName(), changes);
|
||||||
cppRefactoringChanges()->reindent(fileName(), range(startOf(pattern),
|
refactoringChanges()->reindent(fileName(), range(startOf(pattern),
|
||||||
endOf(pattern)));
|
endOf(pattern)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -759,8 +759,8 @@ public:
|
|||||||
const int lExprEnd = endOf(condition->left_expression);
|
const int lExprEnd = endOf(condition->left_expression);
|
||||||
changes.remove(lExprEnd, startOf(condition->right_expression) - lExprEnd);
|
changes.remove(lExprEnd, startOf(condition->right_expression) - lExprEnd);
|
||||||
|
|
||||||
cppRefactoringChanges()->changeFile(fileName(), changes);
|
refactoringChanges()->changeFile(fileName(), changes);
|
||||||
cppRefactoringChanges()->reindent(fileName(), range(startOf(pattern),
|
refactoringChanges()->reindent(fileName(), range(startOf(pattern),
|
||||||
endOf(pattern)));
|
endOf(pattern)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -839,7 +839,7 @@ public:
|
|||||||
|
|
||||||
changes.insert(endOf(stringLiteral), ")");
|
changes.insert(endOf(stringLiteral), ")");
|
||||||
|
|
||||||
cppRefactoringChanges()->changeFile(fileName(), changes);
|
refactoringChanges()->changeFile(fileName(), changes);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -914,7 +914,7 @@ public:
|
|||||||
changes.insert(startOf(stringLiteral), "@");
|
changes.insert(startOf(stringLiteral), "@");
|
||||||
}
|
}
|
||||||
|
|
||||||
cppRefactoringChanges()->changeFile(fileName(), changes);
|
refactoringChanges()->changeFile(fileName(), changes);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -953,15 +953,12 @@ QString CppQuickFixOperation::fileName() const
|
|||||||
|
|
||||||
void CppQuickFixOperation::apply()
|
void CppQuickFixOperation::apply()
|
||||||
{
|
{
|
||||||
cppRefactoringChanges()->apply();
|
refactoringChanges()->apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
CppEditor::CppRefactoringChanges *CppQuickFixOperation::cppRefactoringChanges() const
|
CppEditor::CppRefactoringChanges *CppQuickFixOperation::refactoringChanges() const
|
||||||
{ return _refactoringChanges; }
|
{ return _refactoringChanges; }
|
||||||
|
|
||||||
TextEditor::RefactoringChanges *CppQuickFixOperation::refactoringChanges() const
|
|
||||||
{ return cppRefactoringChanges(); }
|
|
||||||
|
|
||||||
Document::Ptr CppQuickFixOperation::document() const
|
Document::Ptr CppQuickFixOperation::document() const
|
||||||
{ return _document; }
|
{ return _document; }
|
||||||
|
|
||||||
|
|||||||
@@ -41,13 +41,13 @@
|
|||||||
#include <QtCore/QSharedPointer>
|
#include <QtCore/QSharedPointer>
|
||||||
#include <QtGui/QTextCursor>
|
#include <QtGui/QTextCursor>
|
||||||
|
|
||||||
|
#include "cpprefactoringchanges.h"
|
||||||
|
|
||||||
namespace CppTools {
|
namespace CppTools {
|
||||||
class CppModelManagerInterface;
|
class CppModelManagerInterface;
|
||||||
} // end of namespace CppTools
|
} // end of namespace CppTools
|
||||||
|
|
||||||
namespace CppEditor {
|
namespace CppEditor {
|
||||||
class CppRefactoringChanges;
|
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class CppQuickFixOperation: public TextEditor::QuickFixOperation
|
class CppQuickFixOperation: public TextEditor::QuickFixOperation
|
||||||
@@ -69,8 +69,7 @@ protected:
|
|||||||
QString fileName() const;
|
QString fileName() const;
|
||||||
|
|
||||||
virtual void apply();
|
virtual void apply();
|
||||||
virtual CppRefactoringChanges *cppRefactoringChanges() const;
|
virtual CppRefactoringChanges *refactoringChanges() const;
|
||||||
virtual TextEditor::RefactoringChanges *refactoringChanges() const;
|
|
||||||
|
|
||||||
const CPlusPlus::Token &tokenAt(unsigned index) const;
|
const CPlusPlus::Token &tokenAt(unsigned index) const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user