diff options
-rw-r--r-- | Source/cmQtAutoGen.cxx | 24 | ||||
-rw-r--r-- | Source/cmQtAutoGen.h | 16 |
2 files changed, 9 insertions, 31 deletions
diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx index 9880c02..9918c35 100644 --- a/Source/cmQtAutoGen.cxx +++ b/Source/cmQtAutoGen.cxx @@ -240,8 +240,8 @@ void cmQtAutoGen::RccMergeOptions(std::vector<std::string>& baseOpts, MergeOptions(baseOpts, newOpts, valueOpts, isQt5); } -void cmQtAutoGen::RccListParseContent(std::string const& content, - std::vector<std::string>& files) +static void RccListParseContent(std::string const& content, + std::vector<std::string>& files) { cmsys::RegularExpression fileMatchRegex("(<file[^<]+)"); cmsys::RegularExpression fileReplaceRegex("(^<file[^>]*>)"); @@ -258,10 +258,10 @@ void cmQtAutoGen::RccListParseContent(std::string const& content, } } -bool cmQtAutoGen::RccListParseOutput(std::string const& rccStdOut, - std::string const& rccStdErr, - std::vector<std::string>& files, - std::string& error) +static bool RccListParseOutput(std::string const& rccStdOut, + std::string const& rccStdErr, + std::vector<std::string>& files, + std::string& error) { // Lambda to strip CR characters auto StripCR = [](std::string& line) { @@ -308,14 +308,6 @@ bool cmQtAutoGen::RccListParseOutput(std::string const& rccStdOut, return true; } -void cmQtAutoGen::RccListConvertFullPath(std::string const& qrcFileDir, - std::vector<std::string>& files) -{ - for (std::string& entry : files) { - entry = cmSystemTools::CollapseFullPath(entry, qrcFileDir); - } -} - cmQtAutoGen::RccLister::RccLister() = default; cmQtAutoGen::RccLister::RccLister(std::string rccExecutable, @@ -412,6 +404,8 @@ bool cmQtAutoGen::RccLister::list(std::string const& qrcFile, } // Convert relative paths to absolute paths - RccListConvertFullPath(fileDir, files); + for (std::string& entry : files) { + entry = cmSystemTools::CollapseFullPath(entry, fileDir); + } return true; } diff --git a/Source/cmQtAutoGen.h b/Source/cmQtAutoGen.h index 0faf6b3..3a346b5 100644 --- a/Source/cmQtAutoGen.h +++ b/Source/cmQtAutoGen.h @@ -85,22 +85,6 @@ public: std::vector<std::string> const& newOpts, bool isQt5); - /// @brief Parses the content of a qrc file - /// - /// Use when rcc does not support the "--list" option - static void RccListParseContent(std::string const& content, - std::vector<std::string>& files); - - /// @brief Parses the output of the "rcc --list ..." command - static bool RccListParseOutput(std::string const& rccStdOut, - std::string const& rccStdErr, - std::vector<std::string>& files, - std::string& error); - - /// @brief Converts relative qrc entry paths to full paths - static void RccListConvertFullPath(std::string const& qrcFileDir, - std::vector<std::string>& files); - /** @class RccLister * @brief Lists files in qrc resource files */ |