mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Convert plugin/manufacturer code errors to warnings
This commit is contained in:
parent
1dc4db581d
commit
768cf7a54c
4 changed files with 31 additions and 19 deletions
|
|
@ -826,6 +826,14 @@ void Project::updateJUCEPathWarning()
|
|||
}
|
||||
}
|
||||
|
||||
void Project::updateCodeWarning (Identifier identifier, String value)
|
||||
{
|
||||
if (value.length() != 4 || value.toStdString().size() != 4)
|
||||
addProjectMessage (identifier, {});
|
||||
else
|
||||
removeProjectMessage (identifier);
|
||||
}
|
||||
|
||||
void Project::updateModuleWarnings()
|
||||
{
|
||||
auto& modules = getEnabledModules();
|
||||
|
|
@ -1091,6 +1099,14 @@ void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& prope
|
|||
{
|
||||
updateModuleWarnings();
|
||||
}
|
||||
else if (property == Ids::pluginCode)
|
||||
{
|
||||
updateCodeWarning (ProjectMessages::Ids::pluginCodeInvalid, pluginCodeValue.get());
|
||||
}
|
||||
else if (property == Ids::pluginManufacturerCode)
|
||||
{
|
||||
updateCodeWarning (ProjectMessages::Ids::manufacturerCodeInvalid, pluginManufacturerCodeValue.get());
|
||||
}
|
||||
}
|
||||
|
||||
changed();
|
||||
|
|
@ -2578,8 +2594,10 @@ StringPairArray Project::getAudioPluginFlags() const
|
|||
uint32 hexRepresentation = 0;
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
hexRepresentation = (hexRepresentation << 8u)
|
||||
| (static_cast<unsigned int> (fourCharCode[i]) & 0xffu);
|
||||
{
|
||||
const auto character = (unsigned int) (i < fourCharCode.length() ? fourCharCode[i] : 0);
|
||||
hexRepresentation = (hexRepresentation << 8u) | (character & 0xffu);
|
||||
}
|
||||
|
||||
return "0x" + String::toHexString (static_cast<int> (hexRepresentation));
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue