Browse Source

PluginDescription: Also check deprecatedUid when matching plugin identifier strings

v6.1.6
reuk 4 years ago
parent
commit
327fc86ff2
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 9 additions and 4 deletions
  1. +9
    -4
      modules/juce_audio_processors/processors/juce_PluginDescription.cpp

+ 9
- 4
modules/juce_audio_processors/processors/juce_PluginDescription.cpp View File

@@ -36,20 +36,25 @@ bool PluginDescription::isDuplicateOf (const PluginDescription& other) const noe
return tie (*this) == tie (other);
}
static String getPluginDescSuffix (const PluginDescription& d)
static String getPluginDescSuffix (const PluginDescription& d, int uid)
{
return "-" + String::toHexString (d.fileOrIdentifier.hashCode())
+ "-" + String::toHexString (d.uniqueId);
+ "-" + String::toHexString (uid);
}
bool PluginDescription::matchesIdentifierString (const String& identifierString) const
{
return identifierString.endsWithIgnoreCase (getPluginDescSuffix (*this));
const auto matches = [&] (int uid)
{
return identifierString.endsWithIgnoreCase (getPluginDescSuffix (*this, uid));
};
return matches (uniqueId) || matches (deprecatedUid);
}
String PluginDescription::createIdentifierString() const
{
return pluginFormatName + "-" + name + getPluginDescSuffix (*this);
return pluginFormatName + "-" + name + getPluginDescSuffix (*this, uniqueId);
}
std::unique_ptr<XmlElement> PluginDescription::createXml() const


Loading…
Cancel
Save