diff options
author | Andy Shaw <andy.shaw@qt.io> | 2019-11-05 22:10:24 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2019-11-06 10:49:24 +0100 |
commit | 5771b5325b85f71a8f8ff78ed13eaee3df2e3ba8 (patch) | |
tree | 7ec13ffe74fb473aa1b56173d1414958ff8a856f /bin | |
parent | qlibinputtouch: bugfix: do not skip touch events (diff) | |
download | qtbase-5771b5325b85f71a8f8ff78ed13eaee3df2e3ba8.tar.xz qtbase-5771b5325b85f71a8f8ff78ed13eaee3df2e3ba8.zip |
syncqt: Add a means to suspend/resume the processing of a file
Rather than tweaking the parser to cover every eventuality with corner
case lines that could cause incorrect header files to be created then
the means to suspend/resume the processing of a file is added.
This enables us to have it skip over the template line that is causing
a QList header to be created as part of the QtGui headers. This patch
includes the fix to solve this in addition.
Fixes: QTBUG-68129
Change-Id: I751646c4b20a4434347c149ae5e6dcb6e7618853
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/syncqt.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/syncqt.pl b/bin/syncqt.pl index 8226edfb76..11ae5845eb 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -212,6 +212,7 @@ sub classNames { $$clean = 1; $$requires = ""; + my $suspended = 0; my $ihdrbase = basename($iheader); my $parsable = ""; @@ -224,9 +225,11 @@ sub classNames { $$clean = 0 if ($line =~ m/^#pragma qt_sync_skip_header_check/); return @ret if($line =~ m/^#pragma qt_sync_stop_processing/); push(@ret, $1) if($line =~ m/^#pragma qt_class\(([^)]*)\)[\r\n]*$/); + $suspended = 1 if ($line =~ m/^#pragma qt_sync_suspend_processing/); + $suspended = 0 if ($line =~ m/^#pragma qt_sync_resume_processing/); $line = 0; } - if($line) { + if ($line && !$suspended) { $line =~ s,//.*$,,; #remove c++ comments $line .= ";" if($line =~ m/^Q_[A-Z_0-9]*\(.*\)[\r\n]*$/); #qt macro $line .= ";" if($line =~ m/^QT_(BEGIN|END)_HEADER[\r\n]*$/); #qt macro |