Git: Remove dpulicate slot revert(), move to UndoFileChanges.

This commit is contained in:
Friedemann Kleint
2009-09-25 12:41:13 +02:00
parent e7a477b3a0
commit 77fc7441af
2 changed files with 2 additions and 18 deletions

View File

@@ -511,17 +511,11 @@ void GitPlugin::logProject()
void GitPlugin::undoFileChanges()
{
QFileInfo fileInfo = currentFile();
QString fileName = fileInfo.fileName();
QString workingDirectory = fileInfo.absolutePath();
const QFileInfo fileInfo = currentFile();
Core::FileChangeBlocker fcb(fileInfo.filePath());
fcb.setModifiedReload(true);
QString errorMessage;
if (!m_gitClient->synchronousCheckout(workingDirectory, QStringList() << fileName, &errorMessage))
VCSBase::VCSBaseOutputWindow::instance()->append(errorMessage);
m_gitClient->revert(QStringList(fileInfo.absoluteFilePath()));
}
void GitPlugin::undoProjectChanges()
@@ -556,15 +550,6 @@ void GitPlugin::unstageFile()
m_gitClient->synchronousReset(workingDirectory, QStringList(fileName));
}
void GitPlugin::revertFile()
{
const QFileInfo fileInfo = currentFile();
Core::FileChangeBlocker fcb(fileInfo.filePath());
fcb.setModifiedReload(true);
m_gitClient->revert(QStringList(fileInfo.absoluteFilePath()));
}
void GitPlugin::startCommit()
{
if (VCSBase::VCSBaseSubmitEditor::raiseSubmitEditor())