From 6b31416d6c9bdc8b89a918f217a6678cc6083fed Mon Sep 17 00:00:00 2001
From: Sebastian Holtermann <sebholt@xwmw.org>
Date: Tue, 14 Feb 2017 17:42:52 +0100
Subject: Autogen: Add GenerateAllAny flag test method

---
 Source/cmQtAutoGenerators.cxx | 5 ++---
 Source/cmQtAutoGenerators.h   | 6 ++++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 765cb74..df19a1c 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -479,8 +479,7 @@ void cmQtAutoGenerators::OldSettingsReadFile(
       // In case any setting changed remove the old settings file.
       // This triggers a full rebuild on the next run if the current
       // build is aborted before writing the current settings in the end.
-      if (this->GenerateAllMoc || this->GenerateAllUic ||
-          this->GenerateAllRcc) {
+      if (this->GenerateAllAny()) {
         cmSystemTools::RemoveFile(filename);
       }
     } else {
@@ -497,7 +496,7 @@ bool cmQtAutoGenerators::OldSettingsWriteFile(
 {
   bool success = true;
   // Only write if any setting changed
-  if (this->GenerateAllMoc || this->GenerateAllUic || this->GenerateAllRcc) {
+  if (this->GenerateAllAny()) {
     const std::string filename = OldSettingsFile(targetDirectory);
     cmsys::ofstream outfile;
     outfile.open(filename.c_str(), std::ios::trunc);
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index 8dd44f6..d442ec3 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -108,6 +108,12 @@ private:
                          std::multimap<std::string, std::string>& collisions);
   bool MakeParentDirectory(const std::string& filename);
 
+  bool GenerateAllAny()
+  {
+    return (this->GenerateAllMoc || this->GenerateAllRcc ||
+            this->GenerateAllUic);
+  }
+
   // - Target names
   std::string OriginTargetName;
   std::string AutogenTargetName;
-- 
cgit v0.12