diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-08-28 19:12:47 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-08-30 12:58:39 +0000 |
commit | eb1f6c63a57f2742f2052acb4517d8d74340d73c (patch) | |
tree | dd85c66f8555a8af751a781655ccf8675d518a13 /src/tools/uic | |
parent | f43a258fc46f090d53fbebb93a43d8124ff83f48 (diff) |
uic: use QStringList::removeDuplicates()
... instead of rolling our own version.
Change-Id: Ibd29f233844a6283349d086c4fbc88d7e1087653
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/tools/uic')
-rw-r--r-- | src/tools/uic/databaseinfo.cpp | 2 | ||||
-rw-r--r-- | src/tools/uic/utils.h | 8 |
2 files changed, 1 insertions, 9 deletions
diff --git a/src/tools/uic/databaseinfo.cpp b/src/tools/uic/databaseinfo.cpp index e491d6b19a..73fcf06c54 100644 --- a/src/tools/uic/databaseinfo.cpp +++ b/src/tools/uic/databaseinfo.cpp @@ -45,7 +45,7 @@ void DatabaseInfo::acceptUI(DomUI *node) TreeWalker::acceptUI(node); - m_connections = unique(m_connections); + m_connections.removeDuplicates(); } void DatabaseInfo::acceptWidget(DomWidget *node) diff --git a/src/tools/uic/utils.h b/src/tools/uic/utils.h index a6532eb534..7c5918cab9 100644 --- a/src/tools/uic/utils.h +++ b/src/tools/uic/utils.h @@ -132,14 +132,6 @@ inline QHash<QString, DomProperty *> propertyMap(const QList<DomProperty *> &pro return map; } -inline QStringList unique(const QStringList &lst) -{ - QHash<QString, bool> h; - for (int i=0; i<lst.size(); ++i) - h.insert(lst.at(i), true); - return h.keys(); -} - QT_END_NAMESPACE #endif // UTILS_H |