Autogen: Generators: Rename GenerateFoo methods to FooGenerate

This commit is contained in:
Sebastian Holtermann
2017-01-11 15:08:24 +01:00
parent 06430919f4
commit edf0b8a52b
2 changed files with 30 additions and 29 deletions

View File

@@ -583,17 +583,17 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile)
// Generate files // Generate files
if (!this->MocExecutable.empty()) { if (!this->MocExecutable.empty()) {
if (!this->GenerateMocFiles(includedMocs, notIncludedMocs)) { if (!this->MocGenerateAll(includedMocs, notIncludedMocs)) {
return false; return false;
} }
} }
if (!this->UicExecutable.empty()) { if (!this->UicExecutable.empty()) {
if (!this->GenerateUiFiles(includedUis)) { if (!this->UicGenerateAll(includedUis)) {
return false; return false;
} }
} }
if (!this->RccExecutable.empty()) { if (!this->RccExecutable.empty()) {
if (!this->GenerateQrcFiles()) { if (!this->QrcGenerateAll()) {
return false; return false;
} }
} }
@@ -990,7 +990,7 @@ void cmQtAutoGenerators::ParseHeaders(
} }
} }
bool cmQtAutoGenerators::GenerateMocFiles( bool cmQtAutoGenerators::MocGenerateAll(
const std::map<std::string, std::string>& includedMocs, const std::map<std::string, std::string>& includedMocs,
const std::map<std::string, std::string>& notIncludedMocs) const std::map<std::string, std::string>& notIncludedMocs)
{ {
@@ -1020,7 +1020,7 @@ bool cmQtAutoGenerators::GenerateMocFiles(
for (std::map<std::string, std::string>::const_iterator it = for (std::map<std::string, std::string>::const_iterator it =
includedMocs.begin(); includedMocs.begin();
it != includedMocs.end(); ++it) { it != includedMocs.end(); ++it) {
if (!this->GenerateMoc(it->first, it->second, subDirPrefix)) { if (!this->MocGenerateFile(it->first, it->second, subDirPrefix)) {
if (this->RunMocFailed) { if (this->RunMocFailed) {
return false; return false;
} }
@@ -1035,7 +1035,7 @@ bool cmQtAutoGenerators::GenerateMocFiles(
for (std::map<std::string, std::string>::const_iterator it = for (std::map<std::string, std::string>::const_iterator it =
notIncludedMocs.begin(); notIncludedMocs.begin();
it != notIncludedMocs.end(); ++it) { it != notIncludedMocs.end(); ++it) {
if (this->GenerateMoc(it->first, it->second, subDirPrefix)) { if (this->MocGenerateFile(it->first, it->second, subDirPrefix)) {
automocCppChanged = true; automocCppChanged = true;
} else { } else {
if (this->RunMocFailed) { if (this->RunMocFailed) {
@@ -1114,9 +1114,9 @@ bool cmQtAutoGenerators::GenerateMocFiles(
/** /**
* @return True if a moc file was created. False may indicate an error. * @return True if a moc file was created. False may indicate an error.
*/ */
bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, bool cmQtAutoGenerators::MocGenerateFile(const std::string& sourceFile,
const std::string& mocFileName, const std::string& mocFileName,
const std::string& subDirPrefix) const std::string& subDirPrefix)
{ {
const std::string mocFileRel = const std::string mocFileRel =
this->AutogenBuildSubDir + subDirPrefix + mocFileName; this->AutogenBuildSubDir + subDirPrefix + mocFileName;
@@ -1176,7 +1176,7 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile,
return false; return false;
} }
bool cmQtAutoGenerators::GenerateUiFiles( bool cmQtAutoGenerators::UicGenerateAll(
const std::map<std::string, std::vector<std::string> >& includedUis) const std::map<std::string, std::vector<std::string> >& includedUis)
{ {
// single map with input / output names // single map with input / output names
@@ -1224,7 +1224,7 @@ bool cmQtAutoGenerators::GenerateUiFiles(
for (std::map<std::string, std::string>::const_iterator sit = for (std::map<std::string, std::string>::const_iterator sit =
it->second.begin(); it->second.begin();
sit != it->second.end(); ++sit) { sit != it->second.end(); ++sit) {
if (!this->GenerateUi(it->first, sit->first, sit->second)) { if (!this->UicGenerateFile(it->first, sit->first, sit->second)) {
if (this->RunUicFailed) { if (this->RunUicFailed) {
return false; return false;
} }
@@ -1238,9 +1238,9 @@ bool cmQtAutoGenerators::GenerateUiFiles(
/** /**
* @return True if a uic file was created. False may indicate an error. * @return True if a uic file was created. False may indicate an error.
*/ */
bool cmQtAutoGenerators::GenerateUi(const std::string& realName, bool cmQtAutoGenerators::UicGenerateFile(const std::string& realName,
const std::string& uiInputFile, const std::string& uiInputFile,
const std::string& uiOutputFile) const std::string& uiOutputFile)
{ {
const std::string uicFileRel = const std::string uicFileRel =
this->AutogenBuildSubDir + "include/" + uiOutputFile; this->AutogenBuildSubDir + "include/" + uiOutputFile;
@@ -1302,7 +1302,7 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& realName,
return false; return false;
} }
bool cmQtAutoGenerators::GenerateQrcFiles() bool cmQtAutoGenerators::QrcGenerateAll()
{ {
// generate single map with input / output names // generate single map with input / output names
std::map<std::string, std::string> qrcGenMap; std::map<std::string, std::string> qrcGenMap;
@@ -1335,7 +1335,7 @@ bool cmQtAutoGenerators::GenerateQrcFiles()
qrcGenMap.begin(); qrcGenMap.begin();
si != qrcGenMap.end(); ++si) { si != qrcGenMap.end(); ++si) {
bool unique = FileNameIsUnique(si->first, qrcGenMap); bool unique = FileNameIsUnique(si->first, qrcGenMap);
if (!this->GenerateQrc(si->first, si->second, unique)) { if (!this->QrcGenerateFile(si->first, si->second, unique)) {
if (this->RunRccFailed) { if (this->RunRccFailed) {
return false; return false;
} }
@@ -1347,9 +1347,9 @@ bool cmQtAutoGenerators::GenerateQrcFiles()
/** /**
* @return True if a rcc file was created. False may indicate an error. * @return True if a rcc file was created. False may indicate an error.
*/ */
bool cmQtAutoGenerators::GenerateQrc(const std::string& qrcInputFile, bool cmQtAutoGenerators::QrcGenerateFile(const std::string& qrcInputFile,
const std::string& qrcOutputFile, const std::string& qrcOutputFile,
bool unique_n) bool unique_n)
{ {
std::string symbolName = std::string symbolName =
cmsys::SystemTools::GetFilenameWithoutLastExtension(qrcInputFile); cmsys::SystemTools::GetFilenameWithoutLastExtension(qrcInputFile);

View File

@@ -72,23 +72,24 @@ private:
bool relaxed); bool relaxed);
// - Moc file generation // - Moc file generation
bool GenerateMocFiles( bool MocGenerateAll(
const std::map<std::string, std::string>& includedMocs, const std::map<std::string, std::string>& includedMocs,
const std::map<std::string, std::string>& notIncludedMocs); const std::map<std::string, std::string>& notIncludedMocs);
bool GenerateMoc(const std::string& sourceFile, bool MocGenerateFile(const std::string& sourceFile,
const std::string& mocFileName, const std::string& mocFileName,
const std::string& subDirPrefix); const std::string& subDirPrefix);
// - Uic file generation // - Uic file generation
bool GenerateUiFiles( bool UicGenerateAll(
const std::map<std::string, std::vector<std::string> >& includedUis); const std::map<std::string, std::vector<std::string> >& includedUis);
bool GenerateUi(const std::string& realName, const std::string& uiInputFile, bool UicGenerateFile(const std::string& realName,
const std::string& uiOutputFile); const std::string& uiInputFile,
const std::string& uiOutputFile);
// - Qrc file generation // - Qrc file generation
bool GenerateQrcFiles(); bool QrcGenerateAll();
bool GenerateQrc(const std::string& qrcInputFile, bool QrcGenerateFile(const std::string& qrcInputFile,
const std::string& qrcOutputFile, bool unique_n); const std::string& qrcOutputFile, bool unique_n);
// - Logging // - Logging
void LogErrorNameCollision( void LogErrorNameCollision(