Commit 77fc7441 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

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

parent e7a477b3
......@@ -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())
......
......@@ -115,7 +115,6 @@ private slots:
void undoProjectChanges();
void stageFile();
void unstageFile();
void revertFile();
void showCommit();
void startCommit();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment