aboutsummaryrefslogtreecommitdiffstats
path: root/datasources/qmldesignerusagetimesource.h
diff options
context:
space:
mode:
authorVitaly Fanaskov <vitaly.fanaskov@qt.io>2019-06-14 13:52:10 +0200
committerVitaly Fanaskov <vitaly.fanaskov@qt.io>2019-06-19 16:58:23 +0200
commitcb6a29b86acb9d7f163e32bda4a7d6aa7775d69d (patch)
tree4b7fe01731567d00c4dbe20f2551bc6f914e32e2 /datasources/qmldesignerusagetimesource.h
Create a plugin for collecting usage statistics
The following data might be collected: 1) Builds count 2) Used build systems 3) Opened examples 4) Used kits (detailed info) 5) Modes usage 6) QML designer usage time 7) License type Also all common data (system info, graphic, app version, etc.) might be collected as well. Plugin is built atop of KUserFeedback framework and uses its architecture and routines for collecting and sending data. KUserFeedback is not included to this repository and supposed to be built and installed separately by CI. Static build of KUserFeedback is used, so plugin doesn't depend on any 3rd-party dynamic libraries. URL for sending data and authentication key should be set during the build process. Change-Id: Ibf0cf4986031689b5f46925664cebadcb0fe3aef
Diffstat (limited to 'datasources/qmldesignerusagetimesource.h')
-rw-r--r--datasources/qmldesignerusagetimesource.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/datasources/qmldesignerusagetimesource.h b/datasources/qmldesignerusagetimesource.h
new file mode 100644
index 0000000..3cadf57
--- /dev/null
+++ b/datasources/qmldesignerusagetimesource.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of UsageStatistic plugin for Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+#pragma once
+
+#include "timeusagesourcebase.h"
+
+namespace UsageStatistic {
+namespace Internal {
+
+//! Tracks time spent using QML Designer
+class QmlDesignerUsageTimeSource : public TimeUsageSourceBase
+{
+public:
+ QmlDesignerUsageTimeSource();
+ ~QmlDesignerUsageTimeSource() override;
+
+public: // AbstractDataSource interface
+ QString name() const override;
+ QString description() const override;
+
+private: // Methods
+ void updateTrackingState(const QString &modeName);
+};
+
+} // namespace Internal
+} // namespace UsageStatistic
+