Commit 6571aaf1 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen Committed by The Qt Project
Browse files

merge %explicitheaders into %classnames


no need to have two mechanisms for the same thing.

the values of %classnames can be comma-separated lists now, so one
header can have multiple classes assigned. conversely, if an extracted
class name reverse-maps to a different file name, it is omitted.

Change-Id: Ia0a35d64764b6376f33b77bbfe59e1df70a3cf1a
Reviewed-by: default avatarJędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@digia.com>
parent 3d50a096
dev 5.10 5.11 5.12 5.12.1 5.12.10 5.12.11 5.12.12 5.12.2 5.12.3 5.12.4 5.12.5 5.12.6 5.12.7 5.12.8 5.12.9 5.13 5.13.0 5.13.1 5.13.2 5.14 5.14.0 5.14.1 5.14.2 5.15 5.15.0 5.15.1 5.15.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.9.8 6.0 6.0.0 6.1 6.1.0 6.1.1 6.1.2 6.1.3 6.2 6.2.0 6.2.1 6.2.2 wip/cmake wip/highdpi wip/lite wip/mir wip/nacl wip/network-test-server wip/remac wip/tizen wip/webassembly v5.15.0-alpha1 v5.14.1 v5.14.0 v5.14.0-rc2 v5.14.0-rc1 v5.14.0-beta3 v5.14.0-beta2 v5.14.0-beta1 v5.14.0-alpha1 v5.13.2 v5.13.1 v5.13.0 v5.13.0-rc3 v5.13.0-rc2 v5.13.0-rc1 v5.13.0-beta4 v5.13.0-beta3 v5.13.0-beta2 v5.13.0-beta1 v5.13.0-alpha1 v5.12.7 v5.12.6 v5.12.5 v5.12.4 v5.12.3 v5.12.2 v5.12.1 v5.12.0 v5.12.0-rc2 v5.12.0-rc1 v5.12.0-beta4 v5.12.0-beta3 v5.12.0-beta2 v5.12.0-beta1 v5.12.0-alpha1 v5.11.3 v5.11.2 v5.11.1 v5.11.0 v5.11.0-rc2 v5.11.0-rc1 v5.11.0-beta4 v5.11.0-beta3 v5.11.0-beta2 v5.11.0-beta1 v5.11.0-alpha1 v5.10.1 v5.10.0 v5.10.0-rc3 v5.10.0-rc2 v5.10.0-rc1 v5.10.0-beta4 v5.10.0-beta3 v5.10.0-beta2 v5.10.0-beta1 v5.10.0-alpha1 v5.9.9 v5.9.8 v5.9.7 v5.9.6 v5.9.5 v5.9.4 v5.9.3 v5.9.2 v5.9.1 v5.9.0 v5.9.0-rc2 v5.9.0-rc1 v5.9.0-beta4 v5.9.0-beta3 v5.9.0-beta2 v5.9.0-beta1 v5.9.0-alpha1 v5.8.0 v5.8.0-rc1 v5.8.0-beta1 v5.8.0-alpha1 v5.7.1 v5.7.0 v5.7.0-rc1 v5.7.0-beta1 v5.7.0-alpha1 v5.6.3 v5.6.2 v5.6.1 v5.6.1-1 v5.6.0 v5.6.0-rc1 v5.6.0-beta1 v5.6.0-alpha1 v5.5.1 v5.5.0 v5.5.0-rc1 v5.5.0-beta1 v5.5.0-alpha1 v5.4.2 v5.4.1 v5.4.0 v5.4.0-rc1 v5.4.0-beta1 v5.4.0-alpha1 v5.3.2 v5.3.1 v5.3.0 v5.3.0-rc1 v5.3.0-beta1
No related merge requests found
Showing with 18 additions and 25 deletions
...@@ -84,9 +84,12 @@ our $quoted_basedir; ...@@ -84,9 +84,12 @@ our $quoted_basedir;
$INPUT_RECORD_SEPARATOR = "\r\n" if ($^O eq "msys"); $INPUT_RECORD_SEPARATOR = "\r\n" if ($^O eq "msys");
# will be defined based on the modules sync.profile # will be defined based on the modules sync.profile
our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %explicitheaders, %deprecatedheaders); our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %deprecatedheaders);
our @qpa_headers = (); our @qpa_headers = ();
# will be derived from sync.profile
our %reverse_classnames = ();
# global variables (modified by options) # global variables (modified by options)
my $isunix = 0; my $isunix = 0;
my $module = 0; my $module = 0;
...@@ -206,8 +209,9 @@ sub classNames { ...@@ -206,8 +209,9 @@ sub classNames {
my @ret; my @ret;
my ($iheader) = @_; my ($iheader) = @_;
my $classname = $classnames{basename($iheader)}; my $ihdrbase = basename($iheader);
push @ret, $classname if ($classname); my $classname = $classnames{$ihdrbase};
push @ret, split(/,/, $classname) if ($classname);
my $parsable = ""; my $parsable = "";
if(open(F, "<$iheader")) { if(open(F, "<$iheader")) {
...@@ -306,6 +310,8 @@ sub classNames { ...@@ -306,6 +310,8 @@ sub classNames {
foreach my $symbol (@symbols) { foreach my $symbol (@symbols) {
$symbol = (join("::", @namespaces) . "::" . $symbol) if (scalar @namespaces); $symbol = (join("::", @namespaces) . "::" . $symbol) if (scalar @namespaces);
my $revhdr = $reverse_classnames{$symbol};
next if (defined($revhdr) and $revhdr ne $ihdrbase);
if ($symbol =~ /^Q[^:]*$/) { # no-namespace, starting with Q if ($symbol =~ /^Q[^:]*$/) { # no-namespace, starting with Q
push @ret, $symbol; push @ret, $symbol;
} elsif (defined($publicclassregexp)) { } elsif (defined($publicclassregexp)) {
...@@ -580,6 +586,13 @@ sub loadSyncProfile { ...@@ -580,6 +586,13 @@ sub loadSyncProfile {
die "syncqt couldn't parse $syncprofile: $@" if $@; die "syncqt couldn't parse $syncprofile: $@" if $@;
die "syncqt couldn't execute $syncprofile: $!" unless defined $result; die "syncqt couldn't execute $syncprofile: $!" unless defined $result;
} }
for my $fn (keys %classnames) {
for my $cn (split(/,/, $classnames{$fn})) {
$reverse_classnames{$cn} = $fn;
}
}
return $result; return $result;
} }
...@@ -936,17 +949,8 @@ foreach my $lib (@modules_to_sync) { ...@@ -936,17 +949,8 @@ foreach my $lib (@modules_to_sync) {
# class =~ s,::,/,g; # class =~ s,::,/,g;
# } # }
if (defined $explicitheaders{$lib}{$class}) { $header_copies++ if (syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0, $ts));
$header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$explicitheaders{$lib}{$class}", 0, $ts));
} else {
$header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0, $ts));
}
}
if ($explicitheaders{$lib}{basename($header)}) {
$header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$explicitheaders{$lib}{basename($header)}", "$out_basedir/include/$lib/$header", 0, $ts));
} }
} elsif ($create_private_headers && !$qpa_header) { } elsif ($create_private_headers && !$qpa_header) {
@headers = ( "$out_basedir/include/$lib/$module_version/$lib/private/$header" ); @headers = ( "$out_basedir/include/$lib/$module_version/$lib/private/$header" );
} elsif ($create_private_headers) { } elsif ($create_private_headers) {
...@@ -975,11 +979,6 @@ foreach my $lib (@modules_to_sync) { ...@@ -975,11 +979,6 @@ foreach my $lib (@modules_to_sync) {
$pri_install_classes .= $class_header $pri_install_classes .= $class_header
unless($pri_install_classes =~ $class_header); unless($pri_install_classes =~ $class_header);
} }
if ($explicitheaders{$lib}{basename($iheader)}) {
my $compat_header = fixPaths("$out_basedir/include/$lib/$explicitheaders{$lib}{basename($iheader)}",
$dir) . " ";
$pri_install_files .= $compat_header unless($pri_install_files =~ $compat_header);
}
$pri_install_files.= "$pri_install_iheader ";; $pri_install_files.= "$pri_install_iheader ";;
} }
} }
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
"qevent.h" => "QtEvents", "qevent.h" => "QtEvents",
"qnamespace.h" => "Qt", "qnamespace.h" => "Qt",
"qnumeric.h" => "QtNumeric", "qnumeric.h" => "QtNumeric",
"qvariant.h" => "QVariantHash,QVariantList,QVariantMap",
"qsql.h" => "QSql", "qsql.h" => "QSql",
"qssl.h" => "QSsl", "qssl.h" => "QSsl",
"qtest.h" => "QTest", "qtest.h" => "QTest",
...@@ -44,13 +45,6 @@ ...@@ -44,13 +45,6 @@
"QGenericPluginFactory" => "QtGui/QGenericPluginFactory" "QGenericPluginFactory" => "QtGui/QGenericPluginFactory"
} }
); );
%explicitheaders = (
"QtCore" => {
"QVariantHash" => "qvariant.h",
"QVariantList" => "qvariant.h",
"QVariantMap" => "qvariant.h",
}
);
@qpa_headers = ( qr/^qplatform/, qr/^qwindowsystem/ ); @qpa_headers = ( qr/^qplatform/, qr/^qwindowsystem/ );
my @angle_headers = ('egl.h', 'eglext.h', 'eglplatform.h', 'gl2.h', 'gl2ext.h', 'gl2platform.h', 'ShaderLang.h', 'khrplatform.h'); my @angle_headers = ('egl.h', 'eglext.h', 'eglplatform.h', 'gl2.h', 'gl2ext.h', 'gl2platform.h', 'ShaderLang.h', 'khrplatform.h');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment