diff options
author | hjk <qthjk@ovi.com> | 2012-11-26 08:35:57 +0100 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-11-27 09:00:34 +0100 |
commit | 6cae330ec771b44165ac14a71707b68e408d57a8 (patch) | |
tree | daa76e19a6d2509bb10a042735644372151ce5b3 /src/plugins/qtsupport/exampleslistmodel.cpp | |
parent | f4a06ffd06970a19bb9ecc7eff0d915d9ead8c2b (diff) | |
download | qt-creator-6cae330ec771b44165ac14a71707b68e408d57a8.tar.gz |
QtSupport: style
Change-Id: Iabf3c96fc6d6b17282ec2ad43f32f76b04ac2ef0
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/qtsupport/exampleslistmodel.cpp')
-rw-r--r-- | src/plugins/qtsupport/exampleslistmodel.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp index b59733efee..e590a704eb 100644 --- a/src/plugins/qtsupport/exampleslistmodel.cpp +++ b/src/plugins/qtsupport/exampleslistmodel.cpp @@ -101,7 +101,7 @@ static inline QStringList trimStringList(const QStringList &stringlist) return returnList; } -QList<ExampleItem> ExamplesListModel::parseExamples(QXmlStreamReader* reader, const QString& projectsOffset) +QList<ExampleItem> ExamplesListModel::parseExamples(QXmlStreamReader *reader, const QString &projectsOffset) { QList<ExampleItem> examples; ExampleItem item; @@ -149,7 +149,7 @@ QList<ExampleItem> ExamplesListModel::parseExamples(QXmlStreamReader* reader, co return examples; } -QList<ExampleItem> ExamplesListModel::parseDemos(QXmlStreamReader* reader, const QString& projectsOffset) +QList<ExampleItem> ExamplesListModel::parseDemos(QXmlStreamReader *reader, const QString &projectsOffset) { QList<ExampleItem> demos; ExampleItem item; @@ -522,12 +522,11 @@ void ExamplesListModelFilter::updateFilter() } } -bool containsSubString(const QStringList& list, const QString& substr, Qt::CaseSensitivity cs) +bool containsSubString(const QStringList &list, const QString &substr, Qt::CaseSensitivity cs) { - foreach (const QString &elem, list) { + foreach (const QString &elem, list) if (elem.contains(substr, cs)) return true; - } return false; } @@ -549,10 +548,9 @@ bool ExamplesListModelFilter::filterAcceptsRow(int sourceRow, const QModelIndex const QStringList tags = sourceModel()->index(sourceRow, 0, sourceParent).data(Tags).toStringList(); if (!m_filterTags.isEmpty()) { - foreach(const QString &tag, m_filterTags) { + foreach(const QString &tag, m_filterTags) if (!tags.contains(tag, Qt::CaseInsensitive)) return false; - } return true; } @@ -617,7 +615,8 @@ void ExamplesListModelFilter::timerEvent(QTimerEvent *timerEvent) } } -struct SearchStringLexer { +struct SearchStringLexer +{ QString code; const QChar *codePtr; QChar yychar; |