From b7c6b670baf13cdf12b3ba93504e8df86e7b0af1 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 7 Aug 2023 22:44:55 +0200 Subject: [PATCH] tst_QMimeDatabase{Xml,Cache}: make the two siblings behave the same First include the common tst_qmimedatabase.cpp (and nothing else), then implement the differing tst_QMimeDatabase::initTestCaseInternal(). This will allow adding #undef QT_NO_FOREACH to tst_qmimedatabase.cpp in the next step. Pick-to: 6.6 6.5 Change-Id: Icc1890229e9443bd35c81d4f0440ba7df5da906c Reviewed-by: David Faure --- .../qmimedatabase-cache/tst_qmimedatabase-cache.cpp | 6 ------ .../qmimedatabase-xml/tst_qmimedatabase-xml.cpp | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp index 8a87d702349..b389d9c26fc 100644 --- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp @@ -1,12 +1,6 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 -#include "../tst_qmimedatabase.h" -#include -#include -#include -#include - #include "../tst_qmimedatabase.cpp" void tst_QMimeDatabase::initTestCaseInternal() diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp index 72a07595a5f..1fd9d818dd8 100644 --- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp @@ -1,11 +1,10 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 -#include "../tst_qmimedatabase.h" +#include "../tst_qmimedatabase.cpp" void tst_QMimeDatabase::initTestCaseInternal() { qputenv("QT_NO_MIME_CACHE", "1"); } -#include "../tst_qmimedatabase.cpp"