diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-01-11 12:56:13 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-01-12 23:00:43 (GMT) |
commit | 6c55755bdd54c2d474e2c8fe4c9d078e10404f26 (patch) | |
tree | dd2fb1526aafbc099e663bacc01a2fbf66de1c6f /Source | |
parent | 1491ab1c6626ed6a3b67e74b94fd18230e1bb4d4 (diff) | |
download | CMake-6c55755bdd54c2d474e2c8fe4c9d078e10404f26.zip CMake-6c55755bdd54c2d474e2c8fe4c9d078e10404f26.tar.gz CMake-6c55755bdd54c2d474e2c8fe4c9d078e10404f26.tar.bz2 |
Autogen: Generators: Make class static method a source static function
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 40 | ||||
-rw-r--r-- | Source/cmQtAutoGenerators.h | 1 |
2 files changed, 20 insertions, 21 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index ea55064..73afdc1 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/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; -} diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index ed17dcd..b9d670a 100644 --- a/Source/cmQtAutoGenerators.h +++ b/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; |