summaryrefslogtreecommitdiffstats
path: root/bin/syncqt
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-01-13 18:55:05 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-01-13 18:55:05 (GMT)
commit7d1e48639d6d3897e66779f22fe02d17d6c38707 (patch)
tree7abc16568274e1f54c976f890e92d73f7a00160c /bin/syncqt
parent20e0e7a849d70139f9106f60c78fd0c736ec3c4b (diff)
parente1b03bac22f87edbbe78eba366966259be6eb0ed (diff)
downloadQt-7d1e48639d6d3897e66779f22fe02d17d6c38707.zip
Qt-7d1e48639d6d3897e66779f22fe02d17d6c38707.tar.gz
Qt-7d1e48639d6d3897e66779f22fe02d17d6c38707.tar.bz2
Merge branch '4.6'
Conflicts: bin/syncqt doc/src/deployment/deployment.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/xml/qxmlstream.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
Diffstat (limited to 'bin/syncqt')
-rwxr-xr-xbin/syncqt59
1 files changed, 44 insertions, 15 deletions
diff --git a/bin/syncqt b/bin/syncqt
index 13e792b..803bae2 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -3,7 +3,7 @@
#
# Synchronizes Qt header files - internal development tool.
#
-# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
# Contact: Nokia Corporation (qt-info@nokia.com)
#
######################################################################
@@ -15,6 +15,13 @@ use Cwd;
use Config;
use strict;
+for (my $i = 0; $i < $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-base-dir" && $i < $#ARGV - 1) {
+ $ENV{"QTDIR"} = $ARGV[$i + 1];
+ last;
+ }
+}
+
die "syncqt: QTDIR not defined" if ! $ENV{"QTDIR"}; # sanity check
# global variables
@@ -60,6 +67,8 @@ my $force_win = 0;
my $force_relative = 0;
my $check_includes = 0;
my $copy_headers = 0;
+my $create_uic_class_map = 1;
+my $create_private_headers = 1;
my @modules_to_sync ;
$force_relative = 1 if ( -d "/System/Library/Frameworks" );
my $out_basedir = $basedir;
@@ -83,6 +92,7 @@ sub showUsage
print " -windows Force platform to Windows (default: " . ($force_win ? "yes" : "no") . ")\n";
print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n";
print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n";
+ print " -separate-module <NAME>:<PROFILEDIR>:<HEADERDIR> Create headers for <NAME> with original headers in <HEADERDIR> relative to <PROFILEDIR> \n";
print " -help This help\n";
exit 0;
}
@@ -575,9 +585,16 @@ while ( @ARGV ) {
} elsif("$arg" eq "-module") {
$var = "module";
$val = shift @ARGV;
+ } elsif("$arg" eq "-separate-module") {
+ $var = "separate-module";
+ $val = shift @ARGV;
} elsif("$arg" eq "-show") {
$var = "showonly";
$val = "yes";
+ } elsif("$arg" eq "-base-dir") {
+ # skip, it's been dealt with at the top of the file
+ shift @ARGV;
+ next;
}
#do something
@@ -624,6 +641,13 @@ while ( @ARGV ) {
print "module :$val:\n";
die "No such module: $val" unless(defined $modules{$val});
push @modules_to_sync, $val;
+ } elsif ("$var" eq "separate-module") {
+ my ($module, $prodir, $headerdir) = split(/:/, $val);
+ $modules{$module} = $prodir;
+ push @modules_to_sync, $module;
+ $moduleheaders{$module} = $headerdir;
+ $create_uic_class_map = 0;
+ $create_private_headers = 0;
} elsif ("$var" eq "output") {
my $outdir = $val;
if(checkRelative($outdir)) {
@@ -796,13 +820,20 @@ foreach (@modules_to_sync) {
foreach(@classes) {
my $header_base = basename($header);
my $class = $_;
- if ($class =~ m/::/) {
- $class =~ s,::,/,g;
- }
+ # Strip namespaces:
+ $class =~ s/^.*:://;
+# if ($class =~ m/::/) {
+# class =~ s,::,/,g;
+# }
$class_lib_map_contents .= "QT_CLASS_LIB($_, $lib, $header_base)\n";
$header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0));
+
+ # KDE-Compat headers for Phonon
+ if ($lib eq "phonon") {
+ $header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0));
+ }
}
- } else {
+ } elsif ($create_private_headers) {
@headers = ( "$out_basedir/include/$lib/private/$header" );
push @headers, "$out_basedir/include/Qt/private/$header"
if ("$lib" ne "phonon");
@@ -820,9 +851,11 @@ foreach (@modules_to_sync) {
my $pri_install_iheader = fixPaths($iheader, $current_dir);
foreach(@classes) {
my $class = $_;
- if ($class =~ m/::/) {
- $class =~ s,::,/,g;
- }
+ # Strip namespaces:
+ $class =~ s/^.*:://;
+# if ($class =~ m/::/) {
+# $class =~ s,::,/,g;
+# }
my $class_header = fixPaths("$out_basedir/include/$lib/$class",
$current_dir) . " ";
$pri_install_classes .= $class_header
@@ -847,12 +880,8 @@ foreach (@modules_to_sync) {
unless($showonly) {
my @master_includes;
- if ($lib eq "phonon") {
- push @master_includes, "$out_basedir/include/phonon_compat/phonon/phonon";
- push @master_includes, "$out_basedir/include/phonon/Phonon/Phonon";
- } else {
- push @master_includes, "$out_basedir/include/$lib/$lib";
- }
+ push @master_includes, "$out_basedir/include/$lib/$lib";
+ push @master_includes, "$out_basedir/include/phonon_compat/Phonon/Phonon" if ($lib eq "phonon");
foreach my $master_include (@master_includes) {
#generate the "master" include file
$pri_install_files .= fixPaths($master_include, "$modules{$lib}") . " "; #get the master file installed too
@@ -900,7 +929,7 @@ foreach (@modules_to_sync) {
}
}
}
-unless($showonly) {
+unless($showonly || !$create_uic_class_map) {
my $class_lib_map = "$out_basedir/src/tools/uic/qclass_lib_map.h";
if(-e "$class_lib_map") {
open CLASS_LIB_MAP, "<$class_lib_map";