From 215f137e29ad9176fa1a5d4c446115379f5dbc0d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 1 Jul 2013 07:57:04 -0700 Subject: [PATCH 1/3] Restore header installation on Mac to always install to $includedir We haven't fully agreed on whether headers should be in $includedir or not for builds with frameworks, since frameworks carry their headers inside. However, this change came too late for Qt 5.1 for us to assess the potential impacts -- it's known to break at least the cmake files we ship. So restore the build to the way it was. This is a partial revert of 6d61dfdbb74a2055438b999c6962f89cc3388eea. Partial because the old behavior was partially broken: it did not install headers for release builds. Now we always install (and in debug-and-release mode, we might do it twice). Task-number: QTBUG-32134 Change-Id: Ib84879c5a148d3717d16a7a90b2f5735fb5d80be Reviewed-by: Sean Harmer Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll --- mkspecs/features/qt_module.prf | 1 - 1 file changed, 1 deletion(-) diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index da4de5fa1e5..53a5499545c 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -91,7 +91,6 @@ else: \ mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) { #QMAKE_FRAMEWORK_VERSION = 4.0 CONFIG += lib_bundle qt_framework - CONFIG -= qt_install_headers #no need to install these as well !debug_and_release|if(build_all:CONFIG(release, debug|release)) { FRAMEWORK_HEADERS.version = Versions FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES From de54d7bb2955356feb707fd1583840e090696625 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 28 Jun 2013 16:00:13 +0200 Subject: [PATCH 2/3] headersclean: process private modules correctly Change-Id: I51c8ee0db31b35e1d991411fe0b03da6665e9a84 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_headersclean.prf | 3 ++- tests/auto/other/headersclean/headersclean.pro | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/qt_headersclean.prf b/mkspecs/features/qt_headersclean.prf index 4128392997e..ab0a7226286 100644 --- a/mkspecs/features/qt_headersclean.prf +++ b/mkspecs/features/qt_headersclean.prf @@ -36,7 +36,8 @@ TARGET = tst_headersclean includes = for(q, QT) { - qn = $$eval(QT.$${q}.name) + sq = $$replace(q, -private\$, ) + qn = $$eval(QT.$${sq}.name) isEmpty(qn): \ QT -= $$q else: \ diff --git a/tests/auto/other/headersclean/headersclean.pro b/tests/auto/other/headersclean/headersclean.pro index 4965064b88d..73e0c5dd561 100644 --- a/tests/auto/other/headersclean/headersclean.pro +++ b/tests/auto/other/headersclean/headersclean.pro @@ -1,3 +1,3 @@ -QT = core concurrent network dbus xml sql testlib gui opengl widgets printsupport platformsupport +QT = core concurrent network dbus xml sql testlib gui opengl widgets printsupport platformsupport-private load(qt_headersclean) DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 From 68fd6878ab5f40ee00dad00e3f46f9a3368ef5d8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 28 Jun 2013 16:06:52 +0200 Subject: [PATCH 3/3] make requirement for -private suffix explicit if a private module was used without the suffix, it would not add any include paths, but the library would be still added. as long as the includes were written as , this would not become visible, as the public modules would add the common include path ... however, this soon won't be the case for mac frameworks any more. this change makes the problem visible early on. Change-Id: I8b1a20313ad736cb49507f07fa623e9aa812f651 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_functions.prf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index bbbb5d36a30..20074445b3e 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -62,6 +62,9 @@ defineTest(qtAddModule) { MODULE_CONFIG = $$eval(QT.$${1}.module_config) MODULE_MAJOR_VERSION = $$eval(QT.$${1}.MAJOR_VERSION) + isEmpty(MODULE_INCLUDES):!if(auto_use_privates|isEqual(2, UsePrivate)): \ + error("Module $$1 has no public API.") + qtProcessModuleFlags(CONFIG, QT.$${1}.CONFIG) qtProcessModuleFlags(DEFINES, QT.$${1}.DEFINES)