Require opt-out for using QLinkedList

Now that all QLinkedList uses are removed from Qt, make sure
QT_NO_LINKED_LIST is set by default for Qt modules, so new
modules don't need to explicitly specify it in their
.qmake.conf.

Modules can still opt out of the QLinkedList ban by adding
   DEFINES -= QT_NO_LINKED_LIST
to their .qmake.conf.

Change-Id: I34b7ab1c009795649bb7b4f1e7493556eafadd5a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Marc Mutz 2019-07-12 14:41:55 +02:00
parent 1563c38a4b
commit 213f7d1b1f
2 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,6 @@ load(qt_build_config)
CONFIG += warning_clean
DEFINES += QT_NO_JAVA_STYLE_ITERATORS
DEFINES += QT_NO_LINKED_LIST
QT_SOURCE_TREE = $$PWD
QT_BUILD_TREE = $$shadowed($$PWD)

View File

@ -108,6 +108,10 @@ macos: CONFIG += testcase_no_bundle
# Override MinGW's definition in _mingw.h
mingw: DEFINES += WINVER=0x0601 _WIN32_WINNT=0x0601
# By default, the following features should not be used in Qt's own
# implementation, so declare them invisible to Qt modules.
DEFINES += QT_NO_LINKED_LIST # QLinkedList
defineTest(qtBuildPart) {
bp = $$eval($$upper($$section(_QMAKE_CONF_, /, -2, -2))_BUILD_PARTS)
isEmpty(bp): bp = $$QT_BUILD_PARTS