diff options
-rwxr-xr-x | bin/syncqt.pl | 10 | ||||
-rwxr-xr-x | configure | 17 | ||||
-rw-r--r-- | src/corelib/global/global.pri | 5 | ||||
-rw-r--r-- | sync.profile | 1 | ||||
-rw-r--r-- | tools/configure/configureapp.cpp | 31 |
5 files changed, 54 insertions, 10 deletions
diff --git a/bin/syncqt.pl b/bin/syncqt.pl index f31466ad33..1da3878695 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -893,15 +893,8 @@ foreach my $lib (@modules_to_sync) { #calc files and "copy" them foreach my $subdir (@subdirs) { my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0); - if (defined $inject_headers{$subdir}) { - foreach my $if (@{$inject_headers{$subdir}}) { - @headers = grep(!/^\Q$if\E$/, @headers); #in case we configure'd previously - push @headers, "*".$if; - } - } my $header_dirname = ""; foreach my $header (@headers) { - my $shadow = ($header =~ s/^\*//); $header = 0 if($header =~ /^ui_.*.h/); foreach (@ignore_headers) { $header = 0 if($header eq $_); @@ -923,7 +916,6 @@ foreach my $lib (@modules_to_sync) { } my $iheader = $subdir . "/" . $header; - $iheader =~ s/^\Q$basedir\E/$out_basedir/ if ($shadow); my @classes = $public_header && !$minimal ? classNames($iheader) : (); if($showonly) { print "$header [$lib]\n"; @@ -964,7 +956,7 @@ foreach my $lib (@modules_to_sync) { } foreach(@headers) { #sync them - $header_copies++ if(syncHeader($lib, $_, $iheader, $copy_headers && !$shadow, $ts)); + $header_copies++ if (syncHeader($lib, $_, $iheader, $copy_headers, $ts)); } if($public_header) { @@ -6424,6 +6424,23 @@ else fi fi +# create a forwarding header +mkdir -p "$outpath/include/QtCore" || exit +echo '#include "../../src/corelib/global/qconfig.h"' > $outpath/include/QtCore/qconfig.h.new +if cmp -s "$outpath/include/QtCore/qconfig.h.new" "$outpath/include/QtCore/qconfig.h"; then + rm -f "$outpath/include/QtCore/qconfig.h.new" +else + mv "$outpath/include/QtCore/qconfig.h.new" "$outpath/include/QtCore/qconfig.h" || exit +fi + +# create a camelcase forwarding header +echo '#include "qconfig.h"' > $outpath/include/QtCore/QtConfig.new +if cmp -s "$outpath/include/QtCore/QtConfig.new" "$outpath/include/QtCore/QtConfig"; then + rm -f "$outpath/include/QtCore/QtConfig.new" +else + mv "$outpath/include/QtCore/QtConfig.new" "$outpath/include/QtCore/QtConfig" || exit +fi + #------------------------------------------------------------------------------- # save configuration into qconfig.pri #------------------------------------------------------------------------------- diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri index 6ac32cd35d..4084d4f2ad 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -29,6 +29,11 @@ SOURCES += \ # qlibraryinfo.cpp includes qconfig.cpp INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global +# configure creates these, not syncqt, so we need to manually inject them +targ_headers.files += \ + $$OUT_PWD/global/qconfig.h \ + $$QT_BUILD_TREE/include/QtCore/QtConfig + # Only used on platforms with CONFIG += precompile_header PRECOMPILED_HEADER = global/qt_pch.h diff --git a/sync.profile b/sync.profile index e07b285dbb..3d89d9d71f 100644 --- a/sync.profile +++ b/sync.profile @@ -24,7 +24,6 @@ %classnames = ( "qglobal.h" => "QtGlobal", "qendian.h" => "QtEndian", - "qconfig.h" => "QtConfig", "qplugin.h" => "QtPlugin", "qalgorithms.h" => "QtAlgorithms", "qcontainerfwd.h" => "QtContainerFwd", diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index a83f451b81..9620129509 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3351,6 +3351,37 @@ void Configure::generateConfigfiles() tmpFile.close(); } + QTemporaryFile tmpFile2; + if (tmpFile2.open()) { + tmpStream.setDevice(&tmpFile2); + tmpStream << "#include \"../../src/corelib/global/qconfig.h\"" << endl; + + tmpStream.flush(); + tmpFile2.flush(); + + outName = buildPath + "/include/QtCore/qconfig.h"; + ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL); + QFile::remove(outName); + + tmpFile2.copy(outName); + tmpFile2.close(); + } + QTemporaryFile tmpFile2a; + if (tmpFile2a.open()) { + tmpStream.setDevice(&tmpFile2a); + tmpStream << "#include \"qconfig.h\"" << endl; + + tmpStream.flush(); + tmpFile2a.flush(); + + outName = buildPath + "/include/QtCore/QtConfig"; + ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL); + QFile::remove(outName); + + tmpFile2a.copy(outName); + tmpFile2a.close(); + } + QTemporaryFile tmpFile3; if (tmpFile3.open()) { tmpStream.setDevice(&tmpFile3); |