AutoRcc: Make rcc parsing function private

The `.qrc` parsing functions in `cmQtAutoGen` are no longer needed outside
the private implementation of `cmQtAutoGen::RccLister`.  This makes them
private, too.
This commit is contained in:
Sebastian Holtermann
2019-04-05 21:34:42 +02:00
parent 521475b41b
commit 95de172b68
2 changed files with 9 additions and 31 deletions
+9 -15
View File
@@ -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;
}
-16
View File
@@ -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
*/