summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf1
-rwxr-xr-xconfigure1
-rw-r--r--mkspecs/features/qt_build_config.prf5
-rw-r--r--mkspecs/features/testcase.prf6
-rw-r--r--tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro1
-rw-r--r--tools/configure/configureapp.cpp2
6 files changed, 11 insertions, 5 deletions
diff --git a/.qmake.conf b/.qmake.conf
new file mode 100644
index 0000000000..42ba8e45fb
--- /dev/null
+++ b/.qmake.conf
@@ -0,0 +1 @@
+load(qt_build_config)
diff --git a/configure b/configure
index 684948e385..643b64024f 100755
--- a/configure
+++ b/configure
@@ -6114,7 +6114,6 @@ cat >>"$CACHEFILE.tmp" <<EOF
QT_SOURCE_TREE = \$\$quote($relpath)
QT_BUILD_TREE = \$\$quote($outpath)
-include(\$\$PWD/mkspecs/qmodule.pri)
CONFIG += fix_output_dirs no_private_qt_headers_warning QTDIR_build
EOF
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
index 6b412291bb..a2ad4429c1 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
@@ -15,5 +15,6 @@ mac {
}
}
-# Qt modules get compiled without exceptions enabled by default
-CONFIG += exceptions_off
+# Qt modules get compiled without exceptions enabled by default.
+# However, testcases should be still built with exceptions.
+CONFIG += exceptions_off testcase_exceptions
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf
index 64065018f3..faf4eeb124 100644
--- a/mkspecs/features/testcase.prf
+++ b/mkspecs/features/testcase.prf
@@ -1,5 +1,11 @@
have_target {
+# qt_build_config.prf disables execptions for all Qt modules which don't
+# explicitly turn it on again, while the qmake default is to build with
+# exceptions. As we want tests to be built like 3rd party applications,
+# qt_build_config tells us to re-enable exceptions here.
+testcase_exceptions: CONFIG += exceptions
+
check.files =
check.path = .
diff --git a/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro b/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro
index fa4e9a7602..76000ce7db 100644
--- a/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro
+++ b/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro
@@ -3,6 +3,7 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
+CONFIG += exceptions
TARGET = exceptionthrow
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index b7442ebc4e..81daecef2d 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -2670,8 +2670,6 @@ void Configure::generateCachefile()
if (cacheFile.open(QFile::WriteOnly | QFile::Text)) { // Truncates any existing file.
QTextStream cacheStream(&cacheFile);
- cacheStream << "include($$PWD/mkspecs/qmodule.pri)" << endl;
-
for (QStringList::Iterator var = qmakeVars.begin(); var != qmakeVars.end(); ++var) {
cacheStream << (*var) << endl;
}