Browse Source

Merge topic 'autogen_fix_use_after_move'

e32f70036c Autogen: Fix AUTOUIC segfault, when file includes colliding ui_*.h file

Acked-by: Kitware Robot <[email protected]>
Merge-request: !3745
Brad King 6 years ago
parent
commit
238be91529
2 changed files with 3 additions and 3 deletions
  1. 2 2
      Source/cmQtAutoMocUic.cxx
  2. 1 1
      Source/cmQtAutoMocUic.h

+ 2 - 2
Source/cmQtAutoMocUic.cxx

@@ -957,7 +957,7 @@ bool cmQtAutoMocUic::JobEvaluateT::UicEval(SourceFileMapT const& fileMap)
 }
 
 bool cmQtAutoMocUic::JobEvaluateT::UicEvalFile(
-  SourceFileHandleT sourceFileHandle)
+  SourceFileHandleT const& sourceFileHandle)
 {
   SourceFileT const& sourceFile = *sourceFileHandle;
   auto const& Include = sourceFile.ParseData->Uic.Include;
@@ -975,7 +975,7 @@ bool cmQtAutoMocUic::JobEvaluateT::UicEvalFile(
     }
     // Register mapping
     if (!UicRegisterMapping(incKey.Key, std::move(uiFileHandle),
-                            std::move(sourceFileHandle))) {
+                            sourceFileHandle)) {
       return false;
     }
   }

+ 1 - 1
Source/cmQtAutoMocUic.h

@@ -439,7 +439,7 @@ public:
 
     // -- Uic
     bool UicEval(SourceFileMapT const& fileMap);
-    bool UicEvalFile(SourceFileHandleT sourceFileHandle);
+    bool UicEvalFile(SourceFileHandleT const& sourceFileHandle);
     SourceFileHandleT UicFindIncludedUi(std::string const& sourceFile,
                                         std::string const& sourceDir,
                                         IncludeKeyT const& incKey) const;