From 9ce8281417d939628e4e2a725225e504efbe031c Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 15 Sep 2020 12:40:06 +0200 Subject: [PATCH] Fix tests to build in a no-widgets configuration The qfilesystemmodel.pro was recently moved to the gui tests subfolder, but it uses widgets inside. Skip it in a no-widgets build. Amends fb9ec8ad44decba7b2878370f3711b61614f035a Task-number: QTBUG-86187 Change-Id: I955556ffddad483d4c25602ae126b8c2433091b2 Reviewed-by: Volker Hilsheimer Reviewed-by: Qt CI Bot --- tests/auto/gui/itemmodels/CMakeLists.txt | 6 +++--- tests/auto/gui/itemmodels/itemmodels.pro | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/auto/gui/itemmodels/CMakeLists.txt b/tests/auto/gui/itemmodels/CMakeLists.txt index e1d3ad3f6b..69b6cb0e22 100644 --- a/tests/auto/gui/itemmodels/CMakeLists.txt +++ b/tests/auto/gui/itemmodels/CMakeLists.txt @@ -1,9 +1,9 @@ # Generated from itemmodels.pro. add_subdirectory(qstandarditem) -if(NOT MINGW) - add_subdirectory(qfilesystemmodel) -endif() if(TARGET Qt::Widgets) add_subdirectory(qstandarditemmodel) endif() +if(TARGET Qt::Widgets AND NOT MINGW) + add_subdirectory(qfilesystemmodel) +endif() diff --git a/tests/auto/gui/itemmodels/itemmodels.pro b/tests/auto/gui/itemmodels/itemmodels.pro index cde70aa2b2..58f6635e6a 100644 --- a/tests/auto/gui/itemmodels/itemmodels.pro +++ b/tests/auto/gui/itemmodels/itemmodels.pro @@ -6,5 +6,8 @@ SUBDIRS= \ mingw: SUBDIRS -= qfilesystemmodel # QTBUG-29403 -!qtHaveModule(widgets): SUBDIRS -= \ - qstandarditemmodel +!qtHaveModule(widgets) { + SUBDIRS -= \ + qfilesystemmodel \ + qstandarditemmodel +}