diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-06-25 17:18:26 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-26 11:51:34 +0200 |
commit | 34cb86d46b5cebed14bbb8c5e4143447025e9094 (patch) | |
tree | 8b52d50631c841871dfb3a6bd6e43aaca98d1401 | |
parent | 1cb7979e0b96514a277e0178340e84ff8f3a3b28 (diff) |
make using testlib automatically "promote" all modules to -private
autotests often need private headers (especially with qpa headers now
being private) and have no compatibility requirements, so it makes sense
to just use the privates of requested modules.
this also suppresses the useless warning about using privates, in case
they are still explicitly specified.
Change-Id: I9e499bedcf6ef25777283ff1432cef7254e9093a
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
-rw-r--r-- | mkspecs/features/qt.prf | 3 | ||||
-rw-r--r-- | mkspecs/features/qt_functions.prf | 2 | ||||
-rw-r--r-- | src/testlib/testlib.pro | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index c65be4c456..8af10b143d 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -149,6 +149,7 @@ for(QTLIB, QT) { NEWQT += $$eval(QT.$${QTLIBRAW}.private_depends) } NEWQT += $$QTLIBRAW + contains(QT.$${QTLIBRAW}.CONFIG, auto_use_privates): CONFIG += auto_use_privates } # Topological resolution of modules based on their QT.<module>.depends variable QT = $$resolve_depends(NEWQT, "QT.") @@ -170,7 +171,7 @@ for(QTLIB, QT) { } !isEmpty(BAD_QT):error("Unknown module(s) in QT: $$BAD_QT") -!isEmpty(using_privates):!no_private_qt_headers_warning:if(!debug_and_release|!build_pass) { +!isEmpty(using_privates):!auto_use_privates:!no_private_qt_headers_warning:if(!debug_and_release|!build_pass) { message("This project is using private headers and will therefore be tied to this specific Qt module build version.") message("Running this project against other versions of the Qt modules may crash at any arbitrary point.") message("This is not a bug, but a result of using Qt internals. You have been warned!") diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index dcd374b2ad..ce6d9e414b 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -51,7 +51,7 @@ defineTest(qtAddModule) { } INCLUDEPATH *= $$MODULE_INCLUDES - isEqual(2, UsePrivate) { # Tests function parameter 2 ($$2) being equal to 'UsePrivate' + auto_use_privates|isEqual(2, UsePrivate) { # Tests function parameter 2 ($$2) being equal to 'UsePrivate' # This adds both # <module privates include path>/ # and <module privates include path>/<module name> diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro index f77a611e25..b90171722c 100644 --- a/src/testlib/testlib.pro +++ b/src/testlib/testlib.pro @@ -4,7 +4,7 @@ TARGET = QtTest QT = core-private CONFIG += exceptions -MODULE_CONFIG = console testlib_defines +MODULE_CONFIG = console testlib_defines auto_use_privates INCLUDEPATH += . unix:!embedded:QMAKE_PKGCONFIG_DESCRIPTION = Qt \ |