aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp')
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp
index b7b391944a..b77fbf2a51 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp
@@ -30,6 +30,8 @@
#include <designersettings.h>
#include <theme.h>
+#include <qmldesignerconstants.h>
+#include <qmldesignerplugin.h>
#include <invalidqmlsourceexception.h>
@@ -139,6 +141,19 @@ void StatesEditorWidget::showEvent(QShowEvent *event)
update();
}
+void StatesEditorWidget::focusOutEvent(QFocusEvent *focusEvent)
+{
+ QmlDesignerPlugin::emitUsageStatisticsTime(Constants::EVENT_STATESEDITOR_TIME,
+ m_usageTimer.elapsed());
+ QQuickWidget::focusOutEvent(focusEvent);
+}
+
+void StatesEditorWidget::focusInEvent(QFocusEvent *focusEvent)
+{
+ m_usageTimer.restart();
+ QQuickWidget::focusInEvent(focusEvent);
+}
+
void StatesEditorWidget::reloadQmlSource()
{
QString statesListQmlFilePath = qmlSourcesPath() + QStringLiteral("/StatesList.qml");