Add a new handler to syncqt for explicitly dealing with special case headers

Change-Id: I83b26fc88aee0052502c0a4d385ea97f8c933c66
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
This commit is contained in:
Kevin Simons 2011-11-04 12:20:49 +01:00 committed by Qt by Nokia
parent 4329030b77
commit a85375c57f

View File

@ -69,7 +69,7 @@ $qtbasedir = dirname(dirname($0)) if (!$qtbasedir);
$qtbasedir =~ s=\\=/=g if (defined $qtbasedir);
# will be defined based on the modules sync.profile
our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %mastercontent, %modulepris);
our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %mastercontent, %modulepris, %explicitheaders);
# global variables (modified by options)
my $isunix = 0;
@ -1057,14 +1057,24 @@ foreach my $lib (@modules_to_sync) {
# if ($class =~ m/::/) {
# class =~ s,::,/,g;
# }
$class_lib_map_contents .= "QT_CLASS_LIB($full_class, $lib, $header_base)\n";
$header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0, $ts));
if (defined $explicitheaders{$lib}{$class}) {
$header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$explicitheaders{$lib}{$class}", 0, $ts));
} else {
$class_lib_map_contents .= "QT_CLASS_LIB($full_class, $lib, $header_base)\n";
$header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0, $ts));
}
# KDE-Compat headers for Phonon
if ($lib eq "phonon") {
$header_copies++ if (syncHeader($lib, "$out_basedir/include/phonon_compat/Phonon/$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) {
if ($module_version) {
@headers = ( "$out_basedir/include/$lib/$module_version/$lib/private/$header" );
@ -1094,6 +1104,10 @@ foreach my $lib (@modules_to_sync) {
$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)}", $current_dir) . " ";
$pri_install_files .= $compat_header unless($pri_install_files =~ $compat_header);
}
$pri_install_files.= "$pri_install_iheader ";;
}
}