summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-08-25 17:53:43 -0300
committerThiago Macieira <thiago.macieira@intel.com>2022-08-30 15:56:46 -0300
commit845697bf11665f2751f5b89666f272155d2db9e0 (patch)
treebafd9c8942da69e57ca12f01de39b0930554dc4a /mkspecs
parent9afe954783cc7faec86bf2ef2c839f2362827e43 (diff)
findclasslist.pl: add a way to mark lines to be ignored
In case they get erroneously extracted. For example, in Core5Compat, QTextCodec appears in the _p.h as a full class if !QT_CONFIG(textcodec) (I don't know what that is for, but it's there). Pick-to: 6.4 Change-Id: Ic6547f8247454b47baa8fffd170eb1d0f7e6d0f9 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/data/unix/findclasslist.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/mkspecs/features/data/unix/findclasslist.pl b/mkspecs/features/data/unix/findclasslist.pl
index 4971dcb5ba..ca5f856156 100644
--- a/mkspecs/features/data/unix/findclasslist.pl
+++ b/mkspecs/features/data/unix/findclasslist.pl
@@ -18,6 +18,12 @@ while (<STDIN>) {
open HDR, "<$1" or die("Could not open header $1: $!");
my $comment = " /* $1 */";
while (my $line = <HDR>) {
+ if ($line =~ /\bELFVERSION:(\S+)\b/) {
+ last if $1 eq "stop";
+ <HDR> if $1 eq "ignore-next"; # load next line
+ next if $1 eq "ignore" or $1 eq "ignore-next";
+ }
+
# Match a struct or class declaration, but not a forward declaration
$line =~ /^(?:struct|class|namespace) (?:Q_.*_EXPORT)? (\w+)(?!;)/ or next;
print $comment if $comment;