Commit a3e10163 authored by tomdeblauwe's avatar tomdeblauwe Committed by Daniel Teske
Browse files

fix whitespace in cmakeproject



Change-Id: I62e1f14793fbf994273a838f19b8a4846dcec466
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 55714612
......@@ -378,14 +378,14 @@ void CMakeRunPage::initializePage()
"If you want to add additional command line arguments, "
"add them below. Note that CMake remembers command "
"line arguments from the previous runs.").arg(m_buildDirectory));
} else if(m_mode == CMakeRunPage::Recreate) {
} else if (m_mode == CMakeRunPage::Recreate) {
m_descriptionLabel->setText(tr("The directory %1 specified in a build-configuration, "
"does not contain a cbp file. Qt Creator needs to "
"recreate this file, by running CMake. "
"Some projects require command line arguments to "
"the initial CMake call. Note that CMake remembers command "
"line arguments from the previous runs.").arg(m_buildDirectory));
} else if(m_mode == CMakeRunPage::ChangeDirectory) {
} else if (m_mode == CMakeRunPage::ChangeDirectory) {
m_buildDirectory = m_cmakeWizard->buildDirectory();
m_descriptionLabel->setText(tr("Qt Creator needs to run CMake in the new build directory. "
"Some projects require command line arguments to the "
......
......@@ -150,7 +150,7 @@ void CMakeProject::changeActiveBuildConfiguration(ProjectExplorer::BuildConfigur
if (!cbpFileFi.exists()) {
mode = CMakeOpenProjectWizard::NeedToCreate;
} else {
foreach(const QString &file, m_watchedFiles) {
foreach (const QString &file, m_watchedFiles) {
if (QFileInfo(file).lastModified() > cbpFileFi.lastModified()) {
mode = CMakeOpenProjectWizard::NeedToUpdate;
break;
......@@ -237,7 +237,7 @@ bool CMakeProject::parseCMakeLists()
QSet<QString> projectFiles;
if (cbpparser.hasCMakeFiles()) {
fileList.append(cbpparser.cmakeFileList());
foreach(const ProjectExplorer::FileNode *node, cbpparser.cmakeFileList())
foreach (const ProjectExplorer::FileNode *node, cbpparser.cmakeFileList())
projectFiles.insert(node->path());
} else {
// Manually add the CMakeLists.txt file
......@@ -259,7 +259,7 @@ bool CMakeProject::parseCMakeLists()
//qDebug()<<"Adding Targets";
m_buildTargets = cbpparser.buildTargets();
// qDebug()<<"Printing targets";
// foreach(CMakeBuildTarget ct, m_buildTargets) {
// foreach (CMakeBuildTarget ct, m_buildTargets) {
// qDebug()<<ct.title<<" with executable:"<<ct.executable;
// qDebug()<<"WD:"<<ct.workingDirectory;
// qDebug()<<ct.makeCommand<<ct.makeCleanCommand;
......@@ -364,9 +364,9 @@ bool CMakeProject::hasBuildTarget(const QString &title) const
void CMakeProject::gatherFileNodes(ProjectExplorer::FolderNode *parent, QList<ProjectExplorer::FileNode *> &list)
{
foreach(ProjectExplorer::FolderNode *folder, parent->subFolderNodes())
foreach (ProjectExplorer::FolderNode *folder, parent->subFolderNodes())
gatherFileNodes(folder, list);
foreach(ProjectExplorer::FileNode *file, parent->fileNodes())
foreach (ProjectExplorer::FileNode *file, parent->fileNodes())
list.append(file);
}
......@@ -387,8 +387,7 @@ void CMakeProject::buildTree(CMakeProjectNode *rootNode, QList<ProjectExplorer::
QList<ProjectExplorer::FileNode *> added;
QList<ProjectExplorer::FileNode *> deleted;
while(oldIt != oldEnd && newIt != newEnd) {
while (oldIt != oldEnd && newIt != newEnd) {
if ( (*oldIt)->path() == (*newIt)->path()) {
delete *newIt;
++oldIt;
......@@ -604,7 +603,7 @@ bool CMakeProject::fromMap(const QVariantMap &map)
CMakeBuildTarget CMakeProject::buildTargetForTitle(const QString &title)
{
foreach(const CMakeBuildTarget &ct, m_buildTargets)
foreach (const CMakeBuildTarget &ct, m_buildTargets)
if (ct.title == title)
return ct;
return CMakeBuildTarget();
......@@ -1020,7 +1019,7 @@ void CMakeCbpParser::parseOption()
readNext();
if (isEndElement()) {
return;
} else if(isStartElement()) {
} else if (isStartElement()) {
parseUnknownElement();
}
}
......
......@@ -115,7 +115,7 @@ void CMakeTarget::updateRunConfigurations()
// *Update* runconfigurations:
QMultiMap<QString, CMakeRunConfiguration*> existingRunConfigurations;
QList<ProjectExplorer::RunConfiguration *> toRemove;
foreach(ProjectExplorer::RunConfiguration* rc, runConfigurations()) {
foreach (ProjectExplorer::RunConfiguration* rc, runConfigurations()) {
if (CMakeRunConfiguration* cmakeRC = qobject_cast<CMakeRunConfiguration *>(rc))
existingRunConfigurations.insert(cmakeRC->title(), cmakeRC);
ProjectExplorer::CustomExecutableRunConfiguration *ceRC =
......@@ -124,7 +124,7 @@ void CMakeTarget::updateRunConfigurations()
toRemove << rc;
}
foreach(const CMakeBuildTarget &ct, cmakeProject()->buildTargets()) {
foreach (const CMakeBuildTarget &ct, cmakeProject()->buildTargets()) {
if (ct.library)
continue;
if (ct.executable.isEmpty())
......
......@@ -203,7 +203,7 @@ void MakeStep::setBuildTarget(const QString &buildTarget, bool on)
QStringList old = m_buildTargets;
if (on && !old.contains(buildTarget))
old << buildTarget;
else if(!on && old.contains(buildTarget))
else if (!on && old.contains(buildTarget))
old.removeOne(buildTarget);
m_buildTargets = old;
}
......@@ -251,7 +251,7 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
// TODO update this list also on rescans of the CMakeLists.txt
// TODO shouldn't be accessing project
CMakeProject *pro = m_makeStep->cmakeBuildConfiguration()->cmakeTarget()->cmakeProject();
foreach(const QString& buildTarget, pro->buildTargetTitles()) {
foreach (const QString& buildTarget, pro->buildTargetTitles()) {
QListWidgetItem *item = new QListWidgetItem(buildTarget, m_buildTargetsList);
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
item->setCheckState(m_makeStep->buildsBuildTarget(item->text()) ? Qt::Checked : Qt::Unchecked);
......@@ -290,7 +290,7 @@ void MakeStepConfigWidget::buildTargetsChanged()
disconnect(m_buildTargetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*)));
m_buildTargetsList->clear();
CMakeProject *pro = m_makeStep->cmakeBuildConfiguration()->cmakeTarget()->cmakeProject();
foreach(const QString& buildTarget, pro->buildTargetTitles()) {
foreach (const QString& buildTarget, pro->buildTargetTitles()) {
QListWidgetItem *item = new QListWidgetItem(buildTarget, m_buildTargetsList);
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
item->setCheckState(m_makeStep->buildsBuildTarget(item->text()) ? Qt::Checked : Qt::Unchecked);
......
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