mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
PluginDescription: Also check deprecatedUid when matching plugin identifier strings
This commit is contained in:
parent
36653e8b30
commit
327fc86ff2
1 changed files with 9 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue