Let qt function parsing be more forgiving

This commit is contained in:
Florian Bruhin 2014-06-03 06:54:55 +02:00
parent 6d50ebae49
commit 4d0649a825

View File

@ -137,7 +137,11 @@ def qt_message_handler(msg_type, context, msg):
return
# We get something like "void qt_png_warning(png_structp, png_const_charp)"
# from Qt, but only want "qt_png_warning".
func = re.match(r'\w* (\w*)\(.*\)', context.function).group(1)
match = re.match(r'\w* (\w*)\(.*\)', context.function)
if match is not None:
func = match.group(1)
else:
func = context.function
name = 'qt' if context.category == 'default' else 'qt-' + context.category
record = qt.makeRecord(name, QT_TO_LOGGING[msg_type], context.file,
context.line, msg, None, None, func)