Merge branch '0.9.1-beta' of git@scm.dev.nokia.troll.no:creator/mainline into 0.9.1-beta

Conflicts:
	src/plugins/cmakeprojectmanager/cmakeproject.cpp
This commit is contained in:
dt
2008-12-09 14:18:09 +01:00
117 changed files with 820 additions and 804 deletions

View File

@@ -63,7 +63,7 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
if (cbpparser.parseCbpFile(cbpFile)) {
// TODO do a intelligent updating of the tree
buildTree(m_rootNode, cbpparser.fileList());
foreach(ProjectExplorer::FileNode *fn, cbpparser.fileList())
foreach (ProjectExplorer::FileNode *fn, cbpparser.fileList())
m_files.append(fn->path());
m_files.sort();
@@ -102,11 +102,9 @@ QString CMakeProject::findCbpFile(const QDir &directory)
// TODO the cbp file is named like the project() command in the CMakeList.txt file
// so this method below could find the wrong cbp file, if the user changes the project()
// name
foreach(const QString &cbpFile , directory.entryList())
{
if (cbpFile.endsWith(".cbp")) {
foreach (const QString &cbpFile , directory.entryList()) {
if (cbpFile.endsWith(".cbp"))
return directory.path() + "/" + cbpFile;
}
}
return QString::null;
}
@@ -132,7 +130,7 @@ void CMakeProject::buildTree(CMakeProjectNode *rootNode, QList<ProjectExplorer::
{
//m_rootNode->addFileNodes(fileList, m_rootNode);
qSort(list.begin(), list.end(), ProjectExplorer::ProjectNode::sortNodesByPath);
foreach( ProjectExplorer::FileNode *fn, list) {
foreach (ProjectExplorer::FileNode *fn, list) {
// Get relative path to rootNode
QString parentDir = QFileInfo(fn->path()).absolutePath();
ProjectExplorer::FolderNode *folder = findOrCreateFolder(rootNode, parentDir);
@@ -146,10 +144,10 @@ ProjectExplorer::FolderNode *CMakeProject::findOrCreateFolder(CMakeProjectNode *
QString relativePath = QDir(QFileInfo(rootNode->path()).path()).relativeFilePath(directory);
QStringList parts = relativePath.split("/");
ProjectExplorer::FolderNode *parent = rootNode;
foreach(const QString &part, parts) {
foreach (const QString &part, parts) {
// Find folder in subFolders
bool found = false;
foreach(ProjectExplorer::FolderNode *folder, parent->subFolderNodes()) {
foreach (ProjectExplorer::FolderNode *folder, parent->subFolderNodes()) {
if (QFileInfo(folder->path()).fileName() == part) {
// yeah found something :)
parent = folder;
@@ -359,7 +357,7 @@ bool CMakeCbpParser::parseCbpFile(const QString &fileName)
if (fi.exists() && fi.open(QFile::ReadOnly)) {
setDevice(&fi);
while(!atEnd()) {
while (!atEnd()) {
readNext();
if (name() == "CodeBlocks_project_file") {
parseCodeBlocks_project_file();
@@ -377,7 +375,7 @@ bool CMakeCbpParser::parseCbpFile(const QString &fileName)
void CMakeCbpParser::parseCodeBlocks_project_file()
{
while(!atEnd()) {
while (!atEnd()) {
readNext();
if (isEndElement()) {
return;
@@ -391,7 +389,7 @@ void CMakeCbpParser::parseCodeBlocks_project_file()
void CMakeCbpParser::parseProject()
{
while(!atEnd()) {
while (!atEnd()) {
readNext();
if (isEndElement()) {
return;
@@ -407,7 +405,7 @@ void CMakeCbpParser::parseProject()
void CMakeCbpParser::parseBuild()
{
while(!atEnd()) {
while (!atEnd()) {
readNext();
if (isEndElement()) {
return;
@@ -509,7 +507,7 @@ void CMakeCbpParser::parseTargetClean()
void CMakeCbpParser::parseCompiler()
{
while(!atEnd()) {
while (!atEnd()) {
readNext();
if (isEndElement()) {
return;
@@ -524,7 +522,7 @@ void CMakeCbpParser::parseCompiler()
void CMakeCbpParser::parseAdd()
{
m_includeFiles.append(attributes().value("directory").toString());
while(!atEnd()) {
while (!atEnd()) {
readNext();
if (isEndElement()) {
return;
@@ -540,7 +538,7 @@ void CMakeCbpParser::parseUnit()
QString fileName = attributes().value("filename").toString();
if (!fileName.endsWith(".rule"))
m_fileList.append( new ProjectExplorer::FileNode(fileName, ProjectExplorer::SourceType, false));
while(!atEnd()) {
while (!atEnd()) {
readNext();
if (isEndElement()) {
return;