QmlDesigner: Collect events for telemetry plugin

For each action/event we want to track we
emit QmlDesignerPlugin::usageStatisticsNotifier() with an identifer.

This allows counting how many states, transitions, timelines were created
and we track every registered action.

More 'trace points' can be added later.

Change-Id: Ibb31e1b7e20d984a10697e05bb4417e7ad1b8980
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2020-11-11 17:33:35 +01:00
parent 093d5f5ab1
commit fb9fb01e34
10 changed files with 50 additions and 6 deletions

View File

@@ -40,6 +40,7 @@
#include <rewritertransaction.h>
#include <variantproperty.h>
#include <viewmanager.h>
#include <qmldesignerconstants.h>
#include <qmldesignericons.h>
#include <qmldesignerplugin.h>
#include <qmlitemnode.h>
@@ -203,6 +204,8 @@ ModelNode TransitionEditorView::addNewTransition()
states = QmlVisualNode(root).states().allStates();
}
QmlDesignerPlugin::emitUsageStatistics(Constants::EVENT_TRANSITION_ADDED);
if (states.isEmpty()) {
Core::AsynchronousMessageBox::warning(tr("No States Defined"),
tr("There are no states defined in this component."));