From 84e189502ac5849d89dedff491b1a5d9c5de793e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 8 Jul 2014 13:27:52 +0200 Subject: syncqt: Fix regexp capturing class names of partial specialisation Example with this code: "template struct QHashNode {" The previous regexp would take "QHashNode" as the class name. By forbidding '<' in the keyword, we avoid such mistake Change-Id: I5d5077b9e5e764e91899bcaef137d99214ea5d63 Reviewed-by: Oswald Buddenhagen --- bin/syncqt.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/syncqt.pl b/bin/syncqt.pl index 826d3fc6fa..a394ffac0d 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -299,7 +299,7 @@ sub classNames { push @symbols, $1; } elsif($definition =~ m/^ *typedef +(.*) +([^ ]*);$/) { push @symbols, $2; - } elsif($definition =~ m/^ *(template *<.*> *)?(class|struct) +([^ ]* +)?((?!$post_kw)[^<\s]+) ?(<[^>]*> ?)?\s*(?:$post_kw)?\s*((,|:)\s*(public|protected|private) *.*)? *\{\}$/o) { + } elsif($definition =~ m/^ *(template *<.*> *)?(class|struct) +([^ <>]* +)?((?!$post_kw)[^<\s]+) ?(<[^>]*> ?)?\s*(?:$post_kw)?\s*((,|:)\s*(public|protected|private) *.*)? *\{\}$/o) { push @symbols, $4; } elsif($definition =~ m/^ *Q_DECLARE_.*ITERATOR\((.*)\);$/) { push @symbols, "Q" . $1 . "Iterator"; -- cgit v1.2.3