Bladeren bron

Autogen: Generators: Make class static method a source static function

Sebastian Holtermann 8 jaren geleden
bovenliggende
commit
6c55755bdd
2 gewijzigde bestanden met toevoegingen van 20 en 21 verwijderingen
  1. 20 20
      Source/cmQtAutoGenerators.cxx
  2. 0 1
      Source/cmQtAutoGenerators.h

+ 20 - 20
Source/cmQtAutoGenerators.cxx

@@ -97,6 +97,25 @@ static bool ListContains(const std::vector<std::string>& list,
   return (std::find(list.begin(), list.end(), entry) != list.end());
 }
 
+static std::string JoinExts(const std::vector<std::string>& lst)
+{
+  if (lst.empty()) {
+    return "";
+  }
+
+  std::string result;
+  std::string separator = ",";
+  for (std::vector<std::string>::const_iterator it = lst.begin();
+       it != lst.end(); ++it) {
+    if (it != lst.begin()) {
+      result += separator;
+    }
+    result += '.' + (*it);
+  }
+  result.erase(result.end() - 1);
+  return result;
+}
+
 static void UicMergeOptions(std::vector<std::string>& opts,
                             const std::vector<std::string>& fileOpts,
                             bool isQt5)
@@ -749,7 +768,7 @@ bool cmQtAutoGenerators::ParseContentForMoc(
           err << "AutoMoc: Error: " << absFilename << "\n"
               << "The file includes the moc file \"" << currentMoc
               << "\", but could not find header \"" << basename << '{'
-              << this->JoinExts(headerExtensions) << "}\" ";
+              << JoinExts(headerExtensions) << "}\" ";
           if (mocSubDir.empty()) {
             err << "in " << scannedFileAbsPath << "\n";
           } else {
@@ -1509,22 +1528,3 @@ bool cmQtAutoGenerators::MakeParentDirectory(const std::string& filename)
   }
   return success;
 }
-
-std::string cmQtAutoGenerators::JoinExts(const std::vector<std::string>& lst)
-{
-  if (lst.empty()) {
-    return "";
-  }
-
-  std::string result;
-  std::string separator = ",";
-  for (std::vector<std::string>::const_iterator it = lst.begin();
-       it != lst.end(); ++it) {
-    if (it != lst.begin()) {
-      result += separator;
-    }
-    result += '.' + (*it);
-  }
-  result.erase(result.end() - 1);
-  return result;
-}

+ 0 - 1
Source/cmQtAutoGenerators.h

@@ -106,7 +106,6 @@ private:
   bool NameCollisionTest(const std::map<std::string, std::string>& genFiles,
                          std::multimap<std::string, std::string>& collisions);
   bool MakeParentDirectory(const std::string& filename);
-  static std::string JoinExts(const std::vector<std::string>& lst);
 
   // - Target names
   std::string OriginTargetName;