diff --git a/src/bluetooth/bluetooth.pro b/src/bluetooth/bluetooth.pro
index 604f4de868798c5efbcce596409923cfe83357bb..c771f237b5ff736a919cdfd112d74b028f83bb60 100644
--- a/src/bluetooth/bluetooth.pro
+++ b/src/bluetooth/bluetooth.pro
@@ -6,8 +6,6 @@ QT_PRIVATE = concurrent
 QMAKE_DOCS = $$PWD/doc/qtbluetooth.qdocconf
 OTHER_FILES += doc/src/*.qdoc   # show .qdoc files in Qt Creator
 
-load(qt_module)
-
 PUBLIC_HEADERS += \
     qbluetoothglobal.h \
     qbluetoothaddress.h\
@@ -81,7 +79,7 @@ SOURCES += \
     qlowenergyserviceprivate.cpp
 
 config_bluez:qtHaveModule(dbus) {
-    QT *= dbus
+    QT_FOR_PRIVATE += dbus
     DEFINES += QT_BLUEZ_BLUETOOTH
 
     include(bluez/bluez.pri)
@@ -118,7 +116,7 @@ config_bluez:qtHaveModule(dbus) {
 } else:android:!android-no-sdk {
     include(android/android.pri)
     DEFINES += QT_ANDROID_BLUETOOTH
-    QT += core-private androidextras
+    QT_FOR_PRIVATE += core-private androidextras
 
     ANDROID_PERMISSIONS = \
         android.permission.BLUETOOTH \
@@ -139,7 +137,7 @@ config_bluez:qtHaveModule(dbus) {
 
 } else:osx {
     DEFINES += QT_OSX_BLUETOOTH
-    LIBS += -framework Foundation -framework IOBluetooth
+    LIBS_PRIVATE += -framework Foundation -framework IOBluetooth
 
     include(osx/osxbt.pri)
     OBJECTIVE_SOURCES += \
@@ -174,7 +172,7 @@ config_bluez:qtHaveModule(dbus) {
     SOURCES -= qlowenergycontroller_p.cpp
 } else:ios|tvos {
     DEFINES += QT_IOS_BLUETOOTH
-    LIBS += -framework Foundation -framework CoreBluetooth
+    LIBS_PRIVATE += -framework Foundation -framework CoreBluetooth
 
     OBJECTIVE_SOURCES += \
         qbluetoothdevicediscoveryagent_ios.mm \
@@ -215,3 +213,5 @@ config_bluez:qtHaveModule(dbus) {
 OTHER_FILES +=
 
 HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS
+
+load(qt_module)
diff --git a/src/nfc/nfc.pro b/src/nfc/nfc.pro
index ef0c3708b62d1b626474e1a120ad3d8594ddbe53..a8621609f047c866937b82bb2863e3b85c1bb925 100644
--- a/src/nfc/nfc.pro
+++ b/src/nfc/nfc.pro
@@ -1,8 +1,6 @@
 TARGET = QtNfc
 QT = core
 
-load(qt_module)
-
 QMAKE_DOCS = $$PWD/doc/qtnfc.qdocconf
 OTHER_FILES += doc/src/*.qdoc   # show .qdoc files in Qt Creator
 
@@ -59,7 +57,7 @@ SOURCES += \
 linux:!android:qtHaveModule(dbus) {
     NFC_BACKEND_AVAILABLE = yes
 
-    QT += dbus
+    QT_PRIVATE += dbus
 
     DEFINES += NEARD_NFC
 
@@ -83,7 +81,7 @@ linux:!android:qtHaveModule(dbus) {
 } else:false { # Build for simulator backend is entirely broken
     NFC_BACKEND_AVAILABLE = yes
 
-    QT *= gui
+    QT_PRIVATE += gui
 
     PRIVATE_HEADERS += \
         qnearfieldmanagervirtualbase_p.h \
@@ -110,7 +108,7 @@ linux:!android:qtHaveModule(dbus) {
     ANDROID_JAR_DEPENDENCIES = \
         jar/QtNfc.jar:org.qtproject.qt5.android.nfc.QtNfc
     DEFINES += ANDROID_NFC
-    QT += core-private gui androidextras
+    QT_PRIVATE += core-private gui androidextras
 
     PRIVATE_HEADERS += \
         qllcpserver_android_p.h \
@@ -153,3 +151,5 @@ isEmpty(NFC_BACKEND_AVAILABLE) {
 }
 
 HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS
+
+load(qt_module)