Commit f1d823e0 authored by Daniel Teske's avatar Daniel Teske
Browse files

ProjectExplorer: Fix crash on renaming files

Task-number: QTCREATORBUG-12930
Change-Id: I1409ec5356856a01a5fb852c61c4a2a24aa6751e
Reviewed-by: default avatarDaniel Teske <>
parent 48bcb83c
......@@ -3188,12 +3188,13 @@ void ProjectExplorerPlugin::renameFile(Node *node, const QString &to)
if (Core::FileUtils::renameFile(orgFilePath, newFilePath)) {
// Tell the project plugin about rename
FolderNode *folderNode = node->parentFolderNode();
QString projectDisplayName = folderNode->projectNode()->displayName();
if (!folderNode->renameFile(orgFilePath, newFilePath)) {
QMessageBox::warning(ICore::mainWindow(), tr("Project Editing Failed"),
tr("The file %1 was renamed to %2, but the project file %3 could not be automatically changed.")
} else {
setCurrent(SessionManager::projectForFile(newFilePath), newFilePath, 0);
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