@@ -693,10 +693,10 @@ private: | |||||
class LiveBuildCodeEditorDocument : public SourceCodeDocument | class LiveBuildCodeEditorDocument : public SourceCodeDocument | ||||
{ | { | ||||
public: | public: | ||||
LiveBuildCodeEditorDocument (Project* project, const File& file) | |||||
: SourceCodeDocument (project, file) | |||||
LiveBuildCodeEditorDocument (Project* projectToUse, const File& file) | |||||
: SourceCodeDocument (projectToUse, file) | |||||
{ | { | ||||
if (project != nullptr) | |||||
if (projectToUse != nullptr) | |||||
if (CompileEngineChildProcess::Ptr childProcess = getChildProcess()) | if (CompileEngineChildProcess::Ptr childProcess = getChildProcess()) | ||||
childProcess->editorOpened (file, getCodeDocument()); | childProcess->editorOpened (file, getCodeDocument()); | ||||
} | } | ||||
@@ -234,11 +234,11 @@ public: | |||||
return vp->getProperties() ["contentClass"].toString(); | return vp->getProperties() ["contentClass"].toString(); | ||||
} | } | ||||
static void setViewportGenericComponentClass (Viewport* vp, const String& className) | |||||
static void setViewportGenericComponentClass (Viewport* vp, const String& name) | |||||
{ | { | ||||
if (className != getViewportGenericComponentClass (vp)) | |||||
if (name != getViewportGenericComponentClass (vp)) | |||||
{ | { | ||||
vp->getProperties().set ("contentClass", className); | |||||
vp->getProperties().set ("contentClass", name); | |||||
updateViewportContentComp (vp); | updateViewportContentComp (vp); | ||||
} | } | ||||
} | } | ||||
@@ -718,22 +718,22 @@ public: | |||||
openOrCloseAllSubGroups (*sub, false); | openOrCloseAllSubGroups (*sub, false); | ||||
} | } | ||||
static void openOrCloseAllSubGroups (TreeViewItem& item, bool shouldOpen) | |||||
static void openOrCloseAllSubGroups (TreeViewItem& treeItem, bool shouldOpen) | |||||
{ | { | ||||
item.setOpen (shouldOpen); | |||||
treeItem.setOpen (shouldOpen); | |||||
for (auto i = item.getNumSubItems(); --i >= 0;) | |||||
if (auto* sub = item.getSubItem (i)) | |||||
for (auto i = treeItem.getNumSubItems(); --i >= 0;) | |||||
if (auto* sub = treeItem.getSubItem (i)) | |||||
openOrCloseAllSubGroups (*sub, shouldOpen); | openOrCloseAllSubGroups (*sub, shouldOpen); | ||||
} | } | ||||
static void setFilesToCompile (Project::Item item, const bool shouldCompile) | |||||
static void setFilesToCompile (Project::Item projectItem, const bool shouldCompile) | |||||
{ | { | ||||
if (item.isFile() && (item.getFile().hasFileExtension (fileTypesToCompileByDefault))) | |||||
item.getShouldCompileValue() = shouldCompile; | |||||
if (projectItem.isFile() && (projectItem.getFile().hasFileExtension (fileTypesToCompileByDefault))) | |||||
projectItem.getShouldCompileValue() = shouldCompile; | |||||
for (auto i = item.getNumChildren(); --i >= 0;) | |||||
setFilesToCompile (item.getChild (i), shouldCompile); | |||||
for (auto i = projectItem.getNumChildren(); --i >= 0;) | |||||
setFilesToCompile (projectItem.getChild (i), shouldCompile); | |||||
} | } | ||||
void showPopupMenu() override | void showPopupMenu() override | ||||
@@ -86,10 +86,10 @@ public: | |||||
static const char* getDefaultActivityClass() { return "com.roli.juce.JuceActivity"; } | static const char* getDefaultActivityClass() { return "com.roli.juce.JuceActivity"; } | ||||
static const char* getDefaultApplicationClass() { return "com.roli.juce.JuceApp"; } | static const char* getDefaultApplicationClass() { return "com.roli.juce.JuceApp"; } | ||||
static AndroidProjectExporter* createForSettings (Project& project, const ValueTree& settings) | |||||
static AndroidProjectExporter* createForSettings (Project& projectToUse, const ValueTree& settingsToUse) | |||||
{ | { | ||||
if (settings.hasType (getValueTreeTypeName())) | |||||
return new AndroidProjectExporter (project, settings); | |||||
if (settingsToUse.hasType (getValueTreeTypeName())) | |||||
return new AndroidProjectExporter (projectToUse, settingsToUse); | |||||
return nullptr; | return nullptr; | ||||
} | } | ||||
@@ -1742,12 +1742,12 @@ private: | |||||
} | } | ||||
} | } | ||||
static XmlElement* getOrCreateChildWithName (XmlElement& element, const String& name) | |||||
static XmlElement* getOrCreateChildWithName (XmlElement& element, const String& childName) | |||||
{ | { | ||||
auto* child = element.getChildByName (name); | |||||
auto* child = element.getChildByName (childName); | |||||
if (child == nullptr) | if (child == nullptr) | ||||
child = element.createNewChildElement (name); | |||||
child = element.createNewChildElement (childName); | |||||
return child; | return child; | ||||
} | } | ||||
@@ -57,10 +57,10 @@ public: | |||||
static const char* getName() { return "CLion (beta)"; } | static const char* getName() { return "CLion (beta)"; } | ||||
static const char* getValueTreeTypeName() { return "CLION"; } | static const char* getValueTreeTypeName() { return "CLION"; } | ||||
static CLionProjectExporter* createForSettings (Project& project, const ValueTree& settings) | |||||
static CLionProjectExporter* createForSettings (Project& projectToUse, const ValueTree& settingsToUse) | |||||
{ | { | ||||
if (settings.hasType (getValueTreeTypeName())) | |||||
return new CLionProjectExporter (project, settings); | |||||
if (settingsToUse.hasType (getValueTreeTypeName())) | |||||
return new CLionProjectExporter (projectToUse, settingsToUse); | |||||
return nullptr; | return nullptr; | ||||
} | } | ||||
@@ -64,15 +64,15 @@ public: | |||||
} | } | ||||
//============================================================================== | //============================================================================== | ||||
static CodeBlocksProjectExporter* createForSettings (Project& project, const ValueTree& settings) | |||||
static CodeBlocksProjectExporter* createForSettings (Project& projectToUse, const ValueTree& settingsToUse) | |||||
{ | { | ||||
// this will also import legacy jucer files where CodeBlocks only worked for Windows, | // this will also import legacy jucer files where CodeBlocks only worked for Windows, | ||||
// had valueTreetTypeName "CODEBLOCKS", and there was no OS distinction | // had valueTreetTypeName "CODEBLOCKS", and there was no OS distinction | ||||
if (settings.hasType (getValueTreeTypeName (windowsTarget)) || settings.hasType ("CODEBLOCKS")) | |||||
return new CodeBlocksProjectExporter (project, settings, windowsTarget); | |||||
if (settingsToUse.hasType (getValueTreeTypeName (windowsTarget)) || settingsToUse.hasType ("CODEBLOCKS")) | |||||
return new CodeBlocksProjectExporter (projectToUse, settingsToUse, windowsTarget); | |||||
if (settings.hasType (getValueTreeTypeName (linuxTarget))) | |||||
return new CodeBlocksProjectExporter (project, settings, linuxTarget); | |||||
if (settingsToUse.hasType (getValueTreeTypeName (linuxTarget))) | |||||
return new CodeBlocksProjectExporter (projectToUse, settingsToUse, linuxTarget); | |||||
return nullptr; | return nullptr; | ||||
} | } | ||||
@@ -1464,16 +1464,16 @@ public: | |||||
} | } | ||||
} | } | ||||
static void writeRCValue (MemoryOutputStream& mo, const String& name, const String& value) | |||||
static void writeRCValue (MemoryOutputStream& mo, const String& n, const String& value) | |||||
{ | { | ||||
if (value.isNotEmpty()) | if (value.isNotEmpty()) | ||||
mo << " VALUE \"" << name << "\", \"" | |||||
mo << " VALUE \"" << n << "\", \"" | |||||
<< CppTokeniserFunctions::addEscapeChars (value) << "\\0\"" << newLine; | << CppTokeniserFunctions::addEscapeChars (value) << "\\0\"" << newLine; | ||||
} | } | ||||
static void createRCFile (const Project& project, const File& iconFile, const File& rcFile) | |||||
static void createRCFile (const Project& p, const File& iconFile, const File& rcFile) | |||||
{ | { | ||||
auto version = project.getVersionString(); | |||||
auto version = p.getVersionString(); | |||||
MemoryOutputStream mo; | MemoryOutputStream mo; | ||||
@@ -1493,12 +1493,12 @@ public: | |||||
<< " BLOCK \"040904E4\"" << newLine | << " BLOCK \"040904E4\"" << newLine | ||||
<< " BEGIN" << newLine; | << " BEGIN" << newLine; | ||||
writeRCValue (mo, "CompanyName", project.getCompanyNameString()); | |||||
writeRCValue (mo, "LegalCopyright", project.getCompanyCopyrightString()); | |||||
writeRCValue (mo, "FileDescription", project.getProjectNameString()); | |||||
writeRCValue (mo, "FileVersion", version); | |||||
writeRCValue (mo, "ProductName", project.getProjectNameString()); | |||||
writeRCValue (mo, "ProductVersion", version); | |||||
writeRCValue (mo, "CompanyName", p.getCompanyNameString()); | |||||
writeRCValue (mo, "LegalCopyright", p.getCompanyCopyrightString()); | |||||
writeRCValue (mo, "FileDescription", p.getProjectNameString()); | |||||
writeRCValue (mo, "FileVersion", version); | |||||
writeRCValue (mo, "ProductName", p.getProjectNameString()); | |||||
writeRCValue (mo, "ProductVersion", version); | |||||
mo << " END" << newLine | mo << " END" << newLine | ||||
<< " END" << newLine | << " END" << newLine | ||||
@@ -1872,10 +1872,10 @@ public: | |||||
String getDefaultWindowsTargetPlatformVersion() const override { return "8.1"; } | String getDefaultWindowsTargetPlatformVersion() const override { return "8.1"; } | ||||
static MSVCProjectExporterVC2013* createForSettings (Project& project, const ValueTree& settings) | |||||
static MSVCProjectExporterVC2013* createForSettings (Project& projectToUse, const ValueTree& settingsToUse) | |||||
{ | { | ||||
if (settings.hasType (getValueTreeTypeName())) | |||||
return new MSVCProjectExporterVC2013 (project, settings); | |||||
if (settingsToUse.hasType (getValueTreeTypeName())) | |||||
return new MSVCProjectExporterVC2013 (projectToUse, settingsToUse); | |||||
return nullptr; | return nullptr; | ||||
} | } | ||||
@@ -1917,10 +1917,10 @@ public: | |||||
String getDefaultToolset() const override { return "v140"; } | String getDefaultToolset() const override { return "v140"; } | ||||
String getDefaultWindowsTargetPlatformVersion() const override { return "8.1"; } | String getDefaultWindowsTargetPlatformVersion() const override { return "8.1"; } | ||||
static MSVCProjectExporterVC2015* createForSettings (Project& project, const ValueTree& settings) | |||||
static MSVCProjectExporterVC2015* createForSettings (Project& projectToUse, const ValueTree& settingsToUse) | |||||
{ | { | ||||
if (settings.hasType (getValueTreeTypeName())) | |||||
return new MSVCProjectExporterVC2015 (project, settings); | |||||
if (settingsToUse.hasType (getValueTreeTypeName())) | |||||
return new MSVCProjectExporterVC2015 (projectToUse, settingsToUse); | |||||
return nullptr; | return nullptr; | ||||
} | } | ||||
@@ -1962,10 +1962,10 @@ public: | |||||
String getDefaultToolset() const override { return "v141"; } | String getDefaultToolset() const override { return "v141"; } | ||||
String getDefaultWindowsTargetPlatformVersion() const override { return "Latest"; } | String getDefaultWindowsTargetPlatformVersion() const override { return "Latest"; } | ||||
static MSVCProjectExporterVC2017* createForSettings (Project& project, const ValueTree& settings) | |||||
static MSVCProjectExporterVC2017* createForSettings (Project& projectToUse, const ValueTree& settingsToUse) | |||||
{ | { | ||||
if (settings.hasType (getValueTreeTypeName())) | |||||
return new MSVCProjectExporterVC2017 (project, settings); | |||||
if (settingsToUse.hasType (getValueTreeTypeName())) | |||||
return new MSVCProjectExporterVC2017 (projectToUse, settingsToUse); | |||||
return nullptr; | return nullptr; | ||||
} | } | ||||
@@ -2007,10 +2007,10 @@ public: | |||||
String getDefaultToolset() const override { return "v142"; } | String getDefaultToolset() const override { return "v142"; } | ||||
String getDefaultWindowsTargetPlatformVersion() const override { return "10.0"; } | String getDefaultWindowsTargetPlatformVersion() const override { return "10.0"; } | ||||
static MSVCProjectExporterVC2019* createForSettings (Project& project, const ValueTree& settings) | |||||
static MSVCProjectExporterVC2019* createForSettings (Project& projectToUse, const ValueTree& settingsToUse) | |||||
{ | { | ||||
if (settings.hasType (getValueTreeTypeName())) | |||||
return new MSVCProjectExporterVC2019 (project, settings); | |||||
if (settingsToUse.hasType (getValueTreeTypeName())) | |||||
return new MSVCProjectExporterVC2019 (projectToUse, settingsToUse); | |||||
return nullptr; | return nullptr; | ||||
} | } | ||||
@@ -304,10 +304,10 @@ public: | |||||
String getExtraPkgConfigString() const { return extraPkgConfigValue.get(); } | String getExtraPkgConfigString() const { return extraPkgConfigValue.get(); } | ||||
static MakefileProjectExporter* createForSettings (Project& project, const ValueTree& settings) | |||||
static MakefileProjectExporter* createForSettings (Project& projectToUse, const ValueTree& settingsToUse) | |||||
{ | { | ||||
if (settings.hasType (getValueTreeTypeName())) | |||||
return new MakefileProjectExporter (project, settings); | |||||
if (settingsToUse.hasType (getValueTreeTypeName())) | |||||
return new MakefileProjectExporter (projectToUse, settingsToUse); | |||||
return nullptr; | return nullptr; | ||||
} | } | ||||
@@ -126,10 +126,10 @@ public: | |||||
targetLocationValue.setDefault (getDefaultBuildsRootFolder() + getTargetFolderForExporter (getValueTreeTypeName (isIOS))); | targetLocationValue.setDefault (getDefaultBuildsRootFolder() + getTargetFolderForExporter (getValueTreeTypeName (isIOS))); | ||||
} | } | ||||
static XcodeProjectExporter* createForSettings (Project& project, const ValueTree& settings) | |||||
static XcodeProjectExporter* createForSettings (Project& projectToUse, const ValueTree& settingsToUse) | |||||
{ | { | ||||
if (settings.hasType (getValueTreeTypeName (false))) return new XcodeProjectExporter (project, settings, false); | |||||
if (settings.hasType (getValueTreeTypeName (true))) return new XcodeProjectExporter (project, settings, true); | |||||
if (settingsToUse.hasType (getValueTreeTypeName (false))) return new XcodeProjectExporter (projectToUse, settingsToUse, false); | |||||
if (settingsToUse.hasType (getValueTreeTypeName (true))) return new XcodeProjectExporter (projectToUse, settingsToUse, true); | |||||
return nullptr; | return nullptr; | ||||
} | } | ||||
@@ -62,9 +62,9 @@ public: | |||||
ChoicePropertyComponentWithEnablement (ValueWithDefault& valueToControl, | ChoicePropertyComponentWithEnablement (ValueWithDefault& valueToControl, | ||||
ValueWithDefault valueToListenTo, | ValueWithDefault valueToListenTo, | ||||
const String& propertyName, | const String& propertyName, | ||||
const StringArray& choices, | |||||
const StringArray& choiceToUse, | |||||
const Array<var>& correspondingValues) | const Array<var>& correspondingValues) | ||||
: ChoicePropertyComponent (valueToControl, propertyName, choices, correspondingValues), | |||||
: ChoicePropertyComponent (valueToControl, propertyName, choiceToUse, correspondingValues), | |||||
valueWithDefault (valueToListenTo), | valueWithDefault (valueToListenTo), | ||||
value (valueToListenTo.getPropertyAsValue()) | value (valueToListenTo.getPropertyAsValue()) | ||||
{ | { | ||||
@@ -76,9 +76,9 @@ public: | |||||
ValueWithDefault valueToListenTo, | ValueWithDefault valueToListenTo, | ||||
const Identifier& multiChoiceID, | const Identifier& multiChoiceID, | ||||
const String& propertyName, | const String& propertyName, | ||||
const StringArray& choices, | |||||
const StringArray& choicesToUse, | |||||
const Array<var>& correspondingValues) | const Array<var>& correspondingValues) | ||||
: ChoicePropertyComponentWithEnablement (valueToControl, valueToListenTo, propertyName, choices, correspondingValues) | |||||
: ChoicePropertyComponentWithEnablement (valueToControl, valueToListenTo, propertyName, choicesToUse, correspondingValues) | |||||
{ | { | ||||
jassert (valueToListenTo.get().getArray() != nullptr); | jassert (valueToListenTo.get().getArray() != nullptr); | ||||
@@ -600,17 +600,17 @@ public: | |||||
} | } | ||||
template <typename Endianness> | template <typename Endianness> | ||||
static void copySampleData (unsigned int bitsPerSample, bool usesFloatingPointData, | |||||
static void copySampleData (unsigned int numBitsPerSample, bool floatingPointData, | |||||
int* const* destSamples, int startOffsetInDestBuffer, int numDestChannels, | int* const* destSamples, int startOffsetInDestBuffer, int numDestChannels, | ||||
const void* sourceData, int numChannels, int numSamples) noexcept | |||||
const void* sourceData, int numberOfChannels, int numSamples) noexcept | |||||
{ | { | ||||
switch (bitsPerSample) | |||||
switch (numBitsPerSample) | |||||
{ | { | ||||
case 8: ReadHelper<AudioData::Int32, AudioData::Int8, Endianness>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); break; | |||||
case 16: ReadHelper<AudioData::Int32, AudioData::Int16, Endianness>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); break; | |||||
case 24: ReadHelper<AudioData::Int32, AudioData::Int24, Endianness>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); break; | |||||
case 32: if (usesFloatingPointData) ReadHelper<AudioData::Float32, AudioData::Float32, Endianness>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); | |||||
else ReadHelper<AudioData::Int32, AudioData::Int32, Endianness>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); | |||||
case 8: ReadHelper<AudioData::Int32, AudioData::Int8, Endianness>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numberOfChannels, numSamples); break; | |||||
case 16: ReadHelper<AudioData::Int32, AudioData::Int16, Endianness>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numberOfChannels, numSamples); break; | |||||
case 24: ReadHelper<AudioData::Int32, AudioData::Int24, Endianness>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numberOfChannels, numSamples); break; | |||||
case 32: if (floatingPointData) ReadHelper<AudioData::Float32, AudioData::Float32, Endianness>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numberOfChannels, numSamples); | |||||
else ReadHelper<AudioData::Int32, AudioData::Int32, Endianness>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numberOfChannels, numSamples); | |||||
break; | break; | ||||
default: jassertfalse; break; | default: jassertfalse; break; | ||||
} | } | ||||
@@ -1220,17 +1220,17 @@ public: | |||||
return true; | return true; | ||||
} | } | ||||
static void copySampleData (unsigned int bitsPerSample, const bool usesFloatingPointData, | |||||
static void copySampleData (unsigned int numBitsPerSample, const bool floatingPointData, | |||||
int* const* destSamples, int startOffsetInDestBuffer, int numDestChannels, | int* const* destSamples, int startOffsetInDestBuffer, int numDestChannels, | ||||
const void* sourceData, int numChannels, int numSamples) noexcept | |||||
const void* sourceData, int numberOfChannels, int numSamples) noexcept | |||||
{ | { | ||||
switch (bitsPerSample) | |||||
switch (numBitsPerSample) | |||||
{ | { | ||||
case 8: ReadHelper<AudioData::Int32, AudioData::UInt8, AudioData::LittleEndian>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); break; | |||||
case 16: ReadHelper<AudioData::Int32, AudioData::Int16, AudioData::LittleEndian>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); break; | |||||
case 24: ReadHelper<AudioData::Int32, AudioData::Int24, AudioData::LittleEndian>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); break; | |||||
case 32: if (usesFloatingPointData) ReadHelper<AudioData::Float32, AudioData::Float32, AudioData::LittleEndian>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); | |||||
else ReadHelper<AudioData::Int32, AudioData::Int32, AudioData::LittleEndian>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numChannels, numSamples); | |||||
case 8: ReadHelper<AudioData::Int32, AudioData::UInt8, AudioData::LittleEndian>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numberOfChannels, numSamples); break; | |||||
case 16: ReadHelper<AudioData::Int32, AudioData::Int16, AudioData::LittleEndian>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numberOfChannels, numSamples); break; | |||||
case 24: ReadHelper<AudioData::Int32, AudioData::Int24, AudioData::LittleEndian>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numberOfChannels, numSamples); break; | |||||
case 32: if (floatingPointData) ReadHelper<AudioData::Float32, AudioData::Float32, AudioData::LittleEndian>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numberOfChannels, numSamples); | |||||
else ReadHelper<AudioData::Int32, AudioData::Int32, AudioData::LittleEndian>::read (destSamples, startOffsetInDestBuffer, numDestChannels, sourceData, numberOfChannels, numSamples); | |||||
break; | break; | ||||
default: jassertfalse; break; | default: jassertfalse; break; | ||||
} | } | ||||
@@ -1518,17 +1518,17 @@ private: | |||||
} | } | ||||
} | } | ||||
static int getChannelMaskFromChannelLayout (const AudioChannelSet& channelLayout) | |||||
static int getChannelMaskFromChannelLayout (const AudioChannelSet& layout) | |||||
{ | { | ||||
if (channelLayout.isDiscreteLayout()) | |||||
if (layout.isDiscreteLayout()) | |||||
return 0; | return 0; | ||||
// Don't add an extended format chunk for mono and stereo. Basically, all wav players | // Don't add an extended format chunk for mono and stereo. Basically, all wav players | ||||
// interpret a wav file with only one or two channels to be mono or stereo anyway. | // interpret a wav file with only one or two channels to be mono or stereo anyway. | ||||
if (channelLayout == AudioChannelSet::mono() || channelLayout == AudioChannelSet::stereo()) | |||||
if (layout == AudioChannelSet::mono() || layout == AudioChannelSet::stereo()) | |||||
return 0; | return 0; | ||||
auto channels = channelLayout.getChannelTypes(); | |||||
auto channels = layout.getChannelTypes(); | |||||
auto wavChannelMask = 0; | auto wavChannelMask = 0; | ||||
for (auto channel : channels) | for (auto channel : channels) | ||||