[Cmake-commits] CMake branch, next, updated. v3.7.1-1590-gd393492

Brad King brad.king at kitware.com
Tue Dec 6 15:18:49 EST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  d3934925a02995e97af78199d9ff04a57aa737d6 (commit)
       via  5ff45960beaf4bc6a59d44fe1d0ab247e6db39dd (commit)
      from  aa1fb2f40605bb2cc359a04875126cb1c274ee63 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3934925a02995e97af78199d9ff04a57aa737d6
commit d3934925a02995e97af78199d9ff04a57aa737d6
Merge: aa1fb2f 5ff4596
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 6 15:18:46 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Dec 6 15:18:46 2016 -0500

    Merge topic 'QtAutogen_Contain' into next
    
    5ff45960 QtAutogen: Fix clang-tidy warnings


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ff45960beaf4bc6a59d44fe1d0ab247e6db39dd
commit 5ff45960beaf4bc6a59d44fe1d0ab247e6db39dd
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 6 15:17:11 2016 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Dec 6 15:17:11 2016 -0500

    QtAutogen: Fix clang-tidy warnings
    
    ```
    Source/cmQtAutoGeneratorInitializer.cxx:348:21: warning: the const qualified variable 'targetName' is copy-constructed from a const reference;
    Source/cmQtAutoGeneratorInitializer.cxx:356:5: warning: don't use else after return
    Source/cmQtAutoGenerators.cxx:186:12: warning: redundant boolean literal in conditional return statement
    ```

diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 70f92d8..f0847b1 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -345,7 +345,7 @@ static std::string RccGetExecutable(cmGeneratorTarget const* target,
 {
   cmLocalGenerator* lg = target->GetLocalGenerator();
 
-  const std::string targetName = target->GetName();
+  std::string const& targetName = target->GetName();
   if (qtMajorVersion == "5") {
     cmGeneratorTarget* qt5Rcc = lg->FindGeneratorTargetToUse("Qt5::rcc");
     if (!qt5Rcc) {
@@ -353,7 +353,8 @@ static std::string RccGetExecutable(cmGeneratorTarget const* target,
       return std::string();
     }
     return qt5Rcc->ImportedGetLocation("");
-  } else if (qtMajorVersion == "4") {
+  }
+  if (qtMajorVersion == "4") {
     cmGeneratorTarget* qt4Rcc = lg->FindGeneratorTargetToUse("Qt4::rcc");
     if (!qt4Rcc) {
       cmSystemTools::Error("Qt4::rcc target not found ", targetName.c_str());
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index da5811c..eb513e5 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -182,11 +182,7 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
       return false;
     }
   }
-  if (!this->WriteOldMocDefinitionsFile(targetDirectory)) {
-    return false;
-  }
-
-  return true;
+  return this->WriteOldMocDefinitionsFile(targetDirectory);
 }
 
 bool cmQtAutoGenerators::ReadAutogenInfoFile(

-----------------------------------------------------------------------

Summary of changes:
 Source/cmQtAutoGeneratorInitializer.cxx |    5 +++--
 Source/cmQtAutoGenerators.cxx           |    6 +-----
 2 files changed, 4 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list