Fix ### comments in QSet
authorLars Knoll <lars.knoll@nokia.com>
Sun, 15 Jan 2012 20:09:14 +0000 (21:09 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 16 Jan 2012 12:48:30 +0000 (13:48 +0100)
Change-Id: I302be7dc4cd7a9c2b9e35e8142ca100d6f86da7c
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
src/corelib/tools/qset.h

index 7694faa..7ad16a7 100644 (file)
@@ -176,9 +176,8 @@ public:
     typedef iterator Iterator;
     typedef const_iterator ConstIterator;
     inline int count() const { return q_hash.count(); }
-    inline const_iterator insert(const T &value) // ### Qt 5: should return an 'iterator'
-        { return static_cast<typename Hash::const_iterator>(q_hash.insert(value,
-                                                                          QHashDummyValue())); }
+    inline iterator insert(const T &value)
+        { return static_cast<typename Hash::iterator>(q_hash.insert(value, QHashDummyValue())); }
     iterator find(const T &value) { return q_hash.find(value); }
     const_iterator find(const T &value) const { return q_hash.find(value); }
     inline const_iterator constFind(const T &value) const { return find(value); }
@@ -216,17 +215,6 @@ public:
         { QSet<T> result = *this; result += other; return result; }
     inline QSet<T> operator-(const QSet<T> &other) const
         { QSet<T> result = *this; result -= other; return result; }
-#if QT_VERSION < 0x050000
-    // ### Qt 5: remove
-    inline QSet<T> operator|(const QSet<T> &other)
-        { QSet<T> result = *this; result |= other; return result; }
-    inline QSet<T> operator&(const QSet<T> &other)
-        { QSet<T> result = *this; result &= other; return result; }
-    inline QSet<T> operator+(const QSet<T> &other)
-        { QSet<T> result = *this; result += other; return result; }
-    inline QSet<T> operator-(const QSet<T> &other)
-        { QSet<T> result = *this; result -= other; return result; }
-#endif
 
     QList<T> toList() const;
     inline QList<T> values() const { return toList(); }