For adding files use the "primary" variable for each file type.

That is e.g. SOURCES instead of whatever variable is used first in the
project file.

Reviewed-By: ossi
This commit is contained in:
dt
2010-05-18 14:59:51 +02:00
parent 79dae814aa
commit 435ff5dfe3
3 changed files with 7 additions and 5 deletions

View File

@@ -735,7 +735,9 @@ void Qt4PriFileNode::changeFiles(const FileType fileType,
QDir priFileDir = QDir(m_qt4ProFileNode->m_projectDir);
if (change == AddToProFile) {
ProWriter::addFiles(includeFile, &lines, priFileDir, filePaths, vars);
// Use the first variable for adding.
// Yes, that's broken for adding objective c sources or other stuff.
ProWriter::addFiles(includeFile, &lines, priFileDir, filePaths, vars.first());
notChanged->clear();
} else { // RemoveFromProFile
*notChanged = ProWriter::removeFiles(includeFile, &lines, priFileDir, filePaths, vars);