diff options
author | Miguel Costa <miguel.costa@qt.io> | 2017-12-13 12:21:07 +0100 |
---|---|---|
committer | Miguel Costa <miguel.costa@qt.io> | 2017-12-20 11:20:15 +0000 |
commit | 8c3cb9d9e3322b22fdd0f519299a02ca771cc5e3 (patch) | |
tree | 80ca4f7433c58a2af5838c5e4ce6bf81149e6dee | |
parent | 50450a049444b929781de33d66da4b9e5ee73692 (diff) |
Fix command line parser not working when adding moc file
Change-Id: I51acae97067da9ab1876fa53630393b89a4b551b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r-- | src/qtprojectlib/QtMsBuild.cs | 3 | ||||
-rw-r--r-- | src/qtprojectlib/QtProject.cs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/qtprojectlib/QtMsBuild.cs b/src/qtprojectlib/QtMsBuild.cs index f85b4562..19adb280 100644 --- a/src/qtprojectlib/QtMsBuild.cs +++ b/src/qtprojectlib/QtMsBuild.cs @@ -496,7 +496,8 @@ namespace QtProjectLib.QtMsBuild .FirstOrDefault(); if (!string.IsNullOrEmpty(execPath)) { var execDir = Path.GetDirectoryName(execPath); - qtDir = HelperFunctions.CanonicalPath(Path.Combine(execDir, "..")); + if (!string.IsNullOrEmpty(execDir)) + qtDir = HelperFunctions.CanonicalPath(Path.Combine(execDir, "..")); } string filePath = parser.PositionalArguments.Where( diff --git a/src/qtprojectlib/QtProject.cs b/src/qtprojectlib/QtProject.cs index 2c54bf35..2a19e3d5 100644 --- a/src/qtprojectlib/QtProject.cs +++ b/src/qtprojectlib/QtProject.cs @@ -1034,7 +1034,8 @@ namespace QtProjectLib } qtMsBuild.SetItemProperty(workConfig, QtMoc.Property.ExecutionDescription, description); - qtMsBuild.SetQtMocCommandLine(workConfig, defines + " " + includes); + qtMsBuild.SetQtMocCommandLine(workConfig, + QtMoc.ToolExecName + " " + defines + " " + includes); } void AddMocStepToConfiguration( |