summaryrefslogtreecommitdiff
path: root/Source/cmQtAutoGen.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-08-19 12:22:47 -0400
committerBrad King <brad.king@kitware.com>2021-08-19 12:23:16 -0400
commitd2a6e160aa74479fc623918b084423739a9b80c7 (patch)
tree2f70830294927051da466660fb28484d25f205f0 /Source/cmQtAutoGen.cxx
parent30dd9b33a048ec76fd48665f3793cf282cd75f12 (diff)
downloadcmake-d2a6e160aa74479fc623918b084423739a9b80c7.tar.gz
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
Diffstat (limited to 'Source/cmQtAutoGen.cxx')
-rw-r--r--Source/cmQtAutoGen.cxx36
1 files changed, 0 insertions, 36 deletions
diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx
index 898d862221..57fcd2da76 100644
--- a/Source/cmQtAutoGen.cxx
+++ b/Source/cmQtAutoGen.cxx
@@ -384,39 +384,3 @@ bool cmQtAutoGen::RccLister::list(std::string const& qrcFile,
}
return true;
}
-
-bool cmQtAutoGen::FileRead(std::string& content, std::string const& filename,
- std::string* error)
-{
- content.clear();
- if (!cmSystemTools::FileExists(filename, true)) {
- if (error != nullptr) {
- *error = "Not a file.";
- }
- return false;
- }
-
- unsigned long const length = cmSystemTools::FileLength(filename);
- cmsys::ifstream ifs(filename.c_str(), (std::ios::in | std::ios::binary));
-
- // Use lambda to save destructor calls of ifs
- return [&ifs, length, &content, error]() -> bool {
- if (!ifs) {
- if (error != nullptr) {
- *error = "Opening the file for reading failed.";
- }
- return false;
- }
- content.reserve(length);
- using IsIt = std::istreambuf_iterator<char>;
- content.assign(IsIt{ ifs }, IsIt{});
- if (!ifs) {
- content.clear();
- if (error != nullptr) {
- *error = "Reading from the file failed.";
- }
- return false;
- }
- return true;
- }();
-}