diff --git a/tests/auto/cplusplus/ast/ast.pro b/tests/auto/cplusplus/ast/ast.pro
index 39fd14105de2e394305c223f6e76f6047eb139e0..84733f97e6f78c44972ef40bf488f2da594ce7fc 100644
--- a/tests/auto/cplusplus/ast/ast.pro
+++ b/tests/auto/cplusplus/ast/ast.pro
@@ -1,4 +1,5 @@
-load(qttest_p4)
+TEMPLATE = app
+CONFIG += qt warn_on console depend_includepath
+QT = core testlib
 include(../shared/shared.pri)
-QT = core
 SOURCES += tst_ast.cpp
diff --git a/tests/auto/cplusplus/semantic/semantic.pro b/tests/auto/cplusplus/semantic/semantic.pro
index 71a8b5fab5fdc5a2fb8b3d571b3a4a532b28f2dd..37c013685f73f42c40149e298869ce9563779e7b 100644
--- a/tests/auto/cplusplus/semantic/semantic.pro
+++ b/tests/auto/cplusplus/semantic/semantic.pro
@@ -1,5 +1,6 @@
-load(qttest_p4)
+TEMPLATE = app
+CONFIG += qt warn_on console depend_includepath
+QT = core testlib
 include(../shared/shared.pri)
-QT = core
 
 SOURCES += tst_semantic.cpp