Update comments and method names to not be Qt4 specific.
This commit is contained in:
parent
812dab067e
commit
74b9392eb9
|
@ -49,7 +49,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
|
||||||
{
|
{
|
||||||
cmMakefile* makefile = target->GetMakefile();
|
cmMakefile* makefile = target->GetMakefile();
|
||||||
const char* targetName = target->GetName();
|
const char* targetName = target->GetName();
|
||||||
// don't do anything if there is no Qt4:
|
// don't do anything if there is no Qt4 or Qt5SrcTools (which contains moc):
|
||||||
std::string qtMajorVersion = makefile->GetSafeDefinition("QT_VERSION_MAJOR");
|
std::string qtMajorVersion = makefile->GetSafeDefinition("QT_VERSION_MAJOR");
|
||||||
if (qtMajorVersion == "")
|
if (qtMajorVersion == "")
|
||||||
{
|
{
|
||||||
|
@ -176,7 +176,7 @@ bool cmQtAutomoc::Run(const char* targetDirectory)
|
||||||
|
|
||||||
if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5")
|
if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5")
|
||||||
{
|
{
|
||||||
this->RunAutomocQt4();
|
this->RunAutomoc();
|
||||||
}
|
}
|
||||||
|
|
||||||
this->WriteOldMocDefinitionsFile(targetDirectory);
|
this->WriteOldMocDefinitionsFile(targetDirectory);
|
||||||
|
@ -380,7 +380,7 @@ void cmQtAutomoc::Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool cmQtAutomoc::RunAutomocQt4()
|
bool cmQtAutomoc::RunAutomoc()
|
||||||
{
|
{
|
||||||
if (!cmsys::SystemTools::FileExists(this->OutMocCppFilename.c_str())
|
if (!cmsys::SystemTools::FileExists(this->OutMocCppFilename.c_str())
|
||||||
|| (this->OldMocDefinitionsStr != this->Join(this->MocDefinitions, ' ')))
|
|| (this->OldMocDefinitionsStr != this->Join(this->MocDefinitions, ' ')))
|
||||||
|
|
|
@ -35,7 +35,7 @@ private:
|
||||||
const char* targetDirectory);
|
const char* targetDirectory);
|
||||||
void WriteOldMocDefinitionsFile(const char* targetDirectory);
|
void WriteOldMocDefinitionsFile(const char* targetDirectory);
|
||||||
|
|
||||||
bool RunAutomocQt4();
|
bool RunAutomoc();
|
||||||
bool GenerateMoc(const std::string& sourceFile,
|
bool GenerateMoc(const std::string& sourceFile,
|
||||||
const std::string& mocFileName);
|
const std::string& mocFileName);
|
||||||
void ParseCppFile(const std::string& absFilename,
|
void ParseCppFile(const std::string& absFilename,
|
||||||
|
|
Loading…
Reference in New Issue