diff options
Diffstat (limited to 'src/corelib/tools/qhash.h')
-rw-r--r-- | src/corelib/tools/qhash.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 392371ce5e..6866dfebf3 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -1782,7 +1782,7 @@ public: qsizetype remove(const Key &key, const T &value) { if (isEmpty()) // prevents detaching shared null - return false; + return 0; detach(); auto it = d->find(key); @@ -1844,6 +1844,8 @@ public: iterator find(const Key &key, const T &value) { + if (isEmpty()) + return end(); detach(); auto it = constFind(key, value); return iterator(it.i, it.e); |