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