diff --git a/examples/webengine/quicknanobrowser/quicknanobrowser.pro b/examples/webengine/quicknanobrowser/quicknanobrowser.pro
index 6cf55698454d12488d86633b265fcfdce221edb8..5a27f5fd4c23af9167ef21eaf73e8e506bc05614 100644
--- a/examples/webengine/quicknanobrowser/quicknanobrowser.pro
+++ b/examples/webengine/quicknanobrowser/quicknanobrowser.pro
@@ -1,4 +1,4 @@
-requires(contains(QT_CONFIG, accessibility))
+requires(qtConfig(accessibility))
 
 TEMPLATE = app
 TARGET = quicknanobrowser
diff --git a/src/core/api/core_api.pro b/src/core/api/core_api.pro
index 6e2d606b2804a679ec42e2f50dfc777017fbf742..cb9d33087f23211e2d40b491052802e2be41fd8d 100644
--- a/src/core/api/core_api.pro
+++ b/src/core/api/core_api.pro
@@ -15,9 +15,9 @@ CONFIG -= create_prl
 # Copy this logic from qt_module.prf so that the intermediate library can be
 # created to the same rules as the final module linking in core_module.pro.
 !host_build:if(win32|mac):!macx-xcode {
-    contains(QT_CONFIG, simulator_and_device): CONFIG += simulator_and_device
-    contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
-    contains(QT_CONFIG, build_all):CONFIG += build_all
+    qtConfig(simulator_and_device): CONFIG += simulator_and_device
+    qtConfig(debug_and_release): CONFIG += debug_and_release
+    qtConfig(build_all): CONFIG += build_all
 }
 
 DEFINES += \
diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri
index a71d36c5344abe07c502f5b8577cf7c5775f2447..5e04701a0b23e03ce21f1d064a4d4232c1de9a5c 100644
--- a/src/core/config/linux.pri
+++ b/src/core/config/linux.pri
@@ -35,12 +35,12 @@ use?(nss) {
 
 gcc:!clang: greaterThan(QT_GCC_MAJOR_VERSION, 5): GYP_CONFIG += v8_no_delete_null_pointer_checks=1
 
-contains(QT_CONFIG, system-zlib): use?(system_minizip): GYP_CONFIG += use_system_zlib=1
-contains(QT_CONFIG, system-png): GYP_CONFIG += use_system_libpng=1
-contains(QT_CONFIG, system-jpeg): GYP_CONFIG += use_system_libjpeg=1
-contains(QT_CONFIG, system-harfbuzz): GYP_CONFIG += use_system_harfbuzz=1
+qtConfig(system-zlib): use?(system_minizip): GYP_CONFIG += use_system_zlib=1
+qtConfig(system-png): GYP_CONFIG += use_system_libpng=1
+qtConfig(system-jpeg): GYP_CONFIG += use_system_libjpeg=1
+qtConfig(system-harfbuzz): GYP_CONFIG += use_system_harfbuzz=1
 !contains(QT_CONFIG, pulseaudio): GYP_CONFIG += use_pulseaudio=0
-!contains(QT_CONFIG, glib): GYP_CONFIG += use_glib=0
+!qtConfig(glib): GYP_CONFIG += use_glib=0
 use?(system_libevent): GYP_CONFIG += use_system_libevent=1
 use?(system_libwebp):  GYP_CONFIG += use_system_libwebp=1
 use?(system_libsrtp):  GYP_CONFIG += use_system_libsrtp=1
diff --git a/src/core/config/windows.pri b/src/core/config/windows.pri
index ff86aea700757dfcc36c699dc6455da5a4461ff9..46dc6931a41b0356d4435119189a6be203f9ea70 100644
--- a/src/core/config/windows.pri
+++ b/src/core/config/windows.pri
@@ -17,7 +17,7 @@ GYP_ARGS += "-D perl_exe=\"perl.exe\" -D bison_exe=\"bison.exe\" -D gperf_exe=\"
 # Gyp's parallel processing is broken on Windows
 GYP_ARGS += "--no-parallel"
 
-contains(QT_CONFIG, angle) {
+qtConfig(angle) {
     CONFIG(release, debug|release) {
         GYP_ARGS += "-D qt_egl_library=\"libEGL.lib\" -D qt_glesv2_library=\"libGLESv2.lib\""
     } else {
diff --git a/src/core/core_gyp_generator.pro b/src/core/core_gyp_generator.pro
index 70644e5f6c0d652e7b982b90c53321437fca229c..b2cd7b6934660dcf77cb09366d67eceb57d6c3b7 100644
--- a/src/core/core_gyp_generator.pro
+++ b/src/core/core_gyp_generator.pro
@@ -25,8 +25,7 @@ RCC_DIR = $$OUT_PWD/$$getConfigDir()/.rcc
 # whenever we are cross compiling.
 cross_compile: DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES
 
-contains(QT_CONFIG, egl): CONFIG += egl
-else: DEFINES += QT_NO_EGL
+qtConfig(egl): CONFIG += egl
 
 RESOURCES += devtools.qrc
 
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index 3b9dab457ce17cee603baf4c50982a05ed76e8ff..65e46dcecbd4ef622558778ca8b0790c00927fe7 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -40,9 +40,9 @@ win32-msvc* {
 # and doesn't let Chromium get access to libc symbols through dlsym.
 CONFIG -= bsymbolic_functions
 
-contains(QT_CONFIG, egl): CONFIG += egl
+qtConfig(egl): CONFIG += egl
 
-linux: contains(QT_CONFIG, separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)"
+linux:qtConfig(separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)"
 
 REPACK_DIR = $$OUT_PWD/$$getConfigDir()/gen/repack
 # Duplicated from resources/resources.gyp
@@ -58,7 +58,7 @@ resources.files = $$REPACK_DIR/qtwebengine_resources.pak \
 icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
 
 !debug_and_release|!build_all|CONFIG(release, debug|release) {
-    contains(QT_CONFIG, qt_framework) {
+    qtConfig(framework) {
         locales.version = Versions
         locales.path = Resources/qtwebengine_locales
         resources.version = Versions
@@ -83,7 +83,7 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
         }
     }
 
-    !contains(QT_CONFIG, qt_framework):!force_independent {
+    !qtConfig(framework):!force_independent {
         #
         # Copy essential files to the qtbase build directory for non-prefix builds
         #
diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
index 2264d9b704ffc00c4042969eeec9413c03f9def8..ea911afda4c7ccadf05be09e7cc42e3da8822015 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -22,7 +22,7 @@ GYP_CONFIG += disable_glibcxx_debug=1
 !webcore_debug: GYP_CONFIG += remove_webcore_debug_symbols=1
 !v8base_debug: GYP_CONFIG += remove_v8base_debug_symbols=1
 
-linux:contains(QT_CONFIG, separate_debug_info): GYP_CONFIG += linux_dump_symbols=1
+linux:qtConfig(separate_debug_info): GYP_CONFIG += linux_dump_symbols=1
 
 force_debug_info {
     win32: GYP_CONFIG += win_release_extra_cflags=-Zi
@@ -34,9 +34,9 @@ force_debug_info {
 # Copy this logic from qt_module.prf so that ninja can run according
 # to the same rules as the final module linking in core_module.pro.
 !host_build:if(win32|mac):!macx-xcode {
-    contains(QT_CONFIG, simulator_and_device): CONFIG += simulator_and_device
-    contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
-    contains(QT_CONFIG, build_all):CONFIG += build_all
+    qtConfig(simulator_and_device): CONFIG += simulator_and_device
+    qtConfig(debug_and_release): CONFIG += debug_and_release
+    qtConfig(build_all): CONFIG += build_all
 }
 
 cross_compile {
@@ -124,7 +124,7 @@ contains(WEBENGINE_CONFIG, no_spellcheck): {
     osx: GYP_CONFIG += use_browser_spellchecker=1
 }
 
-!contains(QT_CONFIG, qt_framework): contains(QT_CONFIG, private_tests) {
+!qtConfig(framework):qtConfig(private_tests) {
     GYP_CONFIG += qt_install_data=\"$$[QT_INSTALL_DATA/get]\"
     GYP_CONFIG += qt_install_translations=\"$$[QT_INSTALL_TRANSLATIONS/get]\"
 }
diff --git a/src/process/process.pro b/src/process/process.pro
index cd60b1f912658def9fe42fbe745d1c5c122649d7..5e2e734f46c83f3ca58d6c901257e64973ce90a1 100644
--- a/src/process/process.pro
+++ b/src/process/process.pro
@@ -16,9 +16,9 @@ win32 {
 
 load(qt_app)
 
-contains(QT_CONFIG, build_all): CONFIG += build_all
+qtConfig(build_all): CONFIG += build_all
 
-contains(QT_CONFIG, qt_framework) {
+qtConfig(framework) {
     # Deploy the QtWebEngineProcess app bundle into the QtWebEngineCore framework.
     DESTDIR = $$MODULE_BASE_OUTDIR/lib/QtWebEngineCore.framework/Versions/5/Helpers
 } else {
@@ -28,7 +28,7 @@ contains(QT_CONFIG, qt_framework) {
 }
 msvc: QMAKE_LFLAGS *= /LARGEADDRESSAWARE
 
-contains(QT_CONFIG, qt_framework) {
+qtConfig(framework) {
     target.path = $$[QT_INSTALL_LIBS]/QtWebEngineCore.framework/Versions/5/Helpers
 } else {
     target.path = $$[QT_INSTALL_LIBEXECS]
diff --git a/tests/quicktestbrowser/quicktestbrowser.pro b/tests/quicktestbrowser/quicktestbrowser.pro
index 996e82a63dfc4b65dd49106df25b4c25f7cb27ef..b4fb9a58d59c75a230316b33bba3676ca61a87f5 100644
--- a/tests/quicktestbrowser/quicktestbrowser.pro
+++ b/tests/quicktestbrowser/quicktestbrowser.pro
@@ -1,4 +1,4 @@
-requires(contains(QT_CONFIG, accessibility))
+requires(qtConfig(accessibility))
 
 TEMPLATE = app
 TARGET = quicktestbrowser
diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf
index 9663c10721b4ef841fa39935b86df73738eefd58..597a6d9d38bf1f1d4b9c0a1090e3b5203c28b484 100644
--- a/tools/qmake/mkspecs/features/configure.prf
+++ b/tools/qmake/mkspecs/features/configure.prf
@@ -24,10 +24,10 @@ defineTest(runConfigure) {
         !config_khr:skipBuild("khronos development headers appear to be missing (mesa/libegl1-mesa-dev)")
 
         REQUIRED_PACKAGES = dbus-1 fontconfig
-        !cross_compile: contains(QT_CONFIG, xcb): REQUIRED_PACKAGES += libdrm xcomposite xcursor xi xrandr xscrnsaver xtst
+        !cross_compile: qtConfig(xcb): REQUIRED_PACKAGES += libdrm xcomposite xcursor xi xrandr xscrnsaver xtst
         contains(QT_CONFIG, pulseaudio): REQUIRED_PACKAGES += libpulse
-        contains(QT_CONFIG, system-png): REQUIRED_PACKAGES += libpng
-        contains(QT_CONFIG, system-harfbuzz): REQUIRED_PACKAGES += harfbuzz
+        qtConfig(system-png): REQUIRED_PACKAGES += libpng
+        qtConfig(system-harfbuzz): REQUIRED_PACKAGES += harfbuzz
         !cross_compile: REQUIRED_PACKAGES += libpci
 
         for(package, $$list($$REQUIRED_PACKAGES)) {
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index c8c8e0cc8a47c7ccda8cf43b5e81dcce55ddd30b..590d521e852e5f53cb392b18ba22378ebd794437 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -50,7 +50,7 @@ defineTest(isPlatformSupported) {
     skipBuild("C++11 support is required in order to build chromium.")
     return(false)
   }
-  contains(QT_CONFIG, mirclient) {
+  qtConfig(mirclient) {
     skipBuild("Mir is not yet supported as graphics backend for Qt WebEngine.")
     return(false)
   }
@@ -90,7 +90,7 @@ defineTest(isGCCVersionSupported) {
 }
 
 defineTest(isQMLTestSupportApiEnabled) {
-    contains(QT_CONFIG, private_tests): return(true) # enable for developer-build
+    qtConfig(private_tests): return(true) # enable for developer-build
     contains(QT_BUILD_PARTS, tests): return(true)
     contains(WEBENGINE_CONFIG, testsupport): return(true)
     return(false)