Autogen: Rename cmQtAutoGen::GeneratorType to cmQtAutogen::Generator

This commit is contained in:
Sebastian Holtermann
2017-09-12 10:10:31 +02:00
parent f6f1b22987
commit 5d3bca6485
5 changed files with 29 additions and 29 deletions

View File

@@ -246,22 +246,22 @@ static bool RccListInputsQt5(const std::string& rccCommand,
const std::string cmQtAutoGen::listSep = "@LSEP@";
const std::string& cmQtAutoGen::GeneratorName(GeneratorType type)
const std::string& cmQtAutoGen::GeneratorName(Generator type)
{
switch (type) {
case GeneratorType::GEN:
case Generator::GEN:
return genNameGen;
case GeneratorType::MOC:
case Generator::MOC:
return genNameMoc;
case GeneratorType::UIC:
case Generator::UIC:
return genNameUic;
case GeneratorType::RCC:
case Generator::RCC:
return genNameRcc;
}
return genNameGen;
}
std::string cmQtAutoGen::GeneratorNameUpper(GeneratorType genType)
std::string cmQtAutoGen::GeneratorNameUpper(Generator genType)
{
return cmSystemTools::UpperCase(cmQtAutoGen::GeneratorName(genType));
}

View File

@@ -16,7 +16,7 @@ class cmQtAutoGen
public:
static const std::string listSep;
enum GeneratorType
enum Generator
{
GEN, // General
MOC,
@@ -26,9 +26,9 @@ public:
public:
/// @brief Returns the generator name
static const std::string& GeneratorName(GeneratorType genType);
static const std::string& GeneratorName(Generator genType);
/// @brief Returns the generator name in upper case
static std::string GeneratorNameUpper(GeneratorType genType);
static std::string GeneratorNameUpper(Generator genType);
/// @brief Returns a the string escaped and enclosed in quotes
///

View File

@@ -204,7 +204,7 @@ static void AddDefinitionEscaped(
}
static bool AddToSourceGroup(cmMakefile* makefile, const std::string& fileName,
cmQtAutoGen::GeneratorType genType)
cmQtAutoGen::Generator genType)
{
cmSourceGroup* sourceGroup = nullptr;
// Acquire source group
@@ -263,7 +263,7 @@ static void AddCleanFile(cmMakefile* makefile, const std::string& fileName)
static void AddGeneratedSource(cmGeneratorTarget* target,
const std::string& filename,
cmQtAutoGen::GeneratorType genType)
cmQtAutoGen::Generator genType)
{
cmMakefile* makefile = target->Target->GetMakefile();
{

View File

@@ -2107,7 +2107,7 @@ void cmQtAutoGenerators::LogBold(std::string const& message) const
message.c_str(), true, this->ColorOutput);
}
void cmQtAutoGenerators::LogInfo(cmQtAutoGen::GeneratorType genType,
void cmQtAutoGenerators::LogInfo(cmQtAutoGen::Generator genType,
std::string const& message) const
{
std::string msg = cmQtAutoGen::GeneratorName(genType);
@@ -2119,7 +2119,7 @@ void cmQtAutoGenerators::LogInfo(cmQtAutoGen::GeneratorType genType,
cmSystemTools::Stdout(msg.c_str(), msg.size());
}
void cmQtAutoGenerators::LogWarning(cmQtAutoGen::GeneratorType genType,
void cmQtAutoGenerators::LogWarning(cmQtAutoGen::Generator genType,
std::string const& message) const
{
std::string msg = cmQtAutoGen::GeneratorName(genType);
@@ -2140,7 +2140,7 @@ void cmQtAutoGenerators::LogWarning(cmQtAutoGen::GeneratorType genType,
cmSystemTools::Stdout(msg.c_str(), msg.size());
}
void cmQtAutoGenerators::LogFileWarning(cmQtAutoGen::GeneratorType genType,
void cmQtAutoGenerators::LogFileWarning(cmQtAutoGen::Generator genType,
std::string const& filename,
std::string const& message) const
{
@@ -2152,7 +2152,7 @@ void cmQtAutoGenerators::LogFileWarning(cmQtAutoGen::GeneratorType genType,
this->LogWarning(genType, msg);
}
void cmQtAutoGenerators::LogError(cmQtAutoGen::GeneratorType genType,
void cmQtAutoGenerators::LogError(cmQtAutoGen::Generator genType,
std::string const& message) const
{
std::string msg;
@@ -2167,7 +2167,7 @@ void cmQtAutoGenerators::LogError(cmQtAutoGen::GeneratorType genType,
cmSystemTools::Stderr(msg.c_str(), msg.size());
}
void cmQtAutoGenerators::LogFileError(cmQtAutoGen::GeneratorType genType,
void cmQtAutoGenerators::LogFileError(cmQtAutoGen::Generator genType,
std::string const& filename,
std::string const& message) const
{
@@ -2180,7 +2180,7 @@ void cmQtAutoGenerators::LogFileError(cmQtAutoGen::GeneratorType genType,
}
void cmQtAutoGenerators::LogCommandError(
cmQtAutoGen::GeneratorType genType, std::string const& message,
cmQtAutoGen::Generator genType, std::string const& message,
std::vector<std::string> const& command, std::string const& output) const
{
std::string msg;
@@ -2210,8 +2210,8 @@ void cmQtAutoGenerators::LogCommandError(
* @brief Generates the parent directory of the given file on demand
* @return True on success
*/
bool cmQtAutoGenerators::MakeParentDirectory(
cmQtAutoGen::GeneratorType genType, std::string const& filename) const
bool cmQtAutoGenerators::MakeParentDirectory(cmQtAutoGen::Generator genType,
std::string const& filename) const
{
bool success = true;
std::string const dirName = cmSystemTools::GetFilenamePath(filename);
@@ -2238,7 +2238,7 @@ bool cmQtAutoGenerators::FileDiffers(std::string const& filename,
return differs;
}
bool cmQtAutoGenerators::FileWrite(cmQtAutoGen::GeneratorType genType,
bool cmQtAutoGenerators::FileWrite(cmQtAutoGen::Generator genType,
std::string const& filename,
std::string const& content)
{

View File

@@ -153,31 +153,31 @@ private:
// -- Log info
void LogBold(std::string const& message) const;
void LogInfo(cmQtAutoGen::GeneratorType genType,
void LogInfo(cmQtAutoGen::Generator genType,
std::string const& message) const;
// -- Log warning
void LogWarning(cmQtAutoGen::GeneratorType genType,
void LogWarning(cmQtAutoGen::Generator genType,
std::string const& message) const;
void LogFileWarning(cmQtAutoGen::GeneratorType genType,
void LogFileWarning(cmQtAutoGen::Generator genType,
std::string const& filename,
std::string const& message) const;
// -- Log error
void LogError(cmQtAutoGen::GeneratorType genType,
void LogError(cmQtAutoGen::Generator genType,
std::string const& message) const;
void LogFileError(cmQtAutoGen::GeneratorType genType,
void LogFileError(cmQtAutoGen::Generator genType,
std::string const& filename,
std::string const& message) const;
void LogCommandError(cmQtAutoGen::GeneratorType genType,
void LogCommandError(cmQtAutoGen::Generator genType,
std::string const& message,
std::vector<std::string> const& command,
std::string const& output) const;
// -- Utility
bool MakeParentDirectory(cmQtAutoGen::GeneratorType genType,
bool MakeParentDirectory(cmQtAutoGen::Generator genType,
std::string const& filename) const;
bool FileDiffers(std::string const& filename, std::string const& content);
bool FileWrite(cmQtAutoGen::GeneratorType genType,
std::string const& filename, std::string const& content);
bool FileWrite(cmQtAutoGen::Generator genType, std::string const& filename,
std::string const& content);
bool FindHeader(std::string& header, std::string const& testBasePath) const;
bool RunCommand(std::vector<std::string> const& command,
std::string& output) const;