diff options
author | hjk <qtc-committer@nokia.com> | 2011-09-19 10:02:45 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2011-09-19 11:24:14 +0200 |
commit | 5295e05310ec7eb1e0f1fb1b0aaaf0a51ca3ea91 (patch) | |
tree | 920d22ba107c5740a57290fbdc02ec760adef16f /src/plugins/classview | |
parent | 85bf185e2f4a13a3f5a6d39ce1ab985711978445 (diff) | |
download | qt-creator-5295e05310ec7eb1e0f1fb1b0aaaf0a51ca3ea91.tar.gz |
minor style
Change-Id: Id21e8a3962550a1c66d761e718b48a8fcf4053e7
Reviewed-on: http://codereview.qt-project.org/5122
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/classview')
-rw-r--r-- | src/plugins/classview/classviewparser.cpp | 11 | ||||
-rw-r--r-- | src/plugins/classview/classviewparsertreeitem.cpp | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/plugins/classview/classviewparser.cpp b/src/plugins/classview/classviewparser.cpp index 8aa1978c5f..ff4ad3e3a3 100644 --- a/src/plugins/classview/classviewparser.cpp +++ b/src/plugins/classview/classviewparser.cpp @@ -462,10 +462,9 @@ ParserTreeItem::ConstPtr Parser::getCachedOrParseDocumentTree(const CPlusPlus::D && d->cachedDocTreesRevision[fileName] == doc->revision()) { d->docLocker.unlock(); return d->cachedDocTrees[fileName]; - } else { - d->docLocker.unlock(); - return getParseDocumentTree(doc); } + d->docLocker.unlock(); + return getParseDocumentTree(doc); } void Parser::parseDocument(const CPlusPlus::Document::Ptr &doc) @@ -527,7 +526,7 @@ void Parser::removeFiles(const QStringList &fileList) QWriteLocker lockerPrj(&d->prjLocker); QWriteLocker lockerDoc(&d->docLocker); - foreach(const QString &name, fileList) { + foreach (const QString &name, fileList) { d->fileList.remove(name); d->cachedDocTrees.remove(name); d->cachedDocTreesRevision.remove(name); @@ -549,7 +548,7 @@ void Parser::resetData(const CPlusPlus::Snapshot &snapshot) // copy snapshot's documents CPlusPlus::Snapshot::const_iterator cur = snapshot.begin(); CPlusPlus::Snapshot::const_iterator end = snapshot.end(); - for(; cur != end; cur++) + for (; cur != end; cur++) d->documentList[cur.key()] = cur.value(); d->docLocker.unlock(); @@ -559,7 +558,7 @@ void Parser::resetData(const CPlusPlus::Snapshot &snapshot) // check all projects QList<ProjectExplorer::Project *> projects = getProjectList(); - foreach(const ProjectExplorer::Project *prj, projects) { + foreach (const ProjectExplorer::Project *prj, projects) { if (prj) fileList += prj->files(ProjectExplorer::Project::ExcludeGeneratedFiles); } diff --git a/src/plugins/classview/classviewparsertreeitem.cpp b/src/plugins/classview/classviewparsertreeitem.cpp index c8474ecf28..19ded18f57 100644 --- a/src/plugins/classview/classviewparsertreeitem.cpp +++ b/src/plugins/classview/classviewparsertreeitem.cpp @@ -119,7 +119,7 @@ void ParserTreeItem::copyTree(const ParserTreeItem::ConstPtr &target) QHash<SymbolInformation, ParserTreeItem::Ptr>::const_iterator end = target->d->symbolInformations.constEnd(); - for(; cur != end; cur++) { + for (; cur != end; cur++) { ParserTreeItem::Ptr item(new ParserTreeItem()); item->copyTree(cur.value()); appendChild(item, cur.key()); |