diff options
author | dt <qtc-committer@nokia.com> | 2009-06-18 14:30:04 +0200 |
---|---|---|
committer | dt <qtc-committer@nokia.com> | 2009-06-18 14:30:04 +0200 |
commit | 4637d56284be035fb4ac9d6c5c1a24f4ab50d46f (patch) | |
tree | c34d129c9d1421423d5bda820827c9caac672cc8 /src/plugins/perforce | |
parent | 69d04bc069dd07f2bb4bfb905d4a88b6b12a8bbd (diff) |
Don't ask to reload the file, if the user uses git/undo or git/revert.
Simply do it.
Task-Nr: 254558
Diffstat (limited to 'src/plugins/perforce')
-rw-r--r-- | src/plugins/perforce/perforceplugin.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index 789f56a60f..92ac232b83 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -444,18 +444,9 @@ void PerforcePlugin::revertCurrentFile() return; } - Core::FileManager *fm = Core::ICore::instance()->fileManager(); - QList<Core::IFile *> files = fm->managedFiles(fileName); - foreach (Core::IFile *file, files) { - fm->blockFileChange(file); - } + Core::FileChangeBlocker fcb(fileName); + fcb.setModifiedReload(true); PerforceResponse result2 = runP4Cmd(QStringList() << QLatin1String("revert") << fileName, QStringList(), CommandToWindow|StdOutToWindow|StdErrToWindow|ErrorToWindow); - Core::IFile::ReloadBehavior tempBehavior = - Core::IFile::ReloadAll; - foreach (Core::IFile *file, files) { - file->modified(&tempBehavior); - fm->unblockFileChange(file); - } } void PerforcePlugin::diffCurrentFile() |