QtAutogen: Remove the need for a local makefile variable.

This commit is contained in:
Stephen Kelly 2015-05-20 00:18:19 +02:00
parent 460e8fb9ad
commit c95a55ad5a
1 changed files with 3 additions and 6 deletions

View File

@ -1218,16 +1218,14 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory); lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory);
gg->SetCurrentLocalGenerator(lg); gg->SetCurrentLocalGenerator(lg);
cmMakefile* makefile = gg->GetCurrentLocalGenerator()->GetMakefile(); this->ReadAutogenInfoFile(lg->GetMakefile(), targetDirectory, config);
this->ReadOldMocDefinitionsFile(lg->GetMakefile(), targetDirectory);
this->ReadAutogenInfoFile(makefile, targetDirectory, config);
this->ReadOldMocDefinitionsFile(makefile, targetDirectory);
this->Init(); this->Init();
if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5") if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5")
{ {
success = this->RunAutogen(makefile); success = this->RunAutogen(lg->GetMakefile());
} }
this->WriteOldMocDefinitionsFile(targetDirectory); this->WriteOldMocDefinitionsFile(targetDirectory);
@ -1235,7 +1233,6 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
delete gg->GetCurrentLocalGenerator(); delete gg->GetCurrentLocalGenerator();
delete gg; delete gg;
gg = NULL; gg = NULL;
makefile = NULL;
return success; return success;
} }