forked from qt-creator/qt-creator
Add whitespace after control keywords
find -name \*.cpp -o -name \*.h | \ xargs sed -Ei 's/ (for|foreach|if|switch|while)\(/ \1 (/g' Change-Id: I9efdff4bf0c8c01a52baaaeb75198483c77b0390 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
3747e941ad
commit
a44aa55502
@@ -1358,7 +1358,7 @@ bool GitClient::cleanList(const QString &workingDirectory, const QString &flag,
|
||||
}
|
||||
// Filter files that git would remove
|
||||
const QString prefix = QLatin1String("Would remove ");
|
||||
foreach(const QString &line, commandOutputLinesFromLocal8Bit(outputText))
|
||||
foreach (const QString &line, commandOutputLinesFromLocal8Bit(outputText))
|
||||
if (line.startsWith(prefix))
|
||||
files->push_back(line.mid(prefix.size()));
|
||||
return true;
|
||||
@@ -1605,7 +1605,7 @@ QStringList GitClient::synchronousRepositoryBranches(const QString &repositoryUR
|
||||
QString headSha;
|
||||
if (resp.result == Utils::SynchronousProcessResponse::Finished) {
|
||||
// split "82bfad2f51d34e98b18982211c82220b8db049b<tab>refs/heads/master"
|
||||
foreach(const QString &line, resp.stdOut.split(QLatin1Char('\n'))) {
|
||||
foreach (const QString &line, resp.stdOut.split(QLatin1Char('\n'))) {
|
||||
if (line.endsWith(QLatin1String("\tHEAD"))) {
|
||||
QTC_CHECK(headSha.isNull());
|
||||
headSha = line.left(line.indexOf(QLatin1Char('\t')));
|
||||
@@ -2252,7 +2252,7 @@ bool GitClient::synchronousStashList(const QString &workingDirectory,
|
||||
return false;
|
||||
}
|
||||
Stash stash;
|
||||
foreach(const QString &line, commandOutputLinesFromLocal8Bit(outputText))
|
||||
foreach (const QString &line, commandOutputLinesFromLocal8Bit(outputText))
|
||||
if (stash.parseStashLine(line))
|
||||
stashes->push_back(stash);
|
||||
return true;
|
||||
|
||||
@@ -121,7 +121,7 @@ QDebug operator<<(QDebug d, const GitoriousProject &p)
|
||||
{
|
||||
QDebug nospace = d.nospace();
|
||||
nospace << " project=" << p.name << " description=" << p.description << '\n';
|
||||
foreach(const GitoriousRepository &r, p.repositories)
|
||||
foreach (const GitoriousRepository &r, p.repositories)
|
||||
nospace << " " << r << '\n';
|
||||
return d;
|
||||
}
|
||||
@@ -136,9 +136,9 @@ QDebug operator<<(QDebug d, const GitoriousHost &h)
|
||||
{
|
||||
QDebug nospace = d.nospace();
|
||||
nospace << " Host=" << h.hostName << " description=" << h.description << '\n';
|
||||
foreach(const QSharedPointer<GitoriousCategory> &c, h.categories)
|
||||
foreach (const QSharedPointer<GitoriousCategory> &c, h.categories)
|
||||
nospace << *c;
|
||||
foreach(const QSharedPointer<GitoriousProject> &p, h.projects)
|
||||
foreach (const QSharedPointer<GitoriousProject> &p, h.projects)
|
||||
nospace << *p;
|
||||
return d;
|
||||
}
|
||||
@@ -568,7 +568,7 @@ void Gitorious::saveSettings(const QString &group, QSettings *s)
|
||||
{
|
||||
const QChar separator = QLatin1Char('|');
|
||||
QStringList hosts;
|
||||
foreach(const GitoriousHost &h, m_hosts) {
|
||||
foreach (const GitoriousHost &h, m_hosts) {
|
||||
QString entry = h.hostName;
|
||||
if (!h.description.isEmpty()) {
|
||||
entry += separator;
|
||||
|
||||
@@ -105,7 +105,7 @@ GitoriousHostWidget::GitoriousHostWidget(QWidget *parent) :
|
||||
m_model->setHorizontalHeaderLabels(headers);
|
||||
|
||||
Gitorious &gitorious = Gitorious::instance();
|
||||
foreach( const GitoriousHost &gh, gitorious.hosts())
|
||||
foreach (const GitoriousHost &gh, gitorious.hosts())
|
||||
m_model->appendRow(hostEntry(gh));
|
||||
appendNewDummyEntry();
|
||||
connect(m_model, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(slotItemEdited(QStandardItem*)));
|
||||
|
||||
@@ -125,7 +125,7 @@ GitoriousProjectWidget *GitoriousProjectWizardPage::currentProjectWidget() const
|
||||
int GitoriousProjectWizardPage::stackIndexOf(const QString &hostName) const
|
||||
{
|
||||
const int count = m_stackedWidget->count();
|
||||
for(int i = 0; i < count; i++)
|
||||
for (int i = 0; i < count; i++)
|
||||
if (projectWidgetAt(i)->hostName() == hostName)
|
||||
return i;
|
||||
return -1;
|
||||
|
||||
@@ -163,7 +163,7 @@ void GitoriousRepositoryWizardPage::initializePage()
|
||||
qStableSort(repositories.begin(), repositories.end(), gitRepoLessThanByType);
|
||||
const QString types[GitoriousRepository::PersonalRepository + 1] =
|
||||
{ tr("Mainline Repositories"), tr("Clones"), tr("Baseline Repositories"), tr("Shared Project Repositories"), tr("Personal Repositories") };
|
||||
foreach(const GitoriousRepository &r, repositories) {
|
||||
foreach (const GitoriousRepository &r, repositories) {
|
||||
// New Header?
|
||||
if (r.type != lastRepoType || !header) {
|
||||
lastRepoType = r.type;
|
||||
|
||||
@@ -188,7 +188,7 @@ QStringList GitVersionControl::vcsSnapshots(const QString &topLevel)
|
||||
return QStringList();
|
||||
// Return the git stash 'message' as identifier, ignoring empty ones
|
||||
QStringList rc;
|
||||
foreach(const Stash &s, stashes)
|
||||
foreach (const Stash &s, stashes)
|
||||
if (!s.message.isEmpty())
|
||||
rc.push_back(s.message);
|
||||
return rc;
|
||||
|
||||
@@ -95,7 +95,7 @@ void StashModel::setStashes(const QList<Stash> &stashes)
|
||||
m_stashes = stashes;
|
||||
if (const int rows = rowCount())
|
||||
removeRows(0, rows);
|
||||
foreach(const Stash &s, stashes)
|
||||
foreach (const Stash &s, stashes)
|
||||
appendRow(stashModelRowItems(s));
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ void StashDialog::refresh(const QString &repository, bool force)
|
||||
gitClient()->synchronousStashList(m_repository, &stashes);
|
||||
m_model->setStashes(stashes);
|
||||
if (!stashes.isEmpty()) {
|
||||
for(int c = 0; c < ColumnCount; c++)
|
||||
for (int c = 0; c < ColumnCount; c++)
|
||||
ui->stashView->resizeColumnToContents(c);
|
||||
}
|
||||
}
|
||||
@@ -379,7 +379,7 @@ int StashDialog::currentRow() const
|
||||
QList<int> StashDialog::selectedRows() const
|
||||
{
|
||||
QList<int> rc;
|
||||
foreach(const QModelIndex &proxyIndex, ui->stashView->selectionModel()->selectedRows()) {
|
||||
foreach (const QModelIndex &proxyIndex, ui->stashView->selectionModel()->selectedRows()) {
|
||||
const QModelIndex index = m_proxyModel->mapToSource(proxyIndex);
|
||||
if (index.isValid())
|
||||
rc.push_back(index.row());
|
||||
|
||||
Reference in New Issue
Block a user