aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2023-02-07 16:16:59 +0100
committerKarsten Heimrich <karsten.heimrich@qt.io>2023-02-23 14:29:50 +0000
commit219753233ee5d62113a54fd6d3627c936b54dc7f (patch)
treeda2fc392f37fa00b06497c685d4aff4756edb423
parent51e74ece53326e1c73659e161ae3b2a3b97260f5 (diff)
Remove unused GetPropertyDispId() and related class members
Change-Id: I48621d5e1331dd51d0f10b81a6cbb1bb77de956a Reviewed-by: Miguel Costa <miguel.costa@qt.io>
-rw-r--r--QtVsTools.Package/Package/DteEventsHandler.cs25
1 files changed, 0 insertions, 25 deletions
diff --git a/QtVsTools.Package/Package/DteEventsHandler.cs b/QtVsTools.Package/Package/DteEventsHandler.cs
index cc0de65d..541b3538 100644
--- a/QtVsTools.Package/Package/DteEventsHandler.cs
+++ b/QtVsTools.Package/Package/DteEventsHandler.cs
@@ -28,7 +28,6 @@
using System;
using System.Linq;
-using System.Runtime.InteropServices;
using EnvDTE;
using EnvDTE80;
using Microsoft.VisualStudio;
@@ -53,11 +52,6 @@ namespace QtVsTools
private readonly CommandEvents debugStartWithoutDebuggingEvents;
private readonly CommandEvents f1HelpEvents;
private WindowEvents windowEvents;
- private readonly int dispId_VCFileConfiguration_ExcludedFromBuild;
- private readonly int dispId_VCCLCompilerTool_UsePrecompiledHeader;
- private readonly int dispId_VCCLCompilerTool_PrecompiledHeaderThrough;
- private readonly int dispId_VCCLCompilerTool_PreprocessorDefinitions;
- private readonly int dispId_VCCLCompilerTool_AdditionalIncludeDirectories;
public DteEventsHandler(DTE _dte)
{
@@ -99,11 +93,6 @@ namespace QtVsTools
(int)VSConstants.VSStd97CmdID.F1Help);
f1HelpEvents.BeforeExecute += F1HelpEvents_BeforeExecute;
- dispId_VCFileConfiguration_ExcludedFromBuild = GetPropertyDispId(typeof(VCFileConfiguration), "ExcludedFromBuild");
- dispId_VCCLCompilerTool_UsePrecompiledHeader = GetPropertyDispId(typeof(VCCLCompilerTool), "UsePrecompiledHeader");
- dispId_VCCLCompilerTool_PrecompiledHeaderThrough = GetPropertyDispId(typeof(VCCLCompilerTool), "PrecompiledHeaderThrough");
- dispId_VCCLCompilerTool_PreprocessorDefinitions = GetPropertyDispId(typeof(VCCLCompilerTool), "PreprocessorDefinitions");
- dispId_VCCLCompilerTool_AdditionalIncludeDirectories = GetPropertyDispId(typeof(VCCLCompilerTool), "AdditionalIncludeDirectories");
InitializeVCProjects();
}
@@ -549,19 +538,5 @@ namespace QtVsTools
}
return null;
}
-
- /// <summary>
- /// Returns the COM DISPID of the given property.
- /// </summary>
- private static int GetPropertyDispId(Type type, string propertyName)
- {
- if (type.GetProperty(propertyName) is {} pi) {
- foreach (Attribute attribute in pi.GetCustomAttributes(true)) {
- if (attribute is DispIdAttribute dispIdAttribute)
- return dispIdAttribute.Value;
- }
- }
- return 0;
- }
}
}