aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/ftw
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-02-04 16:00:17 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-02-07 13:49:20 +0000
commit77ca9599418806733322b6be55283098cea383a4 (patch)
treee117e8b7eb50cbb3b1b5c40c0fd515fbb7b1e6cf /src/qml/qml/ftw
parent5cf308cd17f403ac07fbd239c5bea674302a445e (diff)
Remove debug code from QStringHash
Now that we've split the classes, this doesn't work anymore. Change-Id: I9b18075db7895183f21045d199e8ac8b04245945 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/ftw')
-rw-r--r--src/qml/qml/ftw/qhashedstring_p.h3
-rw-r--r--src/qml/qml/ftw/qlinkedstringhash_p.h5
-rw-r--r--src/qml/qml/ftw/qstringhash.cpp5
-rw-r--r--src/qml/qml/ftw/qstringhash_p.h13
4 files changed, 0 insertions, 26 deletions
diff --git a/src/qml/qml/ftw/qhashedstring_p.h b/src/qml/qml/ftw/qhashedstring_p.h
index 3ed0c109e6..b9f3f81219 100644
--- a/src/qml/qml/ftw/qhashedstring_p.h
+++ b/src/qml/qml/ftw/qhashedstring_p.h
@@ -63,9 +63,6 @@
QT_BEGIN_NAMESPACE
-// Enable this to debug hash linking assumptions.
-// #define QSTRINGHASH_LINK_DEBUG
-
class QHashedStringRef;
class Q_QML_PRIVATE_EXPORT QHashedString : public QString
{
diff --git a/src/qml/qml/ftw/qlinkedstringhash_p.h b/src/qml/qml/ftw/qlinkedstringhash_p.h
index 06491139e0..67ced7fbbf 100644
--- a/src/qml/qml/ftw/qlinkedstringhash_p.h
+++ b/src/qml/qml/ftw/qlinkedstringhash_p.h
@@ -81,11 +81,6 @@ public:
nodePool->used = 0;
nodePool->nodes = new Node[additionalReserve];
-#ifdef QSTRINGHASH_LINK_DEBUG
- data.linkCount++;
- const_cast<QStringHash<T>&>(other).data.linkCount++;
-#endif
-
for (int ii = 0; ii < data.numBuckets; ++ii)
data.buckets[ii] = (Node *)other.data.buckets[ii];
diff --git a/src/qml/qml/ftw/qstringhash.cpp b/src/qml/qml/ftw/qstringhash.cpp
index 93963adcde..a483dcb810 100644
--- a/src/qml/qml/ftw/qstringhash.cpp
+++ b/src/qml/qml/ftw/qstringhash.cpp
@@ -84,11 +84,6 @@ void QStringHashData::rehashToBits(short bits)
if (nb == numBuckets && buckets)
return;
-#ifdef QSTRINGHASH_LINK_DEBUG
- if (linkCount)
- qFatal("QStringHash: Illegal attempt to rehash a linked hash.");
-#endif
-
QStringHashNode **newBuckets = new QStringHashNode *[nb];
::memset(newBuckets, 0, sizeof(QStringHashNode *) * nb);
diff --git a/src/qml/qml/ftw/qstringhash_p.h b/src/qml/qml/ftw/qstringhash_p.h
index f974c49fe0..c7251e8837 100644
--- a/src/qml/qml/ftw/qstringhash_p.h
+++ b/src/qml/qml/ftw/qstringhash_p.h
@@ -163,9 +163,6 @@ public:
int numBuckets = 0;
int size = 0;
short numBits = 0;
-#ifdef QSTRINGHASH_LINK_DEBUG
- int linkCount = 0;
-#endif
template<typename StringHash>
struct IteratorData {
@@ -421,16 +418,6 @@ QStringHash<T>::~QStringHash()
template<class T>
void QStringHash<T>::clear()
{
-#ifdef QSTRINGHASH_LINK_DEBUG
- if (link) {
- data.linkCount--;
- const_cast<QStringHash<T> *>(link)->data.linkCount--;
- }
-
- if (data.linkCount)
- qFatal("QStringHash: Illegal attempt to clear a linked hash.");
-#endif
-
// Delete the individually allocated nodes
NewedNode *n = newedNodes;
while (n) {