Newer
Older
checkForDeletedApplicationProjects();
}
if (newType == Internal::ApplicationTemplate
|| newType == Internal::ScriptTemplate) {
// add a new Run Configuration
m_applicationProFileChange.clear();
m_applicationProFileChange.append(node);
checkForNewApplicationProjects();
}
}
bool Qt4Project::hasSubNode(Qt4PriFileNode *root, const QString &path)
if (root->path() == path)
return true;
foreach (FolderNode *fn, root->subFolderNodes()) {
if (qobject_cast<Qt4ProFileNode *>(fn)) {
// we aren't interested in pro file nodes
} else if (Qt4PriFileNode *qt4prifilenode = qobject_cast<Qt4PriFileNode *>(fn)) {
if (hasSubNode(qt4prifilenode, path))
return true;
}
}
return false;
}
void Qt4Project::findProFile(const QString& fileName, Qt4ProFileNode *root, QList<Qt4ProFileNode *> &list)
{
list.append(root);
foreach (FolderNode *fn, root->subFolderNodes())
if (Qt4ProFileNode *qt4proFileNode = qobject_cast<Qt4ProFileNode *>(fn))
findProFile(fileName, qt4proFileNode, list);
}
void Qt4Project::notifyChanged(const QString &name)
{
if (files(Qt4Project::ExcludeGeneratedFiles).contains(name)) {
QList<Qt4ProFileNode *> list;
findProFile(name, rootProjectNode(), list);
foreach(Qt4ProFileNode *node, list)
node->update();
}
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
/*!
Handle special case were a subproject of the qt directory is opened, and
qt was configured to be built as a shadow build -> also build in the sub-
project in the correct shadow build directory.
*/
// TODO this function should be called on project first load
// and it should check against all configured qt versions ?
//void Qt4Project::detectQtShadowBuild(const QString &buildConfiguration) const
//{
// if (project()->activeBuildConfiguration() == buildConfiguration)
// return;
//
// const QString currentQtDir = static_cast<Qt4Project *>(project())->qtDir(buildConfiguration);
// const QString qtSourceDir = static_cast<Qt4Project *>(project())->qtVersion(buildConfiguration)->sourcePath();
//
// // if the project is a sub-project of Qt and Qt was shadow-built then automatically
// // adjust the build directory of the sub-project.
// if (project()->file()->fileName().startsWith(qtSourceDir) && qtSourceDir != currentQtDir) {
// project()->setValue(buildConfiguration, "useShadowBuild", true);
// QString buildDir = QFileInfo(project()->file()->fileName()).absolutePath();
// buildDir.replace(qtSourceDir, currentQtDir);
// project()->setValue(buildConfiguration, "buildDirectory", buildDir);
// project()->setValue(buildConfiguration, "autoShadowBuild", true);
// }
//}