From 5a6eb2bec3c699e70b48b8eea26a56b91ed02119 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 3 Jun 2014 17:24:12 +0200 Subject: [PATCH] Improve function match regex --- qutebrowser/utils/log.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/utils/log.py b/qutebrowser/utils/log.py index 71094f634..132084035 100644 --- a/qutebrowser/utils/log.py +++ b/qutebrowser/utils/log.py @@ -142,9 +142,9 @@ def qt_message_handler(msg_type, context, msg): level = qt_to_logging[msg_type] # We get something like "void qt_png_warning(png_structp, png_const_charp)" # from Qt, but only want "qt_png_warning". - match = re.match(r'.* (\w*)\(.*\)', context.function) + match = re.match(r'.*( |::)(\w*)\(.*\)', context.function) if match is not None: - func = match.group(1) + func = match.group(2) else: func = context.function name = 'qt' if context.category == 'default' else 'qt-' + context.category