Commit db03ceb5 authored by hjk's avatar hjk
Browse files

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents 12018c89 43f75f38
...@@ -111,8 +111,12 @@ void CMakeProject::parseCMakeLists() ...@@ -111,8 +111,12 @@ void CMakeProject::parseCMakeLists()
m_projectName = cbpparser.projectName(); m_projectName = cbpparser.projectName();
qDebug()<<"Building Tree"; qDebug()<<"Building Tree";
// TODO do a intelligent updating of the tree // TODO do a intelligent updating of the tree
buildTree(m_rootNode, cbpparser.fileList());
foreach (ProjectExplorer::FileNode *fn, cbpparser.fileList()) QList<ProjectExplorer::FileNode *> fileList = cbpparser.fileList();
// Manually add the CMakeLists.txt file
fileList.append(new ProjectExplorer::FileNode(sourceDirectory + "/CMakeLists.txt", ProjectExplorer::ProjectFileType, false));
buildTree(m_rootNode, fileList);
foreach (ProjectExplorer::FileNode *fn, fileList)
m_files.append(fn->path()); m_files.append(fn->path());
m_files.sort(); m_files.sort();
...@@ -208,7 +212,7 @@ void CMakeProject::buildTree(CMakeProjectNode *rootNode, QList<ProjectExplorer:: ...@@ -208,7 +212,7 @@ void CMakeProject::buildTree(CMakeProjectNode *rootNode, QList<ProjectExplorer::
ProjectExplorer::FolderNode *CMakeProject::findOrCreateFolder(CMakeProjectNode *rootNode, QString directory) ProjectExplorer::FolderNode *CMakeProject::findOrCreateFolder(CMakeProjectNode *rootNode, QString directory)
{ {
QString relativePath = QDir(QFileInfo(rootNode->path()).path()).relativeFilePath(directory); QString relativePath = QDir(QFileInfo(rootNode->path()).path()).relativeFilePath(directory);
QStringList parts = relativePath.split("/"); QStringList parts = relativePath.split("/", QString::SkipEmptyParts);
ProjectExplorer::FolderNode *parent = rootNode; ProjectExplorer::FolderNode *parent = rootNode;
foreach (const QString &part, parts) { foreach (const QString &part, parts) {
// Find folder in subFolders // Find folder in subFolders
......
...@@ -110,7 +110,10 @@ QString CMakeManager::createXmlFile(const QStringList &arguments, const QString ...@@ -110,7 +110,10 @@ QString CMakeManager::createXmlFile(const QStringList &arguments, const QString
buildDirectory.mkpath(buildDirectoryPath); buildDirectory.mkpath(buildDirectoryPath);
QProcess cmake; QProcess cmake;
cmake.setWorkingDirectory(buildDirectoryPath); cmake.setWorkingDirectory(buildDirectoryPath);
cmake.start(cmakeExecutable(), QStringList() << sourceDirectory << arguments << "-GCodeBlocks - Unix Makefiles");
QString generator = "-GCodeBlocks - Unix Makefiles";
cmake.start(cmakeExecutable(), QStringList() << sourceDirectory << arguments << generator);
qDebug()<<cmakeExecutable()<<sourceDirectory << arguments; qDebug()<<cmakeExecutable()<<sourceDirectory << arguments;
cmake.waitForFinished(-1); cmake.waitForFinished(-1);
cmake.setProcessChannelMode(QProcess::MergedChannels); cmake.setProcessChannelMode(QProcess::MergedChannels);
......
...@@ -70,8 +70,9 @@ OpenEditorsWidget::OpenEditorsWidget() ...@@ -70,8 +70,9 @@ OpenEditorsWidget::OpenEditorsWidget()
m_ui.editorList->setModel(em->openedEditorsModel()); m_ui.editorList->setModel(em->openedEditorsModel());
connect(em, SIGNAL(currentEditorChanged(Core::IEditor*)), connect(em, SIGNAL(currentEditorChanged(Core::IEditor*)),
this, SLOT(updateCurrentItem(Core::IEditor*))); this, SLOT(updateCurrentItem(Core::IEditor*)));
connect(m_ui.editorList, SIGNAL(activated(QModelIndex)), connect(m_ui.editorList, SIGNAL(itemClicked(QTreeWidgetItem*, int)),
this, SLOT(selectEditor(QModelIndex))); this, SLOT(selectEditor(QTreeWidgetItem*)));
updateEditorList();
} }
OpenEditorsWidget::~OpenEditorsWidget() OpenEditorsWidget::~OpenEditorsWidget()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment