Browse Source

Autogen: Rename moc related variables

Sebastian Holtermann 8 years ago
parent
commit
25dbfbc2a9
2 changed files with 13 additions and 14 deletions
  1. 10 11
      Source/cmQtAutoGenerators.cxx
  2. 3 3
      Source/cmQtAutoGenerators.h

+ 10 - 11
Source/cmQtAutoGenerators.cxx

@@ -529,11 +529,10 @@ void cmQtAutoGenerators::Init()
   this->AutogenBuildSubDir = this->AutogenTargetName;
   this->AutogenBuildSubDir += "/";
 
-  this->OutMocCppFilenameRel = this->AutogenBuildSubDir;
-  this->OutMocCppFilenameRel += "moc_compilation.cpp";
+  this->MocCppFilenameRel = this->AutogenBuildSubDir;
+  this->MocCppFilenameRel += "moc_compilation.cpp";
 
-  this->OutMocCppFilenameAbs =
-    this->CurrentBinaryDir + this->OutMocCppFilenameRel;
+  this->MocCppFilenameAbs = this->CurrentBinaryDir + this->MocCppFilenameRel;
 
   // Init file path checksum generator
   fpathCheckSum.setupParentDirs(this->CurrentSourceDir, this->CurrentBinaryDir,
@@ -1125,12 +1124,12 @@ bool cmQtAutoGenerators::MocGenerateAll(
   // Check if we even need to update moc_compilation.cpp
   if (!automocCppChanged) {
     // compare contents of the moc_compilation.cpp file
-    const std::string oldContents = ReadAll(this->OutMocCppFilenameAbs);
+    const std::string oldContents = ReadAll(this->MocCppFilenameAbs);
     if (oldContents == automocSource) {
       // nothing changed: don't touch the moc_compilation.cpp file
       if (this->Verbose) {
         std::ostringstream err;
-        err << "AutoMoc: " << this->OutMocCppFilenameRel << " still up to date"
+        err << "AutoMoc: " << this->MocCppFilenameRel << " still up to date"
             << std::endl;
         this->LogInfo(err.str());
       }
@@ -1139,17 +1138,17 @@ bool cmQtAutoGenerators::MocGenerateAll(
   }
 
   // Actually write moc_compilation.cpp
-  this->LogBold("Generating MOC compilation " + this->OutMocCppFilenameRel);
+  this->LogBold("Generating MOC compilation " + this->MocCppFilenameRel);
 
   // Make sure the parent directory exists
-  bool success = this->MakeParentDirectory(this->OutMocCppFilenameAbs);
+  bool success = this->MakeParentDirectory(this->MocCppFilenameAbs);
   if (success) {
     cmsys::ofstream outfile;
-    outfile.open(this->OutMocCppFilenameAbs.c_str(), std::ios::trunc);
+    outfile.open(this->MocCppFilenameAbs.c_str(), std::ios::trunc);
     if (!outfile) {
       success = false;
       std::ostringstream err;
-      err << "AutoMoc: error opening " << this->OutMocCppFilenameAbs << "\n";
+      err << "AutoMoc: error opening " << this->MocCppFilenameAbs << "\n";
       this->LogError(err.str());
     } else {
       outfile << automocSource;
@@ -1157,7 +1156,7 @@ bool cmQtAutoGenerators::MocGenerateAll(
       if (!outfile.good()) {
         success = false;
         std::ostringstream err;
-        err << "AutoMoc: error writing " << this->OutMocCppFilenameAbs << "\n";
+        err << "AutoMoc: error writing " << this->MocCppFilenameAbs << "\n";
         this->LogError(err.str());
       }
     }

+ 3 - 3
Source/cmQtAutoGenerators.h

@@ -141,10 +141,10 @@ private:
   std::string SettingsStringUic;
   std::string SettingsStringRcc;
   // - Moc
-  std::vector<std::string> MocSkipList;
   std::string MocInfoIncludes;
-  std::string OutMocCppFilenameRel;
-  std::string OutMocCppFilenameAbs;
+  std::string MocCppFilenameRel;
+  std::string MocCppFilenameAbs;
+  std::vector<std::string> MocSkipList;
   std::vector<std::string> MocIncludes;
   std::vector<std::string> MocDefinitions;
   std::vector<std::string> MocOptions;