aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Costa <miguel.costa@qt.io>2019-10-14 12:53:22 +0200
committerMiguel Costa <miguel.costa@qt.io>2019-10-14 13:33:50 +0000
commita22a16fe0066692c1f0c1f88bd4d096212654f7b (patch)
tree11a04f8e6867130dbe39bcf8705c2ec933b21192
parentd27ccf4d983bc407ce52b9fc73df9d682da1bcea (diff)
Fix menu option showing empty settings dialog
Fixed a problem where selecting the "Qt VS Tools" > "Qt Project Settings" main menu option would open a settings dialog with all fields cleared. This would happen with a project with the latest (V3) format. In this case, selecting the menu option will now open the VS project property page dialog. Task-number: QTVSADDINBUG-682 Change-Id: I039e9abdfe1b56a4ca1534b9e4e7d40a3fd92c39 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/qtvstools/QtMainMenu.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qtvstools/QtMainMenu.cs b/src/qtvstools/QtMainMenu.cs
index 4b23c1b2..8abb9141 100644
--- a/src/qtvstools/QtMainMenu.cs
+++ b/src/qtvstools/QtMainMenu.cs
@@ -171,7 +171,10 @@ namespace QtVsTools
case CommandId.QtProjectSettingsId:
{
var pro = HelperFunctions.GetSelectedQtProject(Vsix.Instance.Dte);
- if (pro != null) {
+ int projectVersion = QtProject.GetFormatVersion(pro);
+ if (projectVersion >= Resources.qtMinFormatVersion_Settings) {
+ Vsix.Instance.Dte.ExecuteCommand("Project.Properties");
+ } else if (pro != null) {
using (var formProjectQtSettings = new FormProjectQtSettings()) {
formProjectQtSettings.SetProject(pro);
formProjectQtSettings.StartPosition = FormStartPosition.CenterParent;