diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-19 22:21:20 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-19 22:30:16 (GMT) |
commit | a5b59fae15767be07fcc0c3750b706d3ed50f1f5 (patch) | |
tree | 4951330c0b052e0a854aaab1a9aa3cf3c92abd01 /Source/cmQtAutoGenerators.cxx | |
parent | fe401ede2a6d8eb845005d26487c96f42d8425fc (diff) | |
download | CMake-a5b59fae15767be07fcc0c3750b706d3ed50f1f5.zip CMake-a5b59fae15767be07fcc0c3750b706d3ed50f1f5.tar.gz CMake-a5b59fae15767be07fcc0c3750b706d3ed50f1f5.tar.bz2 |
QtAutogen: Create global generator on the stack.
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 7d389c0..d963f99 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1210,13 +1210,13 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory, cmake cm; cm.SetHomeOutputDirectory(targetDirectory); cm.SetHomeDirectory(targetDirectory); - cmGlobalGenerator* gg = new cmGlobalGenerator(); - gg->SetCMakeInstance(&cm); + cmGlobalGenerator gg; + gg.SetCMakeInstance(&cm); - cmLocalGenerator* lg = gg->MakeLocalGenerator(); + cmLocalGenerator* lg = gg.MakeLocalGenerator(); lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory); lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory); - gg->SetCurrentLocalGenerator(lg); + gg.SetCurrentLocalGenerator(lg); this->ReadAutogenInfoFile(lg->GetMakefile(), targetDirectory, config); this->ReadOldMocDefinitionsFile(lg->GetMakefile(), targetDirectory); @@ -1231,8 +1231,6 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory, this->WriteOldMocDefinitionsFile(targetDirectory); delete lg; - delete gg; - gg = NULL; return success; } |