forked from qt-creator/qt-creator
QuickFix: Don't separate createChanges from perform.
This will allow a more efficient and direct implementation.
This commit is contained in:
@@ -92,7 +92,7 @@ public:
|
||||
"Move Component into '%1.qml'").arg(m_componentName));
|
||||
}
|
||||
|
||||
virtual void createChanges()
|
||||
virtual void perform()
|
||||
{
|
||||
const QString newFileName = QFileInfo(fileName()).path()
|
||||
+ QDir::separator() + m_componentName + QLatin1String(".qml");
|
||||
@@ -117,6 +117,7 @@ public:
|
||||
|
||||
refactoringChanges()->createFile(newFileName, txt);
|
||||
refactoringChanges()->reindent(newFileName, range(0, txt.length() - 1));
|
||||
refactoringChanges()->apply();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ private:
|
||||
"Split initializer"));
|
||||
}
|
||||
|
||||
virtual void createChanges()
|
||||
virtual void perform()
|
||||
{
|
||||
Q_ASSERT(_objectInitializer != 0);
|
||||
|
||||
@@ -112,6 +112,7 @@ private:
|
||||
file.indent(range(startPosition(_objectInitializer->lbraceToken),
|
||||
startPosition(_objectInitializer->rbraceToken)));
|
||||
|
||||
refactoringChanges()->apply();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user