1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-04 03:40:07 +00:00

Projucer: Add analytics

This commit is contained in:
ed 2018-03-15 11:11:42 +00:00
parent 47af78fe0b
commit 711e75bdc8
28 changed files with 772 additions and 25 deletions

View file

@ -501,6 +501,14 @@ void Project::moveTemporaryDirectory (const File& newParentDirectory)
}
//==============================================================================
static void sendProjectSettingAnalyticsEvent (StringRef label)
{
StringPairArray data;
data.set ("label", label);
Analytics::getInstance()->logEvent ("Project Setting", data, ProjucerAnalyticsEvent::projectEvent);
}
void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& property)
{
if (tree.getRoot() == tree)
@ -508,6 +516,8 @@ void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& prope
if (property == Ids::projectType)
{
sendChangeMessage();
sendProjectSettingAnalyticsEvent ("Project Type = " + projectTypeValue.get().toString());
}
else if (property == Ids::name)
{
@ -517,6 +527,10 @@ void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& prope
{
parsedPreprocessorDefs = parsePreprocessorDefs (preprocessorDefsValue.get());
}
else if (property == Ids::cppLanguageStandard)
{
sendProjectSettingAnalyticsEvent ("C++ Standard = " + cppStandardValue.get().toString());
}
changed();
}
@ -1561,6 +1575,18 @@ String Project::getUniqueTargetFolderSuffixForExporter (const String& exporterNa
return "_" + String (num);
}
//==============================================================================
bool Project::shouldSendGUIBuilderAnalyticsEvent() noexcept
{
if (! hasSentGUIBuilderAnalyticsEvent)
{
hasSentGUIBuilderAnalyticsEvent = true;
return true;
}
return false;
}
//==============================================================================
String Project::getFileTemplate (const String& templateName)
{