diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h index b044c155bd..9710f50005 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h @@ -770,7 +770,7 @@ private: //============================================================================== String createDefaultClassName() const { - String s (project.getBundleIdentifier().toString().toLowerCase()); + auto s = project.getBundleIdentifier().toString().toLowerCase(); if (s.length() > 5 && s.containsChar ('.') @@ -790,11 +790,8 @@ private: void initialiseDependencyPathValues() { - sdkPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::androidSDKPath), - Ids::androidSDKPath, TargetOS::getThisOS()))); - - ndkPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::androidNDKPath), - Ids::androidNDKPath, TargetOS::getThisOS()))); + sdkPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::androidSDKPath), Ids::androidSDKPath, TargetOS::getThisOS()))); + ndkPath.referTo (Value (new DependencyPathValueSource (getSetting (Ids::androidNDKPath), Ids::androidNDKPath, TargetOS::getThisOS()))); } //============================================================================== @@ -807,9 +804,7 @@ private: createDirectoryOrThrow (targetFolder); - LibraryModule* const coreModule = getCoreModule (modules); - - if (coreModule != nullptr) + if (auto* coreModule = getCoreModule (modules)) { File javaDestFile (targetFolder.getChildFile (className + ".java")); @@ -840,16 +835,14 @@ private: .replace ("JuceAppActivity", className); } - File javaSourceFile (javaSourceFolder.getChildFile ("JuceAppActivity.java")); - StringArray javaSourceLines (StringArray::fromLines (javaSourceFile.loadFileAsString())); + auto javaSourceFile = javaSourceFolder.getChildFile ("JuceAppActivity.java"); + auto javaSourceLines = StringArray::fromLines (javaSourceFile.loadFileAsString()); { MemoryOutputStream newFile; - for (int i = 0; i < javaSourceLines.size(); ++i) + for (const auto& line : javaSourceLines) { - const String& line = javaSourceLines[i]; - if (line.contains ("$$JuceAndroidMidiImports$$")) newFile << juceMidiImports; else if (line.contains ("$$JuceAndroidMidiCode$$")) diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp index 5ec4b8ef62..99af25731a 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExporter.cpp @@ -86,10 +86,9 @@ ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int StringArray ProjectExporter::getExporterNames() { StringArray s; - Array types (getExporterTypes()); - for (int i = 0; i < types.size(); ++i) - s.add (types.getReference(i).name); + for (auto& e : getExporterTypes()) + s.add (e.name); return s; } @@ -225,20 +224,23 @@ void ProjectExporter::createDependencyPathProperties (PropertyListBuilder& props { if (shouldBuildTargetType (ProjectType::Target::VST3PlugIn) || project.isVST3PluginHost()) { - props.add (new DependencyPathPropertyComponent (project.getFile().getParentDirectory(), getVST3PathValue(), "VST3 SDK Folder"), - "If you're building a VST3 plugin or host, this must be the folder containing the VST3 SDK. This can be an absolute path, or a path relative to the Projucer project file."); + if (dynamic_cast (&getVST3PathValue().getValueSource()) != nullptr) + props.add (new DependencyPathPropertyComponent (project.getFile().getParentDirectory(), getVST3PathValue(), "VST3 SDK Folder"), + "If you're building a VST3 plugin or host, this must be the folder containing the VST3 SDK. This can be an absolute path, or a path relative to the Projucer project file."); } if (shouldBuildTargetType (ProjectType::Target::AAXPlugIn) && project.shouldBuildAAX()) { - props.add (new DependencyPathPropertyComponent (project.getFile().getParentDirectory(), getAAXPathValue(), "AAX SDK Folder"), - "If you're building an AAX plugin, this must be the folder containing the AAX SDK. This can be an absolute path, or a path relative to the Projucer project file."); + if (dynamic_cast (&getAAXPathValue().getValueSource()) != nullptr) + props.add (new DependencyPathPropertyComponent (project.getFile().getParentDirectory(), getAAXPathValue(), "AAX SDK Folder"), + "If you're building an AAX plugin, this must be the folder containing the AAX SDK. This can be an absolute path, or a path relative to the Projucer project file."); } if (shouldBuildTargetType (ProjectType::Target::RTASPlugIn) && project.shouldBuildRTAS()) { - props.add (new DependencyPathPropertyComponent (project.getFile().getParentDirectory(), getRTASPathValue(), "RTAS SDK Folder"), - "If you're building an RTAS, this must be the folder containing the RTAS SDK. This can be an absolute path, or a path relative to the Projucer project file."); + if (dynamic_cast (&getRTASPathValue().getValueSource()) != nullptr) + props.add (new DependencyPathPropertyComponent (project.getFile().getParentDirectory(), getRTASPathValue(), "RTAS SDK Folder"), + "If you're building an RTAS, this must be the folder containing the RTAS SDK. This can be an absolute path, or a path relative to the Projucer project file."); } } diff --git a/extras/Projucer/Source/Project/jucer_ConfigTree_Exporter.h b/extras/Projucer/Source/Project/jucer_ConfigTree_Exporter.h index d25e699041..cb575d3ab1 100644 --- a/extras/Projucer/Source/Project/jucer_ConfigTree_Exporter.h +++ b/extras/Projucer/Source/Project/jucer_ConfigTree_Exporter.h @@ -155,9 +155,8 @@ private: int exporterIndex; //============================================================================== - class SettingsComp : public Component + struct SettingsComp : public Component { - public: SettingsComp (ProjectExporter* exp) : group (exp->getName(), ExporterItem::getIconForExporter (exp)) { @@ -169,11 +168,9 @@ private: parentSizeChanged(); } - void parentSizeChanged() override { updateSize (*this, group); } + void parentSizeChanged() override { updateSize (*this, group); } + void resized() override { group.setBounds (getLocalBounds().withTrimmedLeft (12)); } - void resized() override { group.setBounds (getLocalBounds().withTrimmedLeft (12)); } - - private: PropertyGroupComponent group; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SettingsComp)