diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 1b46377f84..cd1287cbed 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -313,8 +313,8 @@ set(SRCS cmQtAutoGen.h cmQtAutoGenerator.cxx cmQtAutoGenerator.h - cmQtAutoGeneratorInitializer.cxx - cmQtAutoGeneratorInitializer.h + cmQtAutoGenInitializer.cxx + cmQtAutoGenInitializer.h cmQtAutoGeneratorMocUic.cxx cmQtAutoGeneratorMocUic.h cmQtAutoGeneratorRcc.cxx diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index fd9b488e12..47a939068d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -33,7 +33,7 @@ #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmPolicies.h" -#include "cmQtAutoGeneratorInitializer.h" +#include "cmQtAutoGenInitializer.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmStateDirectory.h" @@ -1473,10 +1473,10 @@ bool cmGlobalGenerator::ComputeTargetDepends() return true; } -std::vector> +std::vector> cmGlobalGenerator::CreateQtAutoGenInitializers() { - std::vector> autogenInits; + std::vector> autogenInits; #ifdef CMAKE_BUILD_WITH_CMAKE for (cmLocalGenerator* localGen : this->LocalGenerators) { @@ -1506,13 +1506,13 @@ cmGlobalGenerator::CreateQtAutoGenInitializers() } std::string qtVersionMajor = - cmQtAutoGeneratorInitializer::GetQtMajorVersion(target); + cmQtAutoGenInitializer::GetQtMajorVersion(target); // don't do anything if there is no Qt4 or Qt5Core (which contains moc) if (qtVersionMajor != "4" && qtVersionMajor != "5") { continue; } - autogenInits.emplace_back(new cmQtAutoGeneratorInitializer( + autogenInits.emplace_back(new cmQtAutoGenInitializer( target, mocEnabled, uicEnabled, rccEnabled, qtVersionMajor)); } } diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 92e6a29097..3ebff82f1f 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -32,7 +32,7 @@ class cmLinkLineComputer; class cmLocalGenerator; class cmMakefile; class cmOutputConverter; -class cmQtAutoGeneratorInitializer; +class cmQtAutoGenInitializer; class cmSourceFile; class cmStateDirectory; class cmake; @@ -437,7 +437,7 @@ protected: virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const; // Qt auto generators - std::vector> + std::vector> CreateQtAutoGenInitializers(); std::string SelectMakeProgram(const std::string& makeProgram, diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx similarity index 98% rename from Source/cmQtAutoGeneratorInitializer.cxx rename to Source/cmQtAutoGenInitializer.cxx index 29f3653838..0b6798158b 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -1,7 +1,7 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmQtAutoGen.h" -#include "cmQtAutoGeneratorInitializer.h" +#include "cmQtAutoGenInitializer.h" #include "cmAlgorithms.h" #include "cmCustomCommand.h" @@ -226,7 +226,7 @@ static bool StaticLibraryCycle(cmGeneratorTarget const* targetOrigin, return cycle; } -cmQtAutoGeneratorInitializer::cmQtAutoGeneratorInitializer( +cmQtAutoGenInitializer::cmQtAutoGenInitializer( cmGeneratorTarget* target, bool mocEnabled, bool uicEnabled, bool rccEnabled, std::string const& qtVersionMajor) : Target(target) @@ -236,11 +236,11 @@ cmQtAutoGeneratorInitializer::cmQtAutoGeneratorInitializer( , QtVersionMajor(qtVersionMajor) , MultiConfig(MultiConfigT::WRAPPER) { - this->QtVersionMinor = cmQtAutoGeneratorInitializer::GetQtMinorVersion( - target, this->QtVersionMajor); + this->QtVersionMinor = + cmQtAutoGenInitializer::GetQtMinorVersion(target, this->QtVersionMajor); } -void cmQtAutoGeneratorInitializer::InitCustomTargets() +void cmQtAutoGenInitializer::InitCustomTargets() { cmMakefile* makefile = this->Target->Target->GetMakefile(); cmLocalGenerator* localGen = this->Target->GetLocalGenerator(); @@ -900,7 +900,7 @@ void cmQtAutoGeneratorInitializer::InitCustomTargets() } } -void cmQtAutoGeneratorInitializer::SetupCustomTargets() +void cmQtAutoGenInitializer::SetupCustomTargets() { cmMakefile* makefile = this->Target->Target->GetMakefile(); @@ -1072,7 +1072,7 @@ void cmQtAutoGeneratorInitializer::SetupCustomTargets() } } -void cmQtAutoGeneratorInitializer::SetupCustomTargetsMoc() +void cmQtAutoGenInitializer::SetupCustomTargetsMoc() { cmLocalGenerator* localGen = this->Target->GetLocalGenerator(); cmMakefile* makefile = this->Target->Target->GetMakefile(); @@ -1171,7 +1171,7 @@ void cmQtAutoGeneratorInitializer::SetupCustomTargetsMoc() } } -void cmQtAutoGeneratorInitializer::SetupCustomTargetsUic() +void cmQtAutoGenInitializer::SetupCustomTargetsUic() { cmMakefile* makefile = this->Target->Target->GetMakefile(); @@ -1289,7 +1289,7 @@ void cmQtAutoGeneratorInitializer::SetupCustomTargetsUic() } } -std::vector cmQtAutoGeneratorInitializer::AddGeneratedSource( +std::vector cmQtAutoGenInitializer::AddGeneratedSource( std::string const& filename, GeneratorT genType) { std::vector genFiles; @@ -1330,7 +1330,7 @@ std::vector cmQtAutoGeneratorInitializer::AddGeneratedSource( return genFiles; } -std::string cmQtAutoGeneratorInitializer::GetQtMajorVersion( +std::string cmQtAutoGenInitializer::GetQtMajorVersion( cmGeneratorTarget const* target) { cmMakefile* makefile = target->Target->GetMakefile(); @@ -1346,7 +1346,7 @@ std::string cmQtAutoGeneratorInitializer::GetQtMajorVersion( return qtMajor; } -std::string cmQtAutoGeneratorInitializer::GetQtMinorVersion( +std::string cmQtAutoGenInitializer::GetQtMinorVersion( cmGeneratorTarget const* target, std::string const& qtVersionMajor) { cmMakefile* makefile = target->Target->GetMakefile(); @@ -1366,7 +1366,7 @@ std::string cmQtAutoGeneratorInitializer::GetQtMinorVersion( return qtMinor; } -bool cmQtAutoGeneratorInitializer::QtVersionGreaterOrEqual( +bool cmQtAutoGenInitializer::QtVersionGreaterOrEqual( unsigned long requestMajor, unsigned long requestMinor) const { unsigned long majorUL(0); @@ -1382,9 +1382,9 @@ bool cmQtAutoGeneratorInitializer::QtVersionGreaterOrEqual( /// @brief Reads the resource files list from from a .qrc file /// @arg fileName Must be the absolute path of the .qrc file /// @return True if the rcc file was successfully read -bool cmQtAutoGeneratorInitializer::RccListInputs( - std::string const& fileName, std::vector& files, - std::string& error) +bool cmQtAutoGenInitializer::RccListInputs(std::string const& fileName, + std::vector& files, + std::string& error) { if (!cmSystemTools::FileExists(fileName.c_str())) { error = "rcc resource file does not exist:\n "; diff --git a/Source/cmQtAutoGeneratorInitializer.h b/Source/cmQtAutoGenInitializer.h similarity index 87% rename from Source/cmQtAutoGeneratorInitializer.h rename to Source/cmQtAutoGenInitializer.h index 05674372c3..a667017f53 100644 --- a/Source/cmQtAutoGeneratorInitializer.h +++ b/Source/cmQtAutoGenInitializer.h @@ -1,7 +1,7 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmQtAutoGeneratorInitializer_h -#define cmQtAutoGeneratorInitializer_h +#ifndef cmQtAutoGenInitializer_h +#define cmQtAutoGenInitializer_h #include "cmConfigure.h" // IWYU pragma: keep #include "cmQtAutoGen.h" @@ -14,7 +14,7 @@ class cmGeneratorTarget; /// @brief Initializes the QtAutoGen generators -class cmQtAutoGeneratorInitializer : public cmQtAutoGen +class cmQtAutoGenInitializer : public cmQtAutoGen { public: static std::string GetQtMajorVersion(cmGeneratorTarget const* target); @@ -44,9 +44,9 @@ public: }; public: - cmQtAutoGeneratorInitializer(cmGeneratorTarget* target, bool mocEnabled, - bool uicEnabled, bool rccEnabled, - std::string const& qtVersionMajor); + cmQtAutoGenInitializer(cmGeneratorTarget* target, bool mocEnabled, + bool uicEnabled, bool rccEnabled, + std::string const& qtVersionMajor); void InitCustomTargets(); void SetupCustomTargets();