From d2a6e160aa74479fc623918b084423739a9b80c7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 19 Aug 2021 12:22:47 -0400 Subject: AUTOUIC: Revert "Fix generating of dependency rules for UI header files" Revert commit e5ec0e52f4 (AUTOUIC: Fix generating of dependency rules for UI header files, 2021-07-22, v3.21.1~8^2) because it caused regressions. For example, changing one C++ source can now cause many others to rebuild. Revert the change pending further investigation. Fixes: #22531 Issue: #16776 --- Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt | 3 --- .../RerunUicOnFileChange/UicOnFileChange/CMakeLists.txt.in | 1 - Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/main.cpp | 4 +--- .../UicOnFileChange/subdir/mainwindowsubdir.ui.in | 7 ------- .../RerunUicOnFileChange/UicOnFileChange/subdir/subdircheck.cpp | 9 --------- 5 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/mainwindowsubdir.ui.in delete mode 100644 Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/subdircheck.cpp (limited to 'Tests/QtAutogen') diff --git a/Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt b/Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt index a3ba9fbd40..9b114e9be2 100644 --- a/Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt +++ b/Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt @@ -28,12 +28,10 @@ endmacro() configure_file("${testProjectTemplateDir}/mocwidget.h" "${testProjectSrc}/mocwidget.h" COPYONLY) configure_file("${testProjectTemplateDir}/mainwindow.h" "${testProjectSrc}/mainwindow.h" COPYONLY) configure_file("${testProjectTemplateDir}/main.cpp" "${testProjectSrc}/main.cpp" COPYONLY) -configure_file("${testProjectTemplateDir}/subdir/subdircheck.cpp" "${testProjectSrc}/subdir/subdircheck.cpp" COPYONLY) configure_file("${testProjectTemplateDir}/CMakeLists.txt.in" "${testProjectSrc}/CMakeLists.txt" @ONLY) set(Num 1) configure_file("${testProjectTemplateDir}/mainwindow.ui.in" "${testProjectSrc}/mainwindow.ui" @ONLY) -configure_file("${testProjectTemplateDir}/subdir/mainwindowsubdir.ui.in" "${testProjectSrc}/subdir/mainwindowsubdir.ui" @ONLY) if(CMAKE_GENERATOR_INSTANCE) set(_D_CMAKE_GENERATOR_INSTANCE "-DCMAKE_GENERATOR_INSTANCE=${CMAKE_GENERATOR_INSTANCE}") @@ -97,7 +95,6 @@ sleep() set(Num 2) configure_file("${testProjectTemplateDir}/mainwindow.ui.in" "${testProjectSrc}/mainwindow.ui" @ONLY) -configure_file("${testProjectTemplateDir}/subdir/mainwindowsubdir.ui.in" "${testProjectSrc}/subdir/mainwindowsubdir.ui" @ONLY) rebuild(2) execute_process(COMMAND "${testProjectBinDir}/${extra_bin_path}UicOnFileChange" RESULT_VARIABLE result) diff --git a/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/CMakeLists.txt.in b/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/CMakeLists.txt.in index c77075ca1e..c787db1d56 100644 --- a/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/CMakeLists.txt.in +++ b/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/CMakeLists.txt.in @@ -8,7 +8,6 @@ set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) add_executable(UicOnFileChange main.cpp mainwindow.ui mainwindow.h - subdir/subdircheck.cpp subdir/mainwindowsubdir.ui ) target_include_directories(UicOnFileChange PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" diff --git a/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/main.cpp b/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/main.cpp index 99de13dccf..4aab2ad4a2 100644 --- a/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/main.cpp +++ b/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/main.cpp @@ -1,12 +1,10 @@ #include "mainwindow.h" #include "ui_mainwindow.h" -extern bool subdircheck(); - int main(int argc, char* argv[]) { MocWidget mw; Ui::Widget mwUi; mwUi.setupUi(&mw); - return mw.objectName() == "Widget2" && subdircheck() ? 0 : 1; + return mw.objectName() == "Widget2" ? 0 : 1; } diff --git a/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/mainwindowsubdir.ui.in b/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/mainwindowsubdir.ui.in deleted file mode 100644 index a6a31f6d42..0000000000 --- a/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/mainwindowsubdir.ui.in +++ /dev/null @@ -1,7 +0,0 @@ - - - WidgetSubdir - - - - diff --git a/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/subdircheck.cpp b/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/subdircheck.cpp deleted file mode 100644 index 3b36a10df8..0000000000 --- a/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/subdircheck.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "ui_mainwindowsubdir.h" - -bool subdircheck() -{ - MocWidget mw; - Ui::WidgetSubdir mwUi; - mwUi.setupUi(&mw); - return mw.objectName() == "WidgetSubdir2"; -} -- cgit v1.2.1