aboutsummaryrefslogtreecommitdiffstats
path: root/src/checks/level1/README-qdeleteall.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/checks/level1/README-qdeleteall.md')
-rw-r--r--src/checks/level1/README-qdeleteall.md18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/checks/level1/README-qdeleteall.md b/src/checks/level1/README-qdeleteall.md
deleted file mode 100644
index 3baea852..00000000
--- a/src/checks/level1/README-qdeleteall.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# qdeleteall
-Finds places where a call to `qDeleteAll()` has a redundant `values()` or `keys()` call.
-Those calls create a temporary `QList<int>` and allocate memory.
-
-#### Example
-
- QSet<Cookies> set;
-
- // BAD: Unneeded container iteration and memory allocation to construct list of values
- qDeleteAll(set.values());
-
- // GOOD: Unneeded container iteration and memory allocation to construct list of values
- qDeleteAll(set);
-
-#### Pitfalls
-
-Very rarely you might be deleting a list of `QObject`s who's `destroyed()` signal is connected to some code
-that modifies the original container. In the case of this contrived example iterating over the container copy is safer.