forked from qt-creator/qt-creator
File renaming: Show a warning message if a project could not be changed
Except if we expect the changing to do nothing, e.g. if the file is added via a folder deployment. Change-Id: Ic6a8caa27e6ce3e779ac9cd13a43a6898360bfea Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com> Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -992,12 +992,14 @@ bool Qt4PriFileNode::renameFile(const FileType fileType, const QString &filePath
|
||||
if (newFilePath.isEmpty())
|
||||
return false;
|
||||
|
||||
bool changeProFileOptional = deploysFolder(QFileInfo(filePath).absolutePath());
|
||||
|
||||
QStringList dummy;
|
||||
changeFiles(fileType, QStringList() << filePath, &dummy, RemoveFromProFile);
|
||||
if (!dummy.isEmpty())
|
||||
if (!dummy.isEmpty() && !changeProFileOptional)
|
||||
return false;
|
||||
changeFiles(fileType, QStringList() << newFilePath, &dummy, AddToProFile);
|
||||
if (!dummy.isEmpty())
|
||||
if (!dummy.isEmpty() && !changeProFileOptional)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user