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
@@ -653,7 +653,7 @@ bool BaseFileWizard::postGenerateFiles(const QWizard *, const GeneratedFiles &l,
|
||||
|
||||
bool BaseFileWizard::postGenerateOpenEditors(const GeneratedFiles &l, QString *errorMessage)
|
||||
{
|
||||
foreach(const Core::GeneratedFile &file, l) {
|
||||
foreach (const Core::GeneratedFile &file, l) {
|
||||
if (file.attributes() & Core::GeneratedFile::OpenEditorAttribute) {
|
||||
if (!Core::EditorManager::openEditor(file.path(), file.editorId(), Core::EditorManager::ModeSwitch )) {
|
||||
if (errorMessage)
|
||||
|
||||
@@ -167,7 +167,7 @@ bool DesignMode::designModeIsRequired() const
|
||||
QStringList DesignMode::registeredMimeTypes() const
|
||||
{
|
||||
QStringList rc;
|
||||
foreach(const DesignEditorInfo *i, d->m_editors)
|
||||
foreach (const DesignEditorInfo *i, d->m_editors)
|
||||
rc += i->mimeTypes;
|
||||
return rc;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ void DesignMode::registerDesignWidget(QWidget *widget,
|
||||
void DesignMode::unregisterDesignWidget(QWidget *widget)
|
||||
{
|
||||
d->m_stackWidget->removeWidget(widget);
|
||||
foreach(DesignEditorInfo *info, d->m_editors) {
|
||||
foreach (DesignEditorInfo *info, d->m_editors) {
|
||||
if (info->widget == widget) {
|
||||
d->m_editors.removeAll(info);
|
||||
break;
|
||||
|
||||
@@ -311,7 +311,7 @@ Core::IWizard *NewDialog::showDialog()
|
||||
QModelIndex idx;
|
||||
|
||||
if (!lastCategory.isEmpty())
|
||||
foreach(QStandardItem* item, m_categoryItems) {
|
||||
foreach (QStandardItem* item, m_categoryItems) {
|
||||
if (item->data(Qt::UserRole) == lastCategory) {
|
||||
idx = m_twoLevelProxyModel->mapToSource(m_model->indexFromItem(item));
|
||||
}
|
||||
|
||||
@@ -833,7 +833,7 @@ bool EditorManager::closeEditors(const QList<IEditor*> &editorsToClose, bool ask
|
||||
|
||||
// add duplicates
|
||||
QList<IEditor *> duplicates;
|
||||
foreach(IEditor *editor, acceptedEditors)
|
||||
foreach (IEditor *editor, acceptedEditors)
|
||||
duplicates += d->m_editorModel->duplicatesFor(editor);
|
||||
acceptedEditors += duplicates;
|
||||
|
||||
@@ -915,7 +915,7 @@ void EditorManager::closeDuplicate(Core::IEditor *editor)
|
||||
|
||||
emit editorAboutToClose(editor);
|
||||
|
||||
if(d->m_splitter->findView(editor)) {
|
||||
if (d->m_splitter->findView(editor)) {
|
||||
EditorView *view = d->m_splitter->findView(editor)->view();
|
||||
removeEditor(editor);
|
||||
view->removeEditor(editor);
|
||||
@@ -1107,7 +1107,7 @@ template <class EditorFactoryLike>
|
||||
EditorFactoryLike *findById(const Core::Id &id)
|
||||
{
|
||||
const QList<EditorFactoryLike *> factories = ExtensionSystem::PluginManager::getObjects<EditorFactoryLike>();
|
||||
foreach(EditorFactoryLike *efl, factories)
|
||||
foreach (EditorFactoryLike *efl, factories)
|
||||
if (id == efl->id())
|
||||
return efl;
|
||||
return 0;
|
||||
|
||||
@@ -305,7 +305,7 @@ void EditorView::updateEditorHistory(IEditor *editor)
|
||||
location.id = editor->id();
|
||||
location.state = QVariant(state);
|
||||
|
||||
for(int i = 0; i < m_editorHistory.size(); ++i) {
|
||||
for (int i = 0; i < m_editorHistory.size(); ++i) {
|
||||
if (m_editorHistory.at(i).document == 0
|
||||
|| m_editorHistory.at(i).document == document
|
||||
){
|
||||
@@ -668,7 +668,7 @@ void SplitterOrView::split(Qt::Orientation orientation)
|
||||
SplitterOrView *otherView = 0;
|
||||
if (e) {
|
||||
|
||||
foreach(IEditor *editor, m_view->editors())
|
||||
foreach (IEditor *editor, m_view->editors())
|
||||
m_view->removeEditor(editor);
|
||||
|
||||
m_splitter->addWidget((view = new SplitterOrView(e)));
|
||||
|
||||
@@ -250,7 +250,7 @@ bool OpenEditorsModel::isDuplicate(IEditor *editor) const
|
||||
IEditor *OpenEditorsModel::originalForDuplicate(IEditor *duplicate) const
|
||||
{
|
||||
IDocument *document = duplicate->document();
|
||||
foreach(const Entry &e, d->m_editors)
|
||||
foreach (const Entry &e, d->m_editors)
|
||||
if (e.editor && e.editor->document() == document)
|
||||
return e.editor;
|
||||
return 0;
|
||||
@@ -260,7 +260,7 @@ QList<IEditor *> OpenEditorsModel::duplicatesFor(IEditor *editor) const
|
||||
{
|
||||
QList<IEditor *> result;
|
||||
IDocument *document = editor->document();
|
||||
foreach(IEditor *e, d->m_duplicateEditors)
|
||||
foreach (IEditor *e, d->m_duplicateEditors)
|
||||
if (e->document() == document)
|
||||
result += e;
|
||||
return result;
|
||||
|
||||
@@ -70,7 +70,7 @@ void FancyToolButton::forceVisible(bool visible)
|
||||
|
||||
bool FancyToolButton::event(QEvent *e)
|
||||
{
|
||||
switch(e->type()) {
|
||||
switch (e->type()) {
|
||||
case QEvent::Enter:
|
||||
{
|
||||
QPropertyAnimation *animation = new QPropertyAnimation(this, "fader");
|
||||
|
||||
@@ -113,7 +113,7 @@ void OutputPanePlaceHolder::maximizeOrMinimize(bool maximize)
|
||||
if (maximize) {
|
||||
d->m_lastNonMaxSize = sizes[idx];
|
||||
int sum = 0;
|
||||
foreach(int s, sizes)
|
||||
foreach (int s, sizes)
|
||||
sum += s;
|
||||
for (int i = 0; i < sizes.count(); ++i) {
|
||||
sizes[i] = 32;
|
||||
|
||||
@@ -57,7 +57,7 @@ ProgressBar::~ProgressBar()
|
||||
|
||||
bool ProgressBar::event(QEvent *e)
|
||||
{
|
||||
switch(e->type()) {
|
||||
switch (e->type()) {
|
||||
case QEvent::Enter:
|
||||
{
|
||||
QPropertyAnimation *animation = new QPropertyAnimation(this, "cancelButtonFader");
|
||||
|
||||
@@ -118,7 +118,7 @@ SideBar::~SideBar()
|
||||
QString SideBar::idForTitle(const QString &title) const
|
||||
{
|
||||
QMapIterator<QString, QPointer<SideBarItem> > iter(d->m_itemMap);
|
||||
while(iter.hasNext()) {
|
||||
while (iter.hasNext()) {
|
||||
iter.next();
|
||||
if (iter.value().data()->title() == title)
|
||||
return iter.key();
|
||||
@@ -173,7 +173,7 @@ void SideBar::makeItemAvailable(SideBarItem *item)
|
||||
void SideBar::setUnavailableItemIds(const QStringList &itemIds)
|
||||
{
|
||||
// re-enable previous items
|
||||
foreach(const QString &id, d->m_unavailableItemIds) {
|
||||
foreach (const QString &id, d->m_unavailableItemIds) {
|
||||
d->m_availableItemIds.append(id);
|
||||
d->m_availableItemTitles.append(d->m_itemMap.value(id).data()->title());
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ SideBarWidget::SideBarWidget(SideBar *sideBar, const QString &id)
|
||||
qSort(titleList);
|
||||
QString t = id;
|
||||
if (titleList.count()) {
|
||||
foreach(const QString &itemTitle, titleList)
|
||||
foreach (const QString &itemTitle, titleList)
|
||||
m_comboBox->addItem(itemTitle, m_sideBar->idForTitle(itemTitle));
|
||||
|
||||
m_comboBox->setCurrentIndex(0);
|
||||
@@ -160,7 +160,7 @@ void SideBarWidget::updateAvailableItems()
|
||||
titleList.append(currentTitle);
|
||||
qSort(titleList);
|
||||
|
||||
foreach(const QString &itemTitle, titleList)
|
||||
foreach (const QString &itemTitle, titleList)
|
||||
m_comboBox->addItem(itemTitle, m_sideBar->idForTitle(itemTitle));
|
||||
|
||||
int idx = m_comboBox->findText(currentTitle);
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
VcsInfo *newInfo = new VcsInfo(vc, topLevel);
|
||||
bool createdNewInfo(true);
|
||||
// Do we have a matching VcsInfo already?
|
||||
foreach(VcsInfo *i, m_vcsInfoList) {
|
||||
foreach (VcsInfo *i, m_vcsInfoList) {
|
||||
if (*i == *newInfo) {
|
||||
delete newInfo;
|
||||
newInfo = i;
|
||||
|
||||
Reference in New Issue
Block a user