diff --git a/configure.json b/configure.json
index f2cd78343703b8a2e8f94834c2f37f2978e57fd3..c8901235293af10f9c268f4db4975e60e649ee26 100644
--- a/configure.json
+++ b/configure.json
@@ -11,7 +11,7 @@
             "webengine-icu": { "type": "enum", "name": "system-icu", "values": { "system": "yes", "qt": "no" } },
             "ffmpeg": { "type": "enum", "name": "system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
             "opus": { "type": "enum", "name": "system-opus", "values": { "system": "yes", "qt": "no" } },
-            "webp": { "type": "enum", "name": "system-webp", "values": { "system": "yes", "qt": "no" } },
+            "webp": { "type": "enum", "name": "system-libwebp", "values": { "system": "yes", "qt": "no" } },
             "pepper-plugins": "boolean",
             "printing-and-pdf": "boolean",
             "proprietary-codecs": "boolean",
@@ -436,8 +436,9 @@
         "native-spellchecker": {
             "label": "Native Spellchecker",
             "purpose": "Provides a native spellchecker.",
-            "condition": "config.macos",
             "section": "WebEngine",
+            "autoDetect": false,
+            "condition": "config.macos && features.spellchecker",
             "output": [ "privateFeature" ]
         },
         "ui-delegates": {
@@ -461,7 +462,7 @@
             "condition": "config.unix && !config.darwin && libs.nss",
             "output": [ "privateFeature" ]
         },
-        "system-webp": {
+        "system-libwebp": {
             "label": "libwebp, libwebpmux and libwebpdemux",
             "autoDetect": "config.unix",
             "condition": "libs.webp",
@@ -476,7 +477,7 @@
         "system-ffmpeg": {
             "label": "ffmpeg",
             "autoDetect": false,
-            "condition": "libs.ffmpeg && features.system-opus && features.system-webp",
+            "condition": "libs.ffmpeg && features.system-opus && features.system-libwebp",
             "output": [ "privateFeature" ]
         },
         "system-icu": {
@@ -572,7 +573,7 @@
                    "entries": [
                         "system-re2",
                         "system-icu",
-                        "system-webp",
+                        "system-libwebp",
                         "system-opus",
                         "system-ffmpeg",
                         "system-libvpx",
diff --git a/examples/webenginewidgets/spellchecker/spellchecker.pro b/examples/webenginewidgets/spellchecker/spellchecker.pro
index c6031a36d727d102bd047696ebbc643fb07b54ef..4c7ad2c368ad487cc7cba08c852b7277707b5db5 100644
--- a/examples/webenginewidgets/spellchecker/spellchecker.pro
+++ b/examples/webenginewidgets/spellchecker/spellchecker.pro
@@ -1,9 +1,12 @@
+include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
+QT_FOR_CONFIG += webengine-private
+
 TEMPLATE = app
 TARGET = spellchecker
 QT += webenginewidgets
 CONFIG += c++11
 
-contains(WEBENGINE_CONFIG, use_native_spellchecker) {
+qtConfig(native-spellchecker) {
     error("Spellcheck example can not be built when using native OS dictionaries.")
 }
 
diff --git a/examples/webenginewidgets/webenginewidgets.pro b/examples/webenginewidgets/webenginewidgets.pro
index cb7c8aa220890ed5cf40994a0aae10ed27fc681f..63deb5854ed3e6306cc63361e0a19ce23c85966b 100644
--- a/examples/webenginewidgets/webenginewidgets.pro
+++ b/examples/webenginewidgets/webenginewidgets.pro
@@ -1,3 +1,6 @@
+include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
+QT_FOR_CONFIG += webengine-private
+
 TEMPLATE=subdirs
 
 SUBDIRS += \
@@ -12,10 +15,9 @@ SUBDIRS += \
 
 qtHaveModule(positioning): SUBDIRS += maps
 
-contains(WEBENGINE_CONFIG, use_spellchecker):!cross_compile {
-    !contains(WEBENGINE_CONFIG, use_native_spellchecker) {
-        SUBDIRS += spellchecker
-    } else {
-        message("Spellcheck example will not be built because it depends on usage of Hunspell dictionaries.")
-    }
+qtConfig(spellchecker):!qtConfig(native-spellchecker):!cross_compile {
+    SUBDIRS += spellchecker
+} else {
+    message("Spellcheck example will not be built because it depends on usage of Hunspell dictionaries.")
 }
+
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
index ed6fe6c1570b93694f6cf8ccfda30c40d01ac920..ed98827352d95b4c670fbf495ed42b6818f6bf92 100644
--- a/mkspecs/features/configure.prf
+++ b/mkspecs/features/configure.prf
@@ -4,7 +4,6 @@ load(functions)
 load(platform)
 
 defineTest(runConfigure) {
-    webengine_successfully_configured: return(true)
 
     !exists(src/3rdparty/chromium) {
         skipBuild("Submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.")
@@ -48,26 +47,6 @@ defineTest(runConfigure) {
         return(false)
     }
 
-    qtConfig(pepper-plugins): WEBENGINE_CONFIG += use_pepper_plugins
-    qtConfig(printing-and-pdf): WEBENGINE_CONFIG += use_printing use_pdf
-    qtConfig(proprietary-codecs): WEBENGINE_CONFIG += use_proprietary_codecs
-    qtConfig(spellchecker): WEBENGINE_CONFIG += use_spellchecker
-    qtConfig(webrtc): WEBENGINE_CONFIG += use_webrtc
-    qtConfig(embedded): WEBENGINE_CONFIG += embedded_build
-    qtConfig(system-webp): WEBENGINE_CONFIG += use_system_libwebp
-    qtConfig(system-opus): WEBENGINE_CONFIG += use_system_opus
-    qtConfig(system-ffmpeg): WEBENGINE_CONFIG += use_system_ffmpeg
-    qtConfig(system-icu): WEBENGINE_CONFIG += use_system_icu
-    qtConfig(system-re2): WEBENGINE_CONFIG += use_system_re2
-
-    !contains(WEBENGINE_CONFIG, use_system_libwebp): WEBENGINE_CONFIG += use_bundled_libwebp
-    !contains(WEBENGINE_CONFIG, use_system_opus): WEBENGINE_CONFIG += use_bundled_opus
-    !contains(WEBENGINE_CONFIG, use_system_ffmpeg): WEBENGINE_CONFIG += use_bundled_ffmpeg
-    !contains(WEBENGINE_CONFIG, use_system_icu): WEBENGINE_CONFIG += use_bundled_icu
-
-    qtConfig(appstore-compliant): WEBENGINE_CONFIG += use_appstore_compliant_code
-    optimize_size: WEBENGINE_CONFIG += reduce_binary_size
-
     sanitizer: !qtConfig(webengine-sanitizer) {
         skipBuild("Chosen sanitizer configuration is not supported. Use --feature-webengine-sanitizer=yes to force build with the chosen sanitizer configuration.")
         return(false);
@@ -93,9 +72,7 @@ defineTest(runConfigure) {
             }
          }
 
-        WEBENGINE_CONFIG += use_nss
-
-        !contains(WEBENGINE_CONFIG, embedded_build): qtConfig(xcb) {
+        !qtConfig(embedded): qtConfig(xcb) {
              for(package, $$list("libdrm xcomposite xcursor xi xrandr xtst")) {
                  !qtConfig(system-$$package) {
                      skipBuild("A suitable version of $$package could not be found.")
@@ -103,47 +80,6 @@ defineTest(runConfigure) {
                  }
              }
         }
-
-        # Fix me: mamke system-png a public feature in gui
-        qtConfig(system-png): qtConfig(webengine-system-png) {
-             WEBENGINE_CONFIG += use_system_libpng
-        }
-        # Fix me: make system-harfbuzz a public feautre in gui
-        qtConfig(system-harfbuzz): qtConfig(webengine-system-harfbuzz) {
-             WEBENGINE_CONFIG += use_system_harfbuzz
-        }
-        qtConfig(system-glib) {
-             WEBENGINE_CONFIG += use_glib
-        }
-        qtConfig(system-minizip) {
-             WEBENGINE_CONFIG += use_system_minizip
-        }
-        qtConfig(system-zlib) {
-             WEBENGINE_CONFIG += use_system_zlib
-        }
-        qtConfig(system-libxml2) {
-            WEBENGINE_CONFIG += use_system_libxslt use_system_libxml2
-        }
-
-        for(package, $$list("libevent jsoncpp protobuf libvpx libsrtp snappy")) {
-            qtConfig(system-$$package) {
-                WEBENGINE_CONFIG += use_system_$$package
-            } else {
-                WEBENGINE_CONFIG += use_bundled_$$package
-            }
-        }
-    }
-
-    isEmpty(skipBuildReason) {
-        cache(CONFIG, add, $$list(webengine_successfully_configured))
-        !isEmpty(WEBENGINE_CONFIG) {
-            cache(WEBENGINE_CONFIG, add, $$list($$WEBENGINE_CONFIG))
-            export(WEBENGINE_CONFIG)
-        }
-    }
-
-    macos:qtConfig(native-spellchecker) {
-        WEBENGINE_CONFIG+=use_native_spellchecker
     }
 }
 
diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
index 0074a27b009288af31a12e37ff474e27291d4f40..3f0d64ba5ee6f3176e4579c3c91c0e6746ebf55e 100644
--- a/mkspecs/features/functions.prf
+++ b/mkspecs/features/functions.prf
@@ -47,11 +47,6 @@ defineReplace(which) {
   return($$out)
 }
 
-defineTest(use?) {
-    contains(WEBENGINE_CONFIG, use_$$lower($$1)): return(true)
-    return(false)
-}
-
 # Returns the unquoted path to the python executable.
 defineReplace(pythonPath) {
     isEmpty(QMAKE_PYTHON2) {
@@ -88,7 +83,7 @@ defineReplace(gnPath) {
 
 defineReplace(gnArgs) {
     linux {
-        contains(WEBENGINE_CONFIG, embedded_build): include($$QTWEBENGINE_ROOT/src/core/config/embedded_linux.pri)
+        qtConfig(embedded): include($$QTWEBENGINE_ROOT/src/core/config/embedded_linux.pri)
         else: include($$QTWEBENGINE_ROOT/src/core/config/desktop_linux.pri)
     }
     macos: include($$QTWEBENGINE_ROOT/src/core/config/mac_osx.pri)
diff --git a/src/core/config/common.pri b/src/core/config/common.pri
index ce7364ff90d87fdb262bbe8d744737917cf7e473..2aa3c614dd5ca28d92c98210143931d105b127fc 100644
--- a/src/core/config/common.pri
+++ b/src/core/config/common.pri
@@ -13,37 +13,33 @@ gn_args += \
     treat_warnings_as_errors=false \
     enable_swiftshader=false
 
-use?(printing) {
+qtConfig(printing-and-pdf) {
     gn_args += enable_basic_printing=true enable_print_preview=true
-} else {
-    gn_args += enable_basic_printing=false enable_print_preview=false
-}
-
-use?(pdf) {
     gn_args += enable_pdf=true
 } else {
+    gn_args += enable_basic_printing=false enable_print_preview=false
     gn_args += enable_pdf=false
 }
 
-use?(pepper_plugins) {
+qtConfig(pepper-plugins) {
     gn_args += enable_plugins=true enable_widevine=true
 } else {
     gn_args += enable_plugins=false enable_widevine=false
 }
 
-use?(spellchecker) {
+qtConfig(spellchecker) {
     gn_args += enable_spellcheck=true
 } else {
     gn_args += enable_spellcheck=false
 }
 
-use?(webrtc) {
+qtConfig(webrtc) {
     gn_args += enable_webrtc=true
 } else {
     gn_args += enable_webrtc=false
 }
 
-use?(proprietary_codecs): gn_args += proprietary_codecs=true ffmpeg_branding=\"Chrome\"
+qtConfig(proprietary-codecs): gn_args += proprietary_codecs=true ffmpeg_branding=\"Chrome\"
 
 CONFIG(release, debug|release) {
     force_debug_info {
@@ -63,4 +59,4 @@ CONFIG(debug, debug|release) {
 !v8base_debug: gn_args += remove_v8base_debug_symbols=true
 
 # Compiling with -Os makes a huge difference in binary size
-contains(WEBENGINE_CONFIG, reduce_binary_size): gn_args += optimize_for_size=true
+optimize_size: gn_args += optimize_for_size=true
diff --git a/src/core/config/desktop_linux.pri b/src/core/config/desktop_linux.pri
index 4d3f923e1fc414a1ed020eaf119c338ff3d314c1..70f1cf81eb32ab55fecd4c19716a6afdce6e60a1 100644
--- a/src/core/config/desktop_linux.pri
+++ b/src/core/config/desktop_linux.pri
@@ -5,8 +5,4 @@ gn_args += \
     enable_session_service=false \
     toolkit_views=false
 
-use?(icecc) {
-    gn_args += use_debug_fission=false
-}
-
 !use_gold_linker: gn_args += use_gold=false
diff --git a/src/core/config/embedded_linux.pri b/src/core/config/embedded_linux.pri
index e48f1fc129fd21e1fb6cc2b7255efa517b80fc94..8d9f09deb84ea85c367c2984ff027b2537395e91 100644
--- a/src/core/config/embedded_linux.pri
+++ b/src/core/config/embedded_linux.pri
@@ -11,7 +11,3 @@ gn_args += \
     ozone_platform_external=true \
     ozone_platform=\"qt\" \
     toolkit_views=false
-
-use?(icecc) {
-    gn_args += use_debug_fission=false
-}
diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri
index c0f2f6289a199eea6611b021ba40d77eebbbd8be..fae1570607ccca540cb9ccb084db5344ebb994ff 100644
--- a/src/core/config/linux.pri
+++ b/src/core/config/linux.pri
@@ -8,17 +8,10 @@ gn_args += \
     use_gio=false \
     use_gnome_keyring=false \
     use_kerberos=false \
-    linux_use_bundled_binutils=false
+    linux_use_bundled_binutils=false \
+    use_nss_certs=true \
+    use_openssl_certs=false
 
-use?(nss) {
-    gn_args += \
-        use_nss_certs=true \
-        use_openssl_certs=false
-} else {
-    gn_args += \
-        use_nss_certs=false \
-        use_openssl_certs=true
-}
 gcc:!clang: greaterThan(QT_GCC_MAJOR_VERSION, 5): gn_args += no_delete_null_pointer_checks=true
 
 clang {
@@ -119,15 +112,20 @@ host_build {
         # Strip '>2 /dev/null' from $$pkgConfigExecutable()
         PKGCONFIG = $$first($$list($$pkgConfigExecutable()))
         gn_args += pkg_config=\"$$PKGCONFIG\"
-        gn_args += "host_pkg_config=\"pkg-config\""
+        gn_args += host_pkg_config=\"pkg-config\"
     }
 
-    qtConfig(system-zlib): use?(system_minizip): gn_args += use_system_zlib=true use_system_minizip=true
-    use?(system_libpng): gn_args += use_system_libpng=true
+    qtConfig(system-zlib): qtConfig(system-minizip): gn_args += use_system_zlib=true use_system_minizip=true
+
+    # FIXME: make system-png a public feature in gui
+    qtConfig(system-png): qtConfig(webengine-system-png): gn_args += use_system_libpng=true
+
     qtConfig(system-jpeg): gn_args += use_system_libjpeg=true
     qtConfig(system-freetype): gn_args += use_system_freetype=true
-    use?(system_harfbuzz): gn_args += use_system_harfbuzz=true
-    !use?(glib): gn_args += use_glib=false
+
+    # FIXME: make system-harfbuzz a public feautre in gui
+    qtConfig(system-harfbuzz): qtConfig(webengine-system-harfbuzz): gn_args += use_system_harfbuzz=true
+    qtConfig(system-glib): gn_args += use_glib=false
     qtConfig(pulseaudio) {
         gn_args += use_pulseaudio=true
     } else {
@@ -143,15 +141,18 @@ host_build {
     !packagesExist(libpci): gn_args += use_libpci=false
     !packagesExist(xscrnsaver): gn_args += use_xscrnsaver=false
 
-    use?(system_libevent): gn_args += use_system_libevent=true
-    use?(system_libwebp):  gn_args += use_system_libwebp=true
-    use?(system_libxslt):  gn_args += use_system_libxml=true use_system_libxslt=true
-    #use?(system_jsoncpp):  gn_args += use_system_jsoncpp=true
-    use?(system_opus):     gn_args += use_system_opus=true
-    use?(system_snappy):   gn_args += use_system_snappy=true
-    use?(system_libvpx):   gn_args += use_system_libvpx=true
-    use?(system_icu):      gn_args += use_system_icu=true icu_use_data_file=false
-    use?(system_ffmpeg):   gn_args += use_system_ffmpeg=true
-    use?(system_re2):      gn_args += use_system_re2=true
-    #use?(system_protobuf): gn_args += use_system_protobuf=true
+    qtConfig(system-libevent): gn_args += use_system_libevent=true
+    qtConfig(system-libwebp): gn_args += use_system_libwebp=true
+    qtConfig(system-libxml2): gn_args += use_system_libxml=true use_system_libxslt=true
+    qtConfig(system-opus): gn_args += use_system_opus=true
+    qtConfig(system-snappy):   gn_args += use_system_snappy=true
+    qtConfig(system-libvpx):   gn_args += use_system_libvpx=true
+    qtConfig(system-icu): gn_args += use_system_icu=true icu_use_data_file=false
+    qtConfig(system-ffmpeg): gn_args += use_system_ffmpeg=true
+    qtConfig(system-re2):      gn_args += use_system_re2=true
+
+    # FIXME:
+    #qtConfig(system-protobuf): gn_args += use_system_protobuf=true
+    #qtConfig(system-jsoncpp):  gn_args += use_system_jsoncpp=true
+    #qtConfig(system-libsrtp: gn_args += use_system_libsrtp=true
 }
diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri
index ddb397565eb0876fbc1554e6e46386efc8081b40..57f301f18653904745e65ae84137b96e9384104d 100644
--- a/src/core/config/mac_osx.pri
+++ b/src/core/config/mac_osx.pri
@@ -32,9 +32,9 @@ gn_args += \
     toolkit_views=false \
     use_external_popup_menu=false
 
-use?(spellchecker) {
-    use?(native_spellchecker): gn_args += use_browser_spellchecker=true
+qtConfig(spellchecker) {
+    qtConfig(native-spellchecker): gn_args += use_browser_spellchecker=true
     else: gn_args += use_browser_spellchecker=false
 } else {
-    macos: gn_args += use_browser_spellchecker=false
+    gn_args += use_browser_spellchecker=false
 }
diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri
index b7646983392200272b4221ffc391d404810ba47a..71f74f51a3d9ef845208b4e0129ca5a48427d9b4 100644
--- a/src/core/core_chromium.pri
+++ b/src/core/core_chromium.pri
@@ -28,7 +28,7 @@ RCC_DIR = $$OUT_PWD/$$getConfigDir()/.rcc
 
 # Assume that we want mobile touch and low-end hardware behaviors
 # whenever we are cross compiling.
-contains(WEBENGINE_CONFIG, embedded_build): DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES
+qtConfig(embedded): DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES
 
 qtConfig(egl): CONFIG += egl
 
@@ -187,13 +187,8 @@ HEADERS = \
         web_engine_settings.h \
         web_event_factory.h
 
+qtConfig(pepper-plugins) {
 
-use?(pdf) {
-    SOURCES += pdfium_document_wrapper_qt.cpp
-    HEADERS += pdfium_document_wrapper_qt.h
-}
-
-use?(pepper_plugins) {
     SOURCES += \
         renderer_host/pepper/pepper_flash_browser_host_qt.cpp \
         renderer_host/pepper/pepper_host_factory_qt.cpp \
@@ -209,7 +204,8 @@ use?(pepper_plugins) {
         renderer/pepper/pepper_renderer_host_factory_qt.h
 }
 
-use?(printing) {
+qtConfig(printing-and-pdf) {
+
     SOURCES += \
         printing_message_filter_qt.cpp \
         print_view_manager_base_qt.cpp \
@@ -221,6 +217,10 @@ use?(printing) {
         print_view_manager_base_qt.h \
         print_view_manager_qt.h \
         renderer/print_web_view_helper_delegate_qt.h
+
+    # pdf sources
+    SOURCES += pdfium_document_wrapper_qt.cpp
+    HEADERS += pdfium_document_wrapper_qt.h
 }
 
 contains(QT_CONFIG, opengl) {
diff --git a/src/core/core_generator.pro b/src/core/core_generator.pro
index 916c211f9fe6d41be116f78ba9288ce27a5c764b..cbf126ddac1410b4125f4b4698b10cedc5d10a98 100644
--- a/src/core/core_generator.pro
+++ b/src/core/core_generator.pro
@@ -1,3 +1,6 @@
+include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
+QT_FOR_CONFIG += webengine-private
+
 include(core_gn_config.pri)
 
 TEMPLATE = lib
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index 1a5b66867c7d9d717d7db398be3af07ce863734f..55b20cda2a757b8057597d90a9e53989d99bbd8e 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -1,3 +1,6 @@
+include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
+QT_FOR_CONFIG += webengine-private
+
 MODULE = webenginecore
 
 include(core_common.pri)
@@ -110,7 +113,7 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
         resources.path = $$[QT_INSTALL_DATA]/resources
         INSTALLS += locales resources
 
-        !use?(system_icu) {
+        !qtConfig(system-icu) {
             icu.CONFIG += no_check_exist
             icu.path = $$[QT_INSTALL_DATA]/resources
             INSTALLS += icu
@@ -122,7 +125,7 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
         # Copy essential files to the qtbase build directory for non-prefix builds
         #
 
-        !use?(system_icu) {
+        !qtConfig(system-icu) {
             COPIES += icu
         }
 
diff --git a/src/src.pro b/src/src.pro
index fabead2a057dba58eda3032c45c8cc3f9cf8e24b..1cd23f9faa2f9e631385e922c531b96c60b5bc49 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -20,7 +20,7 @@ SUBDIRS += buildtools \
            plugins
 
 
-use?(spellchecker):!use?(native_spellchecker):!cross_compile {
+qtConfig(spellchecker):!qtConfig(native-spellchecker):!cross_compile {
     SUBDIRS += qwebengine_convert_dict
     qwebengine_convert_dict.subdir = tools/qwebengine_convert_dict
     qwebengine_convert_dict.depends = core
diff --git a/src/webengine/webengine.pro b/src/webengine/webengine.pro
index ac2727580f55bb85ac7062aba6fdb4ceaed7e55f..4b2170cbc2565c8aaf8c4c6d581d09c3e0c89d73 100644
--- a/src/webengine/webengine.pro
+++ b/src/webengine/webengine.pro
@@ -67,11 +67,11 @@ qtConfig(testsupport) {
     DEFINES += ENABLE_QML_TESTSUPPORT_API
 }
 
-contains(WEBENGINE_CONFIG, use_spellchecker) {
+qtConfig(spellchecker) {
     DEFINES += ENABLE_SPELLCHECK
 }
 
-use?(pdf) {
+qtConfig(printing-and-pdf) {
     DEFINES += ENABLE_PDF
 }
 
diff --git a/src/webenginewidgets/webenginewidgets.pro b/src/webenginewidgets/webenginewidgets.pro
index 10791a6ca443fcdba2dd579e70e48dd38ea7d113..a5c22e7be2bca215721a885b22b2ae466c0bb783 100644
--- a/src/webenginewidgets/webenginewidgets.pro
+++ b/src/webenginewidgets/webenginewidgets.pro
@@ -51,17 +51,14 @@ qtConfig(ui-delegates) {
     DEFINES += QT_UI_DELEGATES
 }
 
-contains(WEBENGINE_CONFIG, use_spellchecker) {
+qtConfig(spellchecker) {
     DEFINES += ENABLE_SPELLCHECK
 }
 
-use?(printing) {
+qtConfig(printing-and-pdf) {
     DEFINES += ENABLE_PRINTING
-    QT += printsupport
-}
-
-use?(pdf) {
     DEFINES += ENABLE_PDF
+    QT += printsupport
 }
 
 load(qt_module)
diff --git a/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro b/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro
index df9b3e1b7eed61487cba7060e7a2ee064c754d45..0f62ec21d6525f8c3f956d8eb3581dc0ed20bb8f 100644
--- a/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro
+++ b/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro
@@ -5,7 +5,7 @@ QT_PRIVATE += webengine-private gui-private
 
 HEADERS += ../shared/util.h
 
-use?(pdf) {
+qtConfig(printing-and-pdf) {
     DEFINES += ENABLE_PDF
 }
 
diff --git a/tests/auto/widgets/qwebenginepage/qwebenginepage.pro b/tests/auto/widgets/qwebenginepage/qwebenginepage.pro
index e0765736e6cfcd76e77caed2da1b1b976920c117..a2dbd4d70e0a84c1a957bcc892e81c8f123918fc 100644
--- a/tests/auto/widgets/qwebenginepage/qwebenginepage.pro
+++ b/tests/auto/widgets/qwebenginepage/qwebenginepage.pro
@@ -1,4 +1,4 @@
 include(../tests.pri)
 QT *= core-private
 
-contains(WEBENGINE_CONFIG, use_pdf): DEFINES+=QWEBENGINEPAGE_PDFPRINTINGENABLED
+qtConfig(printing-and-pdf): DEFINES+=QWEBENGINEPAGE_PDFPRINTINGENABLED
diff --git a/tests/auto/widgets/tests.pri b/tests/auto/widgets/tests.pri
index d77cd5af58b2a16df6ed25481e38a29ca088392d..dc0461e2ba33d6aac073e4754cf38b62238c19c4 100644
--- a/tests/auto/widgets/tests.pri
+++ b/tests/auto/widgets/tests.pri
@@ -1,3 +1,6 @@
+include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
+QT_FOR_CONFIG += webengine-private
+
 TEMPLATE = app
 
 CONFIG += testcase
diff --git a/tests/auto/widgets/widgets.pro b/tests/auto/widgets/widgets.pro
index 441eea0fae8aff04bfc857bf71e5369d55908b0f..60e5cc11fd1f189f61403d3866e3584f5e02bd9a 100644
--- a/tests/auto/widgets/widgets.pro
+++ b/tests/auto/widgets/widgets.pro
@@ -1,3 +1,6 @@
+include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
+QT_FOR_CONFIG += webengine-private
+
 TEMPLATE = subdirs
 
 SUBDIRS += \
@@ -14,8 +17,8 @@ SUBDIRS += \
     qwebenginesettings \
     qwebengineview
 
-contains(WEBENGINE_CONFIG, use_spellchecker):!cross_compile {
-    !contains(WEBENGINE_CONFIG, use_native_spellchecker) {
+qtConfig(spellchecker):!cross_compile {
+    !qtConfig(native-spellchecker) {
         SUBDIRS += qwebenginespellcheck
     } else {
         message("Spellcheck test will not be built because it depends on usage of Hunspell dictionaries.")