From 72388121aa4b576277a7dfbc7cd18224bfaa6ad4 Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Fri, 30 Nov 2012 15:39:58 +0100 Subject: [PATCH 1/7] WINCE: Fix missing cosf cosf seems to be defined in the cmath header for Windows CE, so include it to fix the issue of not finding the symbol cosf. Change-Id: I7317668838912325d45be0d4087ae3055940d3cd Reviewed-by: Sean Harmer --- src/gui/math3d/qmatrix4x4.cpp | 2 ++ src/gui/math3d/qquaternion.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp index 4e35d49118..d8c2116b0d 100644 --- a/src/gui/math3d/qmatrix4x4.cpp +++ b/src/gui/math3d/qmatrix4x4.cpp @@ -45,6 +45,8 @@ #include #include +#include + QT_BEGIN_NAMESPACE #ifndef QT_NO_MATRIX4X4 diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp index 3f39fa43c3..2ccdd315d3 100644 --- a/src/gui/math3d/qquaternion.cpp +++ b/src/gui/math3d/qquaternion.cpp @@ -45,6 +45,8 @@ #include #include +#include + QT_BEGIN_NAMESPACE #ifndef QT_NO_QUATERNION From babc6ec1433d3ccab956a1aff4d1feb50f7de9e2 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Fri, 30 Nov 2012 15:09:56 +0100 Subject: [PATCH 2/7] Compile with QT_NO_COLORDIALOG. Change-Id: I37e3fed497f3595942662efb22114de57ea4c9db Reviewed-by: Marc Mutz --- src/widgets/dialogs/qdialog.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index 7b47f4e135..290f0a7f65 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -67,8 +67,10 @@ static inline int themeDialogType(const QDialog *dialog) if (qobject_cast(dialog)) return QPlatformTheme::FileDialog; #endif +#ifndef QT_NO_COLORDIALOG if (qobject_cast(dialog)) return QPlatformTheme::ColorDialog; +#endif #ifndef QT_NO_FONTDIALOG if (qobject_cast(dialog)) return QPlatformTheme::FontDialog; From 77fd2f8319d5fecdf9ad377ebade82e49c6f0569 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 27 Nov 2012 16:57:07 +0100 Subject: [PATCH 3/7] factor out testcase_targets.prf instead of letting *every* qmake-based project have recursive check target, let interested projects "subscribe" to it by adding CONFIG+=testcase_targets in a central place (.qmake.conf, which Qt itself does via qt_build_config.prf). Change-Id: Ib13fdd2d3a1adee0c5ad02b6b176a664c583bf9d Reviewed-by: Joerg Bornemann --- mkspecs/features/default_post.prf | 9 --------- mkspecs/features/qt_build_config.prf | 1 + mkspecs/features/testcase_targets.prf | 9 +++++++++ 3 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 mkspecs/features/testcase_targets.prf diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 6f3f318e0a..5359953d90 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -47,12 +47,3 @@ breakpad { QMAKE_INCDIR += $$QMAKE_INCDIR_POST QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST - -# Let every project have a standard GNU `check' target -!contains(QMAKE_EXTRA_TARGETS, check) { - contains(TEMPLATE, subdirs): \ - prepareRecursiveTarget(check) - else: \ - check.depends = first # `make check' implies build - QMAKE_EXTRA_TARGETS += check -} diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index 63d6b43c7c..e9d5367ee1 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -27,6 +27,7 @@ mac { CONFIG += \ create_prl link_prl \ + testcase_targets \ prepare_docs qt_docs_targets \ qt_example_installs \ no_private_qt_headers_warning QTDIR_build \ diff --git a/mkspecs/features/testcase_targets.prf b/mkspecs/features/testcase_targets.prf new file mode 100644 index 0000000000..e9b107735a --- /dev/null +++ b/mkspecs/features/testcase_targets.prf @@ -0,0 +1,9 @@ + +# Let every project have a standard GNU `check' target +!contains(QMAKE_EXTRA_TARGETS, check) { + contains(TEMPLATE, subdirs): \ + prepareRecursiveTarget(check) + else: \ + check.depends = first # `make check' implies build + QMAKE_EXTRA_TARGETS += check +} From 25aa803af7446bb3ac6db28209bf7b2138f08715 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 30 Nov 2012 16:50:05 +0100 Subject: [PATCH 4/7] auto-collect qml-related sources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia5b56227c2c1f18254d35f6105ac3a146f085e3b Reviewed-by: hjk Reviewed-by: Joerg Bornemann Reviewed-by: Tor Arne Vestbø --- mkspecs/features/qt_example_installs.prf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index 72f0b141a7..281552acb6 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -21,6 +21,7 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) extras = \ $$_PRO_FILE_PWD_/README \ $$files($$_PRO_FILE_PWD_/*.pri) \ + $$replace(_PRO_FILE_, \\.pro$, .qmlproject) \ $$replace(_PRO_FILE_, \\.pro$, .json) \ $$replace(_PRO_FILE_, \\.pro$, .inf) for(extra, extras): \ @@ -30,6 +31,10 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) # Just for Qt Creator OTHER_FILES += $$sourcefiles + for(inst, INSTALLS): \ + !equals(inst, target):!contains($${inst}.CONFIG, no_check_exist): \ + for(file, $${inst}.files): \ + sourcefiles += $$files($$absolute_path($$file, $$_PRO_FILE_PWD_)) sourcefiles += \ $$_PRO_FILE_ $$RC_FILE $$DEF_FILE \ $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \ From d902b3a4813804c045ec0d0929e6ec3a0d1c63c1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 30 Nov 2012 17:42:45 +0100 Subject: [PATCH 5/7] don't auto-install example sources by default for all modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit turns out that some modules need a lot of work, so make it opt-in for the time being. Change-Id: I16365e3d96adab98a1bc748907dbd67488dfad5f Reviewed-by: Joerg Bornemann Reviewed-by: Tor Arne Vestbø --- .qmake.conf | 1 + mkspecs/features/qt_build_config.prf | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 42ba8e45fb..5de255cb69 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1 +1,2 @@ load(qt_build_config) +CONFIG += qt_example_installs diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index e9d5367ee1..29dd354a31 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -29,7 +29,6 @@ CONFIG += \ create_prl link_prl \ testcase_targets \ prepare_docs qt_docs_targets \ - qt_example_installs \ no_private_qt_headers_warning QTDIR_build \ # Qt modules get compiled without exceptions enabled by default. # However, testcases should be still built with exceptions. From 4315545f89b26a102bcbf68805e0360c731a9efd Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 30 Nov 2012 21:16:25 +0100 Subject: [PATCH 6/7] remove support for hand-written module pri files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit all modules have been migrated to auto-generation Change-Id: Ie7b3ebfd735a22f8e0b0339909b6385508d7a6b3 Reviewed-by: Joerg Bornemann Reviewed-by: Tor Arne Vestbø --- bin/syncqt | 15 +-------------- mkspecs/features/qt_module.prf | 10 ---------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/bin/syncqt b/bin/syncqt index a10117bf2e..896ee742c5 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -87,7 +87,7 @@ my $mkspecsdir = dirname(dirname($0)); normalizePath(\$mkspecsdir) if (defined $mkspecsdir); # will be defined based on the modules sync.profile -our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %modulepris, %explicitheaders, %deprecatedheaders); +our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %explicitheaders, %deprecatedheaders); our @qpa_headers = (); # global variables (modified by options) @@ -810,19 +810,6 @@ foreach my $lib (@modules_to_sync) { my $module_version = fileContents($project); $module_version = $qt_version unless ($module_version =~ s,.*^VERSION[ \t]*=[ \t]*(\S+).*,$1,sm); - # Backwards compatibility for modules with checked in .pri files. - if (defined $modulepris{$lib} and -e "$modulepris{$lib}") { - my $content = fileContents($modulepris{$lib}); - my @version_rows = grep(/QT\..*\.VERSION/, split('\n', $content)); - if(@version_rows) { - # We only pick the first one, since each module need a separate .pri file - $module_version = $version_rows[0]; - chomp $module_version; - $module_version =~ s/^\s*QT\..*\.VERSION\s*=\s*([^#]+).*$/$1/; - $module_version =~ s/\s+$//; - } - } - my $pathtoheaders = ""; $pathtoheaders = $moduleheaders{$lib} if ($moduleheaders{$lib}); diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index eb46481c70..0b6ad86ae1 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -35,14 +35,6 @@ else: \ MODULE_DEFINES = $$MODULE_DEFINE $$MODULE_DEFINES load(qt_build_paths) - -# This check will be removed soon. Weird indentation to avoid reindenting the code later. -!isEmpty(MODULE_PRI) { - !build_pass:warning("$$_PRO_FILE_ still sets MODULE_PRI. Not auto-generating module .pri file.") - MODULE_PRI = $$absolute_path($$MODULE_PRI, $$_PRO_FILE_PWD_) - exists($$MODULE_PRI)|error("Specified module pri file $$MODULE_PRI does not exist.") -} else { - MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri !build_pass { @@ -97,8 +89,6 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri } # !build_pass -} # isEmpty(MODULE_PRI) - load(qt_module_fwdpri) INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}.private_includes) From 9e9b98aeea11e75db5a93299d70439370398b553 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 1 Dec 2012 11:46:51 +0100 Subject: [PATCH 7/7] don't forget to export rpath_link{,_private} to the cache Change-Id: I1d204696ed0e4ef5e45dc1716b3d6a8224b3169b Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qt_module_fwdpri.prf | 1 + 1 file changed, 1 insertion(+) diff --git a/mkspecs/features/qt_module_fwdpri.prf b/mkspecs/features/qt_module_fwdpri.prf index b7270aea59..0b203b5a90 100644 --- a/mkspecs/features/qt_module_fwdpri.prf +++ b/mkspecs/features/qt_module_fwdpri.prf @@ -72,6 +72,7 @@ for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \ name depends private_depends module_config CONFIG DEFINES sources \ includes private_includes bins libs libexecs plugins imports qml \ + rpath_link rpath_link_private \ )):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient) cache(QT_CONFIG, transient)