mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Cache preprocessor defs to reduce save time
This commit is contained in:
parent
7d24b39f18
commit
7912349b55
2 changed files with 5 additions and 7 deletions
|
|
@ -456,12 +456,14 @@ Result Project::saveResourcesOnly (const File& file)
|
|||
//==============================================================================
|
||||
void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& property)
|
||||
{
|
||||
if (tree.getParent() == tree)
|
||||
if (tree.getRoot() == tree)
|
||||
{
|
||||
if (property == Ids::projectType)
|
||||
sendChangeMessage();
|
||||
else if (property == Ids::name)
|
||||
setTitle (projectRoot [Ids::name]);
|
||||
else if (property == Ids::defines)
|
||||
parsedPreprocessorDefs = parsePreprocessorDefs (preprocessorDefsValue.get());
|
||||
|
||||
changed();
|
||||
}
|
||||
|
|
@ -853,11 +855,6 @@ String Project::getVersionAsHex() const
|
|||
return "0x" + String::toHexString (getVersionAsHexInteger());
|
||||
}
|
||||
|
||||
StringPairArray Project::getPreprocessorDefs() const
|
||||
{
|
||||
return parsePreprocessorDefs (projectRoot [Ids::defines]);
|
||||
}
|
||||
|
||||
File Project::getBinaryDataCppFile (int index) const
|
||||
{
|
||||
const File cpp (getGeneratedCodeFolder().getChildFile ("BinaryData.cpp"));
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public:
|
|||
|
||||
String getHeaderSearchPathsString() const { return headerSearchPathsValue.get(); }
|
||||
|
||||
StringPairArray getPreprocessorDefs() const;
|
||||
StringPairArray getPreprocessorDefs() const { return parsedPreprocessorDefs; }
|
||||
|
||||
int getMaxBinaryFileSize() const { return maxBinaryFileSizeValue.get(); }
|
||||
bool shouldIncludeBinaryInAppConfig() const { return includeBinaryDataInAppConfigValue.get(); }
|
||||
|
|
@ -353,6 +353,7 @@ private:
|
|||
ScopedPointer<EnabledModuleList> enabledModulesList;
|
||||
bool isSaving;
|
||||
Time modificationTime;
|
||||
StringPairArray parsedPreprocessorDefs;
|
||||
|
||||
//==============================================================================
|
||||
void intialiseProjectValues();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue