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:
Daniel Teske
2012-04-18 11:50:32 +02:00
parent dc327294d6
commit c976024c26
2 changed files with 11 additions and 4 deletions

View File

@@ -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;
}