summaryrefslogtreecommitdiffstats
path: root/bin/syncqt
diff options
context:
space:
mode:
Diffstat (limited to 'bin/syncqt')
-rwxr-xr-xbin/syncqt30
1 files changed, 26 insertions, 4 deletions
diff --git a/bin/syncqt b/bin/syncqt
index f993fd9..f499bbc 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -681,6 +681,7 @@ $isunix = checkUnix; #cache checkUnix
# create path
mkpath "$out_basedir/include", !$quiet;
+mkpath "$out_basedir/include/Qt", !$quiet;
my @ignore_headers = ();
my $class_lib_map_contents = "";
@@ -689,6 +690,7 @@ my @ignore_for_include_check = ( "qatomic.h" );
my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h" );
my @ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h" );
my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" );
+my %colliding_headers = ();
foreach (@modules_to_sync) {
#iteration info
@@ -828,8 +830,30 @@ foreach (@modules_to_sync) {
my @headers;
if ($public_header) {
@headers = ( "$out_basedir/include/$lib/$header" );
- push @headers, "$out_basedir/include/Qt/$header"
- if ("$lib" ne "phonon" && "$subdir" =~ /^$basedir\/src/);
+
+ # write forwarding headers to include/Qt
+ if ("$lib" ne "phonon" && "$subdir" =~ /^$basedir\/src/) {
+ my $file_name = "$out_basedir/include/Qt/$header";
+ my $header_content = '';
+ if (exists $colliding_headers{$file_name}) {
+ $file_name = ">>$file_name";
+ } else {
+ $colliding_headers{$file_name} = 1;
+ $file_name = ">$file_name";
+ my $warning_msg = 'Inclusion of header files from include/Qt is deprecated.';
+ $header_content = "#ifndef QT_NO_QT_INCLUDE_WARN\n" .
+ " #if defined(__GNUC__)\n" .
+ " #pragma warning \"$warning_msg\"\n" .
+ " #elif defined(_MSC_VER)\n" .
+ " #pragma message \"WARNING: $warning_msg\"\n" .
+ " #endif\n".
+ "#endif\n\n";
+ }
+ $header_content .= '#include "' . "../$lib/$header" . "\"\n";
+ open HEADERFILE, $file_name;
+ print HEADERFILE $header_content;
+ close HEADERFILE;
+ }
foreach(@classes) {
my $header_base = basename($header);
@@ -849,8 +873,6 @@ foreach (@modules_to_sync) {
}
} elsif ($create_private_headers) {
@headers = ( "$out_basedir/include/$lib/private/$header" );
- push @headers, "$out_basedir/include/Qt/private/$header"
- if ("$lib" ne "phonon");
}
foreach(@headers) { #sync them
$header_copies++ if(syncHeader($_, $iheader, $copy_headers));