Commit eb119b21 authored by Kai Koehne's avatar Kai Koehne

ProjectExplorer: Fix potential crash when removing files

Change-Id: I0973d92ae5bdcc89482a55f011d55bc7383b757b
Task-number: QTCREATORBUG-5961
Reviewed-on: http://codereview.qt-project.org/4877Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent a4a05aef
......@@ -2627,7 +2627,7 @@ void ProjectExplorerPlugin::deleteFile()
projectNode->deleteFiles(fileNode->fileType(), QStringList(filePath));
core->fileManager()->expectFileChange(fileNode->path());
core->fileManager()->expectFileChange(filePath);
if (Core::IVersionControl *vc =
core->vcsManager()->findVersionControlForDirectory(QFileInfo(filePath).absolutePath())) {
vc->vcsDelete(filePath);
......@@ -2638,7 +2638,7 @@ void ProjectExplorerPlugin::deleteFile()
QMessageBox::warning(core->mainWindow(), tr("Deleting File Failed"),
tr("Could not delete file %1.").arg(filePath));
}
core->fileManager()->unexpectFileChange(fileNode->path());
core->fileManager()->unexpectFileChange(filePath);
}
void ProjectExplorerPlugin::renameFile()
......
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