diff options
Diffstat (limited to 'src/corelib/thread/qresultstore.h')
-rw-r--r-- | src/corelib/thread/qresultstore.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/thread/qresultstore.h b/src/corelib/thread/qresultstore.h index fb9151fcc6..ced181a91d 100644 --- a/src/corelib/thread/qresultstore.h +++ b/src/corelib/thread/qresultstore.h @@ -194,6 +194,9 @@ public: template<typename T> int addResults(int index, const QList<T> *results) { + if (results->empty()) // reject if results are empty + return -1; + if (containsValidResultItem(index)) // reject if already present return -1; @@ -203,6 +206,10 @@ public: template<typename T> int addResults(int index, const QList<T> *results, int totalCount) { + // reject if results are empty, and nothing is filtered away + if ((m_filterMode == false || results->count() == totalCount) && results->empty()) + return -1; + if (containsValidResultItem(index)) // reject if already present return -1; |