diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 20:09:57 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 20:09:57 -0800 |
commit | 76e6420f6b3503b76bd3eec00ab0e53d6ea17a20 (patch) | |
tree | 8b50298f41bd29d55bbd6f4301f36ad31dc0b008 /qt-ui/completionmodels.cpp | |
parent | 006265d7a088cff4fea665159dbb454956c2cd76 (diff) | |
download | subsurface-76e6420f6b3503b76bd3eec00ab0e53d6ea17a20.tar.gz |
Massive automated whitespace cleanup
I know everyone will hate it.
Go ahead. Complain. Call me names.
At least now things are consistent and reproducible.
If you want changes, have your complaint come with a patch to
scripts/whitespace.pl so that we can automate it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/completionmodels.cpp')
-rw-r--r-- | qt-ui/completionmodels.cpp | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/qt-ui/completionmodels.cpp b/qt-ui/completionmodels.cpp index b0a5db2d3..30e69d26a 100644 --- a/qt-ui/completionmodels.cpp +++ b/qt-ui/completionmodels.cpp @@ -2,35 +2,38 @@ #include "dive.h" #include "mainwindow.h" -#define CREATE_UPDATE_METHOD(Class, diveStructMember) \ -void Class::updateModel() \ -{ \ - QStringList list; \ - struct dive* dive; \ - int i = 0; \ - for_each_dive(i, dive) { \ - QString buddy(dive->diveStructMember); \ - if (!list.contains(buddy)) { \ - list.append(buddy); \ - } \ - } \ - setStringList(list); \ -} +#define CREATE_UPDATE_METHOD(Class, diveStructMember) \ + void Class::updateModel() \ + { \ + QStringList list; \ + struct dive *dive; \ + int i = 0; \ + for_each_dive(i, dive) \ + { \ + QString buddy(dive->diveStructMember); \ + if (!list.contains(buddy)) { \ + list.append(buddy); \ + } \ + } \ + setStringList(list); \ + } -#define CREATE_CSV_UPDATE_METHOD(Class, diveStructMember) \ -void Class::updateModel() \ -{ \ - QSet<QString> set; \ - struct dive* dive; \ - int i = 0; \ - for_each_dive(i, dive) { \ - QString buddy(dive->diveStructMember); \ - foreach (const QString &value, buddy.split(",", QString::SkipEmptyParts)) { \ - set.insert(value.trimmed()); \ - } \ - } \ - setStringList(set.toList()); \ -} +#define CREATE_CSV_UPDATE_METHOD(Class, diveStructMember) \ + void Class::updateModel() \ + { \ + QSet<QString> set; \ + struct dive *dive; \ + int i = 0; \ + for_each_dive(i, dive) \ + { \ + QString buddy(dive->diveStructMember); \ + foreach(const QString &value, buddy.split(",", QString::SkipEmptyParts)) \ + { \ + set.insert(value.trimmed()); \ + } \ + } \ + setStringList(set.toList()); \ + } CREATE_CSV_UPDATE_METHOD(BuddyCompletionModel, buddy); CREATE_CSV_UPDATE_METHOD(DiveMasterCompletionModel, divemaster); |