Skip to content

Commit

Permalink
Merge pull request #4443 from MDoerner/ExtractContentHashFromQMN
Browse files Browse the repository at this point in the history
Remove content hash from the QMN
  • Loading branch information
retailcoder committed Oct 18, 2018
2 parents 050c0a7 + 16a406e commit 8d26793
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions Rubberduck.VBEEditor/QualifiedModuleName.cs
Expand Up @@ -48,22 +48,13 @@ public QualifiedModuleName(IVBProject project)
_projectName = project.Name;
ProjectPath = string.Empty;
ProjectId = GetProjectId(project);
ModuleContentHashOnCreation = GetContentHash(null);
}

public QualifiedModuleName(IVBComponent component)
{
ComponentType = component.Type;
_componentName = component.IsWrappingNullReference ? string.Empty : component.Name;

//note: We set this property in order to stabelize the component.
//For some reason, components sometimes seem to get removed on the COM side although
//an RCW is still holding a reference. For some reason, opening the CodeModule of a
//component seems to prevent this.
//This is a hack to open the code module on each component for which we get a QMN
//in a way that does not get optimized away.
ModuleContentHashOnCreation = GetContentHash(component);

using (var components = component.Collection)
{
using (var project = components.Parent)
Expand Down Expand Up @@ -96,7 +87,6 @@ public QualifiedModuleName(string projectName, string projectPath, string compon
ProjectId = "External" + $"{_projectName};{ProjectPath}".GetHashCode().ToString(CultureInfo.InvariantCulture);
_componentName = componentName;
ComponentType = ComponentType.ComComponent;
ModuleContentHashOnCreation = GetContentHash(null);
}

public QualifiedMemberName QualifyMemberName(string member)
Expand All @@ -118,7 +108,6 @@ public QualifiedMemberName QualifyMemberName(string member)
public string ProjectName => _projectName ?? string.Empty;

public string ProjectPath { get; }
public int ModuleContentHashOnCreation { get; }

public override string ToString()
{
Expand Down

0 comments on commit 8d26793

Please sign in to comment.