diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-01-29 11:29:51 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-09-12 11:44:18 +0000 |
commit | 446afc10451d5097d7bd20b1b8d20325c4d54fa5 (patch) | |
tree | 04a9f9f1406dafdc7ae93fa86a481fa501b3efe6 /src/tools/uic/cpp/cppwriteincludes.h | |
parent | efe6efe627a3253c7e2283378b2b5c268c9b6199 (diff) |
uic: use a real ordered set
... instead of QMap<Key, bool>. Since Qt doesn't have such
a container, use std::set instead, which also simplifies
some code, in particular, because, unlike the Qt containers,
it does the right thing on attempted duplicate insertion:
nothing.
Saves 6.5KiB in text size (1.1% of total) on optimized
GCC 5.3 Linux AMD64 builds.
Change-Id: I9578a9a58c1c06abe58f22a5b6127d43c2f4be12
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/tools/uic/cpp/cppwriteincludes.h')
-rw-r--r-- | src/tools/uic/cpp/cppwriteincludes.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/uic/cpp/cppwriteincludes.h b/src/tools/uic/cpp/cppwriteincludes.h index 397c6a26e1..7a6a499536 100644 --- a/src/tools/uic/cpp/cppwriteincludes.h +++ b/src/tools/uic/cpp/cppwriteincludes.h @@ -35,6 +35,8 @@ #include <qset.h> #include <qstring.h> +#include <set> + QT_BEGIN_NAMESPACE class QTextStream; @@ -72,7 +74,7 @@ private: void add(const QString &className, bool determineHeader = true, const QString &header = QString(), bool global = false); private: - typedef QMap<QString, bool> OrderedSet; + typedef std::set<QString> OrderedSet; void insertIncludeForClass(const QString &className, QString header = QString(), bool global = false); void insertInclude(const QString &header, bool global); void writeHeaders(const OrderedSet &headers, bool global); |