Commit a44aa555 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

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: default avatarhjk <qthjk@ovi.com>
parent 3747e941
......@@ -473,7 +473,7 @@ int main(int argc, char **argv)
if (app.isRunning(pid)) {
// Nah app is still running, ask the user
int button = askMsgSendFailed();
while(button == QMessageBox::Retry) {
while (button == QMessageBox::Retry) {
if (app.sendMessage(PluginManager::serializedArguments(), 5000 /*timeout*/, pid))
return 0;
if (!app.isRunning(pid)) // App quit while we were trying so start a new creator
......
......@@ -1216,7 +1216,7 @@ bool Parser::parseCvQualifiers(SpecifierListAST *&node)
spec->specifier_token = consumeToken();
*ast = new (_pool) SpecifierListAST(spec);
ast = &(*ast)->next;
} else if(LA() == T___ATTRIBUTE__) {
} else if (LA() == T___ATTRIBUTE__) {
parseAttributeSpecifier(*ast);
ast = &(*ast)->next;
} else {
......
......@@ -137,7 +137,7 @@ Icons::IconType Icons::iconTypeForSymbol(const Symbol *symbol)
QIcon Icons::iconForType(IconType type) const
{
switch(type) {
switch (type) {
case ClassIconType:
return _classIcon;
case EnumIconType:
......
......@@ -106,7 +106,7 @@ bool OptionsParser::checkForTestOption()
return false;
if (nextToken(RequiredToken)) {
if (m_currentArg == QLatin1String("all")) {
foreach(PluginSpec *spec, m_pmPrivate->pluginSpecs) {
foreach (PluginSpec *spec, m_pmPrivate->pluginSpecs) {
if (spec && !m_pmPrivate->testSpecs.contains(spec))
m_pmPrivate->testSpecs.append(spec);
}
......@@ -117,7 +117,7 @@ bool OptionsParser::checkForTestOption()
*m_errorString = QCoreApplication::translate("PluginManager",
"The plugin '%1' does not exist.").arg(m_currentArg);
m_hasError = true;
} else if(!m_pmPrivate->testSpecs.contains(spec)) {
} else if (!m_pmPrivate->testSpecs.contains(spec)) {
m_pmPrivate->testSpecs.append(spec);
}
}
......
......@@ -840,7 +840,7 @@ void PluginManagerPrivate::writeSettings()
return;
QStringList tempDisabledPlugins;
QStringList tempForceEnabledPlugins;
foreach(PluginSpec *spec, pluginSpecs) {
foreach (PluginSpec *spec, pluginSpecs) {
if (!spec->isDisabledByDefault() && !spec->isEnabled())
tempDisabledPlugins.append(spec->name());
if (spec->isDisabledByDefault() && spec->isEnabled())
......
......@@ -423,7 +423,7 @@ static inline bool parseSciFile(const QString &fileName, QString &pixmapFileName
data.open(QIODevice::ReadOnly);
QByteArray raw;
while(raw = data.readLine(), !raw.isEmpty()) {
while (raw = data.readLine(), !raw.isEmpty()) {
QString line = QString::fromUtf8(raw.trimmed());
if (line.isEmpty() || line.startsWith(QLatin1Char('#')))
continue;
......
......@@ -211,7 +211,7 @@ QString QmlError::toString() const
rv = QLatin1String("<Unknown File>");
} else if (line() != -1) {
rv = url().toString() + QLatin1Char(':') + QString::number(line());
if(column() != -1)
if (column() != -1)
rv += QLatin1Char(':') + QString::number(column());
} else {
rv = url().toString();
......@@ -251,7 +251,7 @@ QDebug operator<<(QDebug debug, const QmlError &error)
const QString &line = lines.at(error.line() - 1);
debug << "\n " << qPrintable(line);
if(error.column() > 0) {
if (error.column() > 0) {
int column = qMax(0, error.column() - 1);
column = qMin(column, line.length());
......
......@@ -99,11 +99,11 @@ static QString label(UiObjectMember *member, Document::Ptr doc)
if (UiObjectDefinition* foo = cast<UiObjectDefinition *>(member)) {
str = label(foo->qualifiedTypeNameId);
} else if(UiObjectBinding *foo = cast<UiObjectBinding *>(member)) {
} else if (UiObjectBinding *foo = cast<UiObjectBinding *>(member)) {
str = label(foo->qualifiedId) + QLatin1Char(' ') + label(foo->qualifiedTypeNameId);
} else if(UiArrayBinding *foo = cast<UiArrayBinding *>(member)) {
} else if (UiArrayBinding *foo = cast<UiArrayBinding *>(member)) {
str = label(foo->qualifiedId) + QLatin1String("[]");
} else if(UiScriptBinding *foo = cast<UiScriptBinding *>(member)) {
} else if (UiScriptBinding *foo = cast<UiScriptBinding *>(member)) {
str = label(foo->qualifiedId) + QLatin1Char(':');
if (foo->statement) {
quint32 start = foo->statement->firstSourceLocation().begin();
......@@ -172,7 +172,7 @@ static QList<UiObjectMember *> children(UiObjectMember *ast)
ret.append(list->member);
list = list->next;
}
} else if(UiArrayBinding *foo = cast<UiArrayBinding *>(ast)) {
} else if (UiArrayBinding *foo = cast<UiArrayBinding *>(ast)) {
UiArrayMemberList* list = foo->members;
while (list) {
ret.append(list->member);
......@@ -189,7 +189,7 @@ static Map buildMapping_helper(UiObjectMember *x, UiObjectMember *y, const Map &
return M2;
if (M.way2.contains(y))
return M2;
if(label(x, doc1) != label(y, doc2))
if (label(x, doc1) != label(y, doc2))
return M2;
M2.insert(x, y);
QList<UiObjectMember *> list1 = children(x);
......@@ -222,7 +222,7 @@ static Map buildMapping(Document::Ptr doc1, Document::Ptr doc2)
Map M;
QList<UiObjectMember *> todo;
todo.append(doc1->qmlProgram()->members->member);
while(!todo.isEmpty()) {
while (!todo.isEmpty()) {
UiObjectMember *x = todo.takeFirst();
todo += children(x);
......@@ -380,7 +380,7 @@ void Delta::insert(UiObjectMember *member, UiObjectMember *parentMember, const Q
// Also, a relative URL is expected (no "file://" prepending!)
QString filename = doc->fileName() + QLatin1Char('_') + QString::number(doc->editorRevision())
+ QLatin1Char(':') + QString::number(startLine-importList.count());
foreach(DebugId debugId, debugReferences) {
foreach (DebugId debugId, debugReferences) {
if (debugId != -1) {
int order = 0;
// skip children which are not objects
......@@ -492,7 +492,7 @@ Delta::DebugIdMap Delta::operator()(const Document::Ptr &doc1, const Document::P
QList<UiObjectMember *> todo;
todo.append(doc2->qmlProgram()->members->member);
//UiObjectMemberList *list = 0;
while(!todo.isEmpty()) {
while (!todo.isEmpty()) {
UiObjectMember *y = todo.takeFirst();
todo += children(y);
......@@ -539,7 +539,7 @@ Delta::DebugIdMap Delta::operator()(const Document::Ptr &doc1, const Document::P
}
todo.append(doc1->qmlProgram()->members->member);
while(!todo.isEmpty()) {
while (!todo.isEmpty()) {
UiObjectMember *x = todo.takeFirst();
todo += children(x);
if (!cast<UiObjectDefinition *>(x))
......
......@@ -47,7 +47,7 @@ public:
void updateSorting() {
QDir::SortFlags flags = 0;
switch(sortField) {
switch (sortField) {
case QDeclarativeFolderListModel::Unsorted:
flags |= QDir::Unsorted;
break;
......
......@@ -56,11 +56,11 @@ QWheelArea::QWheelArea(QDeclarativeItem *parent)
QWheelArea::~QWheelArea() {}
bool QWheelArea::event (QEvent * e) {
switch(e->type()) {
switch (e->type()) {
case QEvent::GraphicsSceneWheel: {
QGraphicsSceneWheelEvent *we = static_cast<QGraphicsSceneWheelEvent*>(e);
if(we) {
switch(we->orientation()) {
if (we) {
switch (we->orientation()) {
case Qt::Horizontal:
setHorizontalDelta(we->delta());
break;
......@@ -72,8 +72,8 @@ bool QWheelArea::event (QEvent * e) {
}
case QEvent::Wheel: {
QWheelEvent *we = static_cast<QWheelEvent*>(e);
if(we) {
switch(we->orientation()) {
if (we) {
switch (we->orientation()) {
case Qt::Horizontal:
setHorizontalDelta(we->delta());
......
......@@ -41,7 +41,7 @@ namespace {
QByteArray listAsByteArray(const QList<QByteArray> &list)
{
QByteArray array;
foreach(const QByteArray &elem, list)
foreach (const QByteArray &elem, list)
array += elem + ',';
if (!array.isEmpty())
array.remove(array.count() - 1, 1);
......
......@@ -299,7 +299,7 @@ bool BuildableHelperLibrary::getHelperFileInfoFor(const QStringList &validBinary
if (!info)
return false;
foreach(const QString &binaryFilename, validBinaryFilenames) {
foreach (const QString &binaryFilename, validBinaryFilenames) {
info->setFile(directory + binaryFilename);
if (info->exists())
return true;
......@@ -335,7 +335,7 @@ QString BuildableHelperLibrary::byInstallDataHelper(const QString &sourcePath,
QString newestHelper;
QDateTime newestHelperModified = sourcesModified; // prevent using one that's older than the sources
QFileInfo fileInfo;
foreach(const QString &installDirectory, installDirectories) {
foreach (const QString &installDirectory, installDirectories) {
if (getHelperFileInfoFor(validBinaryFilenames, installDirectory, &fileInfo)) {
if (!newestHelperModified.isValid()
|| (fileInfo.lastModified() > newestHelperModified)) {
......
......@@ -90,7 +90,7 @@ QSize DetailsButton::sizeHint() const
bool DetailsButton::event(QEvent *e)
{
switch(e->type()) {
switch (e->type()) {
case QEvent::Enter:
{
QPropertyAnimation *animation = new QPropertyAnimation(this, "fader");
......@@ -164,7 +164,7 @@ QPixmap DetailsButton::cacheRendering(const QSize &size, bool checked)
p.drawRoundedRect(1, 1, size.width()-3, size.height()-3, 1, 1);
p.setPen(QPen(QColor(0, 0, 0, 40)));
p.drawLine(0, 1, 0, size.height() - 2);
if(checked)
if (checked)
p.drawLine(1, size.height() - 1, size.width() - 1, size.height() - 1);
p.setPen(palette().color(QPalette::Text));
......
......@@ -427,7 +427,7 @@ bool SubDirFileIterator::hasNext() const
{
if (!m_currentFiles.isEmpty())
return true;
while(!m_dirs.isEmpty() && m_currentFiles.isEmpty()) {
while (!m_dirs.isEmpty() && m_currentFiles.isEmpty()) {
QDir dir = m_dirs.pop();
const qreal dirProgressMax = m_progressValues.pop();
const bool processed = m_processedValues.pop();
......
......@@ -332,7 +332,7 @@ QString SubmitEditorWidget::descriptionText() const
QString rc = trimMessageText(lineWrap() ? wrappedText(d->m_ui.description) :
d->m_ui.description->toPlainText());
// append field entries
foreach(const SubmitFieldWidget *fw, d->m_fieldWidgets)
foreach (const SubmitFieldWidget *fw, d->m_fieldWidgets)
rc += fw->fieldValues();
return cleanupDescription(rc);
}
......
......@@ -227,7 +227,7 @@ void SubmitFieldWidget::setHasBrowseButton(bool on)
if (d->hasBrowseButton == on)
return;
d->hasBrowseButton = on;
foreach(const FieldEntry &fe, d->fieldEntries)
foreach (const FieldEntry &fe, d->fieldEntries)
fe.browseButton->setVisible(on);
}
......@@ -251,7 +251,7 @@ void SubmitFieldWidget::setCompleter(QCompleter *c)
if (c == d->completer)
return;
d->completer = c;
foreach(const FieldEntry &fe, d->fieldEntries)
foreach (const FieldEntry &fe, d->fieldEntries)
fe.lineEdit->setCompleter(c);
}
......@@ -271,7 +271,7 @@ QString SubmitFieldWidget::fieldValues() const
const QChar newLine = QLatin1Char('\n');
// Format as "RevBy: value\nSigned-Off: value\n"
QString rc;
foreach(const FieldEntry &fe, d->fieldEntries) {
foreach (const FieldEntry &fe, d->fieldEntries) {
const QString value = fe.lineEdit->text().trimmed();
if (!value.isEmpty()) {
rc += fe.combo->currentText();
......
......@@ -258,7 +258,7 @@ void Utils::unCommentSelection(QPlainTextEdit *edit, const CommentDefinition &de
}
} else {
QString text = block.text();
foreach(QChar c, text) {
foreach (QChar c, text) {
if (!c.isSpace()) {
if (definition.isAfterWhiteSpaces())
cursor.setPosition(block.position() + text.indexOf(c));
......
......@@ -124,7 +124,7 @@ void BazaarClient::view(const QString &source, const QString &id, const QStringL
QString BazaarClient::vcsEditorKind(VcsCommand cmd) const
{
switch(cmd) {
switch (cmd) {
case AnnotateCommand:
return QLatin1String(Constants::ANNOTATELOG);
case DiffCommand:
......
......@@ -188,7 +188,7 @@ ParserTreeItem::ConstPtr Parser::findItemByRoot(const QStandardItem *item, bool
// go item by item to the root
QList<const QStandardItem *> uiList;
const QStandardItem *cur = item;
while(cur) {
while (cur) {
uiList.append(cur);
cur = cur->parent();
}
......@@ -201,7 +201,7 @@ ParserTreeItem::ConstPtr Parser::findItemByRoot(const QStandardItem *item, bool
// using internal root - search correct item
ParserTreeItem::ConstPtr internal = d->rootItem;
while(uiList.count() > 0) {
while (uiList.count() > 0) {
cur = uiList.last();
uiList.removeLast();
const SymbolInformation &inf = Utils::symbolInformationFromItem(cur);
......@@ -223,7 +223,7 @@ ParserTreeItem::ConstPtr Parser::parse()
// check all projects
QList<ProjectExplorer::Project *> projects = getProjectList();
foreach(const ProjectExplorer::Project *prj, projects) {
foreach (const ProjectExplorer::Project *prj, projects) {
if (!prj)
continue;
......@@ -355,7 +355,7 @@ ParserTreeItem::Ptr Parser::createFlatTree(const QStringList &projectList)
QReadLocker locker(&d->prjLocker);
ParserTreeItem::Ptr item(new ParserTreeItem());
foreach(const QString &project, projectList) {
foreach (const QString &project, projectList) {
if (!d->cachedPrjTrees.contains(project))
continue;
ParserTreeItem::ConstPtr list = d->cachedPrjTrees[project];
......@@ -371,7 +371,7 @@ ParserTreeItem::Ptr Parser::getParseProjectTree(const QStringList &fileList,
//! changed files only (old edition), and add curent editions
ParserTreeItem::Ptr item(new ParserTreeItem());
unsigned revision = 0;
foreach(const QString &file, fileList) {
foreach (const QString &file, fileList) {
// ? locker for document?..
const CPlusPlus::Document::Ptr &doc = d->document(file);
if (doc.isNull())
......@@ -406,7 +406,7 @@ ParserTreeItem::Ptr Parser::getCachedOrParseProjectTree(const QStringList &fileL
if (!projectId.isEmpty() && d->cachedPrjTrees.contains(projectId)) {
// calculate project's revision
unsigned revision = 0;
foreach(const QString &file, fileList) {
foreach (const QString &file, fileList) {
const CPlusPlus::Document::Ptr &doc = d->document(file);
if (doc.isNull())
continue;
......@@ -610,14 +610,14 @@ QStringList Parser::projectNodeFileList(const ProjectExplorer::FolderNode *node)
QList<ProjectExplorer::FileNode *> fileNodes = node->fileNodes();
QList<ProjectExplorer::FolderNode *> subFolderNodes = node->subFolderNodes();
foreach(const ProjectExplorer::FileNode *file, fileNodes) {
foreach (const ProjectExplorer::FileNode *file, fileNodes) {
if (file->isGenerated())
continue;
list << file->path();
}
foreach(const ProjectExplorer::FolderNode *folder, subFolderNodes) {
foreach (const ProjectExplorer::FolderNode *folder, subFolderNodes) {
if (folder->nodeType() != ProjectExplorer::FolderNodeType
&& folder->nodeType() != ProjectExplorer::VirtualFolderNodeType)
continue;
......@@ -654,7 +654,7 @@ QStringList Parser::addProjectNode(const ParserTreeItem::Ptr &item,
// subnodes
QList<ProjectExplorer::ProjectNode *> projectNodes = node->subProjectNodes();
foreach(const ProjectExplorer::ProjectNode *project, projectNodes) {
foreach (const ProjectExplorer::ProjectNode *project, projectNodes) {
ParserTreeItem::Ptr itemPrj(new ParserTreeItem());
SymbolInformation information(project->displayName(), project->path());
......
......@@ -198,7 +198,7 @@ void ParserTreeItem::add(const ParserTreeItem::ConstPtr &target)
target->d->symbolInformations.constBegin();
QHash<SymbolInformation, ParserTreeItem::Ptr>::const_iterator end =
target->d->symbolInformations.constEnd();
while(cur != end) {
while (cur != end) {
const SymbolInformation &inf = cur.key();
const ParserTreeItem::Ptr &targetChild = cur.value();
if (d->symbolInformations.contains(inf)) {
......@@ -231,7 +231,7 @@ void ParserTreeItem::subtract(const ParserTreeItem::ConstPtr &target)
target->d->symbolInformations.constBegin();
QHash<SymbolInformation, ParserTreeItem::Ptr>::const_iterator end =
target->d->symbolInformations.constEnd();
while(cur != end) {
while (cur != end) {
const SymbolInformation &inf = cur.key();
if (d->symbolInformations.contains(inf)) {
// this item has the same child node
......@@ -258,7 +258,7 @@ void ParserTreeItem::convertTo(QStandardItem *item, bool recursive) const
d->symbolInformations.constBegin();
QHash<SymbolInformation, ParserTreeItem::Ptr>::const_iterator endHash =
d->symbolInformations.constEnd();
while(curHash != endHash) {
while (curHash != endHash) {
map.insert(curHash.key(), curHash.value());
++curHash;
}
......@@ -266,7 +266,7 @@ void ParserTreeItem::convertTo(QStandardItem *item, bool recursive) const
// add to item
QMap<SymbolInformation, ParserTreeItem::Ptr>::const_iterator cur = map.constBegin();
QMap<SymbolInformation, ParserTreeItem::Ptr>::const_iterator end = map.constEnd();
while(cur != end) {
while (cur != end) {
const SymbolInformation &inf = cur.key();
ParserTreeItem::Ptr ptr = cur.value();
......@@ -310,7 +310,7 @@ bool ParserTreeItem::canFetchMore(QStandardItem *item) const
d->symbolInformations.constBegin();
QHash<SymbolInformation, ParserTreeItem::Ptr>::const_iterator endHash =
d->symbolInformations.constEnd();
while(curHash != endHash) {
while (curHash != endHash) {
const ParserTreeItem::Ptr &child = curHash.value();
if (!child.isNull()) {
internalChildren += child->childCount();
......@@ -321,7 +321,7 @@ bool ParserTreeItem::canFetchMore(QStandardItem *item) const
++curHash;
}
if(storedChildren < internalChildren)
if (storedChildren < internalChildren)
return true;
return false;
......@@ -359,7 +359,7 @@ void ParserTreeItem::debugDump(int ident) const
d->symbolInformations.constBegin();
QHash<SymbolInformation, ParserTreeItem::Ptr>::const_iterator endHash =
d->symbolInformations.constEnd();
while(curHash != endHash) {
while (curHash != endHash) {
const SymbolInformation &inf = curHash.key();
qDebug() << QString(2*ident, QLatin1Char(' ')) << inf.iconType() << inf.name() << inf.type()
<< curHash.value().isNull();
......
......@@ -72,7 +72,7 @@ Utils::Utils()
QList<QVariant> Utils::locationsToRole(const QSet<SymbolLocation> &locations)
{
QList<QVariant> locationsVar;
foreach(const SymbolLocation &loc, locations)
foreach (const SymbolLocation &loc, locations)
locationsVar.append(QVariant::fromValue(loc));
return locationsVar;
......@@ -81,7 +81,7 @@ QList<QVariant> Utils::locationsToRole(const QSet<SymbolLocation> &locations)
QSet<SymbolLocation> Utils::roleToLocations(const QList<QVariant> &locationsVar)
{
QSet<SymbolLocation> locations;
foreach(const QVariant &loc, locationsVar) {
foreach (const QVariant &loc, locationsVar) {
if (loc.canConvert<SymbolLocation>()) {
locations.insert(loc.value<SymbolLocation>());
}
......
......@@ -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");
......