summaryrefslogtreecommitdiffstats
path: root/common/log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/log.cpp')
-rw-r--r--common/log.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/common/log.cpp b/common/log.cpp
index bfc9d5e..e726cd5 100644
--- a/common/log.cpp
+++ b/common/log.cpp
@@ -289,18 +289,16 @@ static void collectDebugArea(const QString &debugArea)
289static bool containsItemStartingWith(const QByteArray &pattern, const QByteArrayList &list) 289static bool containsItemStartingWith(const QByteArray &pattern, const QByteArrayList &list)
290{ 290{
291 for (const auto &item : list) { 291 for (const auto &item : list) {
292 int start = 0;
293 int end = item.size();
292 if (item.startsWith('*')) { 294 if (item.startsWith('*')) {
293 auto stripped = item.mid(1); 295 start++;
294 if (stripped.endsWith('*')) { 296 }
295 stripped.chop(1); 297 if (item.endsWith('*')) {
296 } 298 end--;
297 if (pattern.contains(stripped)) { 299 }
298 return true; 300 if (pattern.contains(item.mid(start, end - start))) {
299 } 301 return true;
300 } else {
301 if (pattern.contains(item)) {
302 return true;
303 }
304 } 302 }
305 } 303 }
306 return false; 304 return false;