diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2024-01-29 17:15:37 +0200 |
---|---|---|
committer | Mahmoud Badri <mahmoud.badri@qt.io> | 2024-01-29 15:36:10 +0000 |
commit | 7c9801ab462e730756f9fccd46732d1396189e2b (patch) | |
tree | 58232a44102f3b05e6d0b536778932b29db17b2d | |
parent | 2122ff37f12705bf0964d444bf2e874cc3a5c6df (diff) |
EffectComposer: Add tracking to added effect nodes
Fixes: QDS-11783
Change-Id: Ief2e6647c00fa1402be11d7b2dd3f4fa25155665
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/plugins/effectcomposer/effectcomposerwidget.cpp | 8 | ||||
-rw-r--r-- | src/plugins/qmldesigner/qmldesignerconstants.h | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/effectcomposer/effectcomposerwidget.cpp b/src/plugins/effectcomposer/effectcomposerwidget.cpp index 3be9284f4d..9303fe0ac4 100644 --- a/src/plugins/effectcomposer/effectcomposerwidget.cpp +++ b/src/plugins/effectcomposer/effectcomposerwidget.cpp @@ -11,8 +11,6 @@ #include "propertyhandler.h" //#include "qmldesigner/designercore/imagecache/midsizeimagecacheprovider.h" -#include "qmldesignerconstants.h" -#include "qmldesignerplugin.h" #include "theme.h" #include <coreplugin/icore.h> @@ -163,6 +161,12 @@ QPointer<EffectComposerNodesModel> EffectComposerWidget::effectComposerNodesMode void EffectComposerWidget::addEffectNode(const QString &nodeQenPath) { m_effectComposerModel->addNode(nodeQenPath); + + if (!nodeQenPath.isEmpty()) { + using namespace QmlDesigner; + QString id = nodeQenPath.split('/').last().chopped(4).prepend('_'); + QmlDesignerPlugin::emitUsageStatistics(Constants::EVENT_EFFECTCOMPOSER_NODE + id); + } } void EffectComposerWidget::focusSection(int section) diff --git a/src/plugins/qmldesigner/qmldesignerconstants.h b/src/plugins/qmldesigner/qmldesignerconstants.h index b8a176341e..81108dee41 100644 --- a/src/plugins/qmldesigner/qmldesignerconstants.h +++ b/src/plugins/qmldesigner/qmldesignerconstants.h @@ -126,7 +126,8 @@ const char EVENT_TEXTEDITOR_TIME[] = "textEditor"; const char EVENT_TEXTUREEDITOR_TIME[] = "textureEditor"; const char EVENT_PROPERTYEDITOR_TIME[] = "propertyEditor"; const char EVENT_ASSETSLIBRARY_TIME[] = "assetsLibrary"; -const char EVENT_EFFECTCOMPOSER_TIME[] = "effectComposer"; +const char EVENT_EFFECTCOMPOSER_NODE[] = "effectComposerNode"; +const char EVENT_EFFECTCOMPOSER_TIME[] = "effectComposerTime"; const char EVENT_ITEMLIBRARY_TIME[] = "itemLibrary"; const char EVENT_TRANSLATIONVIEW_TIME[] = "translationView"; const char EVENT_NAVIGATORVIEW_TIME[] = "navigatorView"; |