diff --git a/tests/auto/gui/text/qcssparser/CMakeLists.txt b/tests/auto/gui/text/qcssparser/CMakeLists.txt index adb3e6269c9..058a42d68c5 100644 --- a/tests/auto/gui/text/qcssparser/CMakeLists.txt +++ b/tests/auto/gui/text/qcssparser/CMakeLists.txt @@ -14,8 +14,6 @@ list(APPEND test_data "testdata") qt_internal_add_test(tst_qcssparser SOURCES tst_qcssparser.cpp - DEFINES - SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\" PUBLIC_LIBRARIES Qt::Gui Qt::GuiPrivate diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp index 0af87353b6e..f51c0eab206 100644 --- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp +++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp @@ -90,7 +90,7 @@ void tst_QCssParser::scanner_data() #if defined(Q_OS_ANDROID) QDir d(":/"); #else - QDir d(SRCDIR); + QDir d(QT_TESTCASE_SOURCEDIR); #endif d.cd("testdata"); d.cd("scanner"); diff --git a/tests/auto/network/access/http2/CMakeLists.txt b/tests/auto/network/access/http2/CMakeLists.txt index 735f95deff8..5adee76cbb8 100644 --- a/tests/auto/network/access/http2/CMakeLists.txt +++ b/tests/auto/network/access/http2/CMakeLists.txt @@ -8,8 +8,6 @@ qt_internal_add_test(tst_http2 SOURCES http2srv.cpp http2srv.h tst_http2.cpp - DEFINES - SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\" PUBLIC_LIBRARIES Qt::CorePrivate Qt::Network diff --git a/tests/auto/network/access/http2/http2srv.cpp b/tests/auto/network/access/http2/http2srv.cpp index 932b11fbb67..bfd1ad4b80c 100644 --- a/tests/auto/network/access/http2/http2srv.cpp +++ b/tests/auto/network/access/http2/http2srv.cpp @@ -318,11 +318,11 @@ void Http2Server::incomingConnection(qintptr socketDescriptor) sslSocket->setProtocol(QSsl::TlsV1_2OrLater); connect(sslSocket, SIGNAL(sslErrors(QList)), this, SLOT(ignoreErrorSlot())); - QFile file(SRCDIR "certs/fluke.key"); + QFile file(QT_TESTCASE_SOURCEDIR "/certs/fluke.key"); file.open(QIODevice::ReadOnly); QSslKey key(file.readAll(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey); sslSocket->setPrivateKey(key); - auto localCert = QSslCertificate::fromPath(SRCDIR "certs/fluke.cert"); + auto localCert = QSslCertificate::fromPath(QT_TESTCASE_SOURCEDIR "/certs/fluke.cert"); sslSocket->setLocalCertificateChain(localCert); sslSocket->setSocketDescriptor(socketDescriptor, QAbstractSocket::ConnectedState); // Stop listening. diff --git a/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt index 6515645c052..043dd2b2a94 100644 --- a/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt +++ b/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt @@ -7,8 +7,6 @@ qt_internal_add_test(tst_qfiledialog SOURCES tst_qfiledialog.cpp - DEFINES - SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\" PUBLIC_LIBRARIES Qt::CorePrivate Qt::Gui diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp index 2fe9f9b00d4..e485fd6990d 100644 --- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp @@ -303,7 +303,7 @@ void tst_QFiledialog::filesSelectedSignal() { QFileDialog fd; fd.setViewMode(QFileDialog::List); - QDir testDir(SRCDIR); + QDir testDir(QT_TESTCASE_SOURCEDIR); fd.setDirectory(testDir); QFETCH(QFileDialog::FileMode, fileMode); fd.setFileMode(fileMode);