aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2019-11-11 12:03:55 +0100
committerEike Ziller <eike.ziller@qt.io>2019-11-11 12:03:55 +0100
commitce2efcf29baf75d81da16a720066d2ec00529329 (patch)
treea13a5f608cd410a1ff9444342e3977af36e4361a
parent6dc752e0a22165034a06ebaa3e5bce5be8e05716 (diff)
parent03f2d7ae72b71f7320eedcdf3c2611de82be4f83 (diff)
Merge remote-tracking branch 'origin/4.11'
-rw-r--r--plugin-telemetry.pro5
-rw-r--r--src/UsageStatistic.json.in (renamed from UsageStatistic.json.in)2
-rw-r--r--src/common/scopedsettingsgroupsetter.cpp (renamed from common/scopedsettingsgroupsetter.cpp)0
-rw-r--r--src/common/scopedsettingsgroupsetter.h (renamed from common/scopedsettingsgroupsetter.h)0
-rw-r--r--src/common/utils.h (renamed from common/utils.h)12
-rw-r--r--src/datasources/buildcountsource.cpp (renamed from datasources/buildcountsource.cpp)0
-rw-r--r--src/datasources/buildcountsource.h (renamed from datasources/buildcountsource.h)0
-rw-r--r--src/datasources/buildsystemsource.cpp (renamed from datasources/buildsystemsource.cpp)39
-rw-r--r--src/datasources/buildsystemsource.h (renamed from datasources/buildsystemsource.h)2
-rw-r--r--src/datasources/examplesdatasource.cpp (renamed from datasources/examplesdatasource.cpp)2
-rw-r--r--src/datasources/examplesdatasource.h (renamed from datasources/examplesdatasource.h)0
-rw-r--r--src/datasources/kitsource.cpp (renamed from datasources/kitsource.cpp)2
-rw-r--r--src/datasources/kitsource.h (renamed from datasources/kitsource.h)0
-rw-r--r--src/datasources/modeusagetimesource.cpp (renamed from datasources/modeusagetimesource.cpp)4
-rw-r--r--src/datasources/modeusagetimesource.h (renamed from datasources/modeusagetimesource.h)0
-rw-r--r--src/datasources/qmldesignerusagetimesource.cpp (renamed from datasources/qmldesignerusagetimesource.cpp)4
-rw-r--r--src/datasources/qmldesignerusagetimesource.h (renamed from datasources/qmldesignerusagetimesource.h)0
-rw-r--r--src/datasources/qtclicensesource.cpp (renamed from datasources/qtclicensesource.cpp)0
-rw-r--r--src/datasources/qtclicensesource.h (renamed from datasources/qtclicensesource.h)0
-rw-r--r--src/datasources/servicesource.cpp114
-rw-r--r--src/datasources/servicesource.h70
-rw-r--r--src/datasources/timeusagesourcebase.cpp (renamed from datasources/timeusagesourcebase.cpp)0
-rw-r--r--src/datasources/timeusagesourcebase.h (renamed from datasources/timeusagesourcebase.h)0
-rw-r--r--src/images/settingscategory_usagestatistic.png (renamed from images/settingscategory_usagestatistic.png)bin233 -> 233 bytes
-rw-r--r--src/images/settingscategory_usagestatistic.svg (renamed from images/settingscategory_usagestatistic.svg)0
-rw-r--r--src/images/settingscategory_usagestatistic@2x.png (renamed from images/settingscategory_usagestatistic@2x.png)bin426 -> 426 bytes
-rw-r--r--src/services/datasubmitter.cpp (renamed from services/datasubmitter.cpp)0
-rw-r--r--src/services/datasubmitter.h (renamed from services/datasubmitter.h)0
-rw-r--r--src/src.pro (renamed from usagestatistic.pro)6
-rw-r--r--src/ui/encouragementwidget.cpp (renamed from ui/encouragementwidget.cpp)0
-rw-r--r--src/ui/encouragementwidget.h (renamed from ui/encouragementwidget.h)0
-rw-r--r--src/ui/encouragementwidget.ui (renamed from ui/encouragementwidget.ui)0
-rw-r--r--src/ui/outputpane.cpp (renamed from ui/outputpane.cpp)0
-rw-r--r--src/ui/outputpane.h (renamed from ui/outputpane.h)0
-rw-r--r--src/ui/usagestatisticpage.cpp (renamed from ui/usagestatisticpage.cpp)2
-rw-r--r--src/ui/usagestatisticpage.h (renamed from ui/usagestatisticpage.h)0
-rw-r--r--src/ui/usagestatisticwidget.cpp (renamed from ui/usagestatisticwidget.cpp)0
-rw-r--r--src/ui/usagestatisticwidget.h (renamed from ui/usagestatisticwidget.h)0
-rw-r--r--src/ui/usagestatisticwidget.ui (renamed from ui/usagestatisticwidget.ui)0
-rw-r--r--src/usagestatistic.qrc (renamed from usagestatistic.qrc)0
-rw-r--r--src/usagestatistic_global.h (renamed from usagestatistic_global.h)0
-rw-r--r--src/usagestatisticconstants.h (renamed from usagestatisticconstants.h)0
-rw-r--r--src/usagestatisticplugin.cpp (renamed from usagestatisticplugin.cpp)9
-rw-r--r--src/usagestatisticplugin.h (renamed from usagestatisticplugin.h)0
44 files changed, 255 insertions, 18 deletions
diff --git a/plugin-telemetry.pro b/plugin-telemetry.pro
new file mode 100644
index 0000000..2e26c06
--- /dev/null
+++ b/plugin-telemetry.pro
@@ -0,0 +1,5 @@
+TEMPLATE = subdirs
+
+SUBDIRS += src
+
+QMAKE_EXTRA_TARGETS += docs install_docs # dummy targets for consistency
diff --git a/UsageStatistic.json.in b/src/UsageStatistic.json.in
index 0ed40e6..9a999e4 100644
--- a/UsageStatistic.json.in
+++ b/src/UsageStatistic.json.in
@@ -5,7 +5,7 @@
\"Vendor\" : \"The Qt Company Ltd\",
\"Copyright\" : \"(C) $$QTCREATOR_COPYRIGHT_YEAR The Qt Company Ltd\",
\"License\" : \"GNU GPL v3\",
- \"Description\" : \"This plugin is used to collect usage statistic. All statistics are anonymous. You can switch off the plugin any time you want.\",
+ \"Description\" : \"This plugin collects statistics on how Qt Creator is used. All statistics are anonymous. You can switch off the plugin any time you want.\",
\"Url\" : \"https://www.qt.io/\",
$$dependencyList
}
diff --git a/common/scopedsettingsgroupsetter.cpp b/src/common/scopedsettingsgroupsetter.cpp
index 472b6fd..472b6fd 100644
--- a/common/scopedsettingsgroupsetter.cpp
+++ b/src/common/scopedsettingsgroupsetter.cpp
diff --git a/common/scopedsettingsgroupsetter.h b/src/common/scopedsettingsgroupsetter.h
index adcaa61..adcaa61 100644
--- a/common/scopedsettingsgroupsetter.h
+++ b/src/common/scopedsettingsgroupsetter.h
diff --git a/common/utils.h b/src/common/utils.h
index 6bf5fd4..592728a 100644
--- a/common/utils.h
+++ b/src/common/utils.h
@@ -36,6 +36,18 @@ constexpr auto secret() { return USP_AUTH_KEY; }
//! Base server URL defined during building
constexpr auto serverUrl() { return USP_SERVER_URL; }
+/*! Data scheme version for the JSON document
+ *
+ * Should be changed if you change the output data format,
+ * for example, change a key or add a new data source.
+ */
+struct DocumentVersion
+{
+ int major = 1;
+ int minor = 0;
+ int patch = 0;
+};
+
} // namespace Utils
} // namespace Internal
} // namespace UsageStatistic
diff --git a/datasources/buildcountsource.cpp b/src/datasources/buildcountsource.cpp
index 1a42305..1a42305 100644
--- a/datasources/buildcountsource.cpp
+++ b/src/datasources/buildcountsource.cpp
diff --git a/datasources/buildcountsource.h b/src/datasources/buildcountsource.h
index 0cee9c4..0cee9c4 100644
--- a/datasources/buildcountsource.h
+++ b/src/datasources/buildcountsource.h
diff --git a/datasources/buildsystemsource.cpp b/src/datasources/buildsystemsource.cpp
index 26433c0..5b9e4bf 100644
--- a/datasources/buildsystemsource.cpp
+++ b/src/datasources/buildsystemsource.cpp
@@ -25,6 +25,7 @@
#include "buildsystemsource.h"
#include <QtCore/QSettings>
+#include <QtCore/QCryptographicHash>
#include <projectexplorer/project.h>
#include <projectexplorer/session.h>
@@ -83,7 +84,7 @@ QString BuildSystemSource::name() const
QString BuildSystemSource::description() const
{
- return tr("Count of each used build systems");
+ return tr("Count of projects configured for a particular build system.");
}
QVariant BuildSystemSource::data()
@@ -96,21 +97,42 @@ QVariant BuildSystemSource::data()
return result;
}
+static QSet<QByteArray> fromVariantList(const QVariantList &vl)
+{
+ QSet<QByteArray> result;
+ for (auto &&v : vl) {
+ result << v.toByteArray();
+ }
+
+ return result;
+}
+
void BuildSystemSource::loadImpl(QSettings *settings)
{
auto setter = ScopedSettingsGroupSetter::forDataSource(*this, *settings);
for (int i = QMake; i < Count; ++i) {
m_projectsByBuildSystem[size_t(i)] =
- settings->value(buildSystemKeys()[i]).toStringList().toSet();
+ fromVariantList(settings->value(buildSystemKeys()[i]).toList());
}
}
+static QVariantList toVariantList(const QSet<QByteArray> &set)
+{
+ QVariantList result;
+ result.reserve(set.size());
+
+ std::transform(set.begin(), set.end(), std::back_inserter(result),
+ [](const QByteArray &ba) { return QVariant::fromValue(ba); });
+
+ return result;
+}
+
void BuildSystemSource::storeImpl(QSettings *settings)
{
auto setter = ScopedSettingsGroupSetter::forDataSource(*this, *settings);
for (int i = QMake; i < Count; ++i) {
settings->setValue(
- buildSystemKeys()[i], QStringList(m_projectsByBuildSystem[size_t(i)].toList()));
+ buildSystemKeys()[i], toVariantList(m_projectsByBuildSystem[size_t(i)]));
}
}
@@ -120,13 +142,18 @@ void BuildSystemSource::resetImpl(QSettings *settings)
storeImpl(settings);
}
+static QByteArray hashPath(const Utils::FilePath& name)
+{
+ return QCryptographicHash::hash(name.toString().toUtf8(), QCryptographicHash::Md5);
+}
+
void BuildSystemSource::updateProjects()
{
for (auto project : ProjectExplorer::SessionManager::projects()) {
if (project) {
- auto projectName = QString::fromUtf8(project->id().name()).toLower();
- auto projectPath = project->projectFilePath().toString();
- m_projectsByBuildSystem[extractBuildSystemType(projectName)] << projectPath;
+ const auto projectName = QString::fromUtf8(project->id().name()).toLower();
+ const auto projectPath = project->projectFilePath();
+ m_projectsByBuildSystem[extractBuildSystemType(projectName)] << hashPath(projectPath);
}
}
}
diff --git a/datasources/buildsystemsource.h b/src/datasources/buildsystemsource.h
index d390c37..a6ab03c 100644
--- a/datasources/buildsystemsource.h
+++ b/src/datasources/buildsystemsource.h
@@ -73,7 +73,7 @@ private:
// Element is a set of full project paths. Full project path is used
// as a permanent unique identifier. This identifier is only for
// storing locally on user machine and should never be sent!
- using ProjectsByBuildSystem = std::array<QSet<QString>, Count>;
+ using ProjectsByBuildSystem = std::array<QSet<QByteArray>, Count>;
ProjectsByBuildSystem m_projectsByBuildSystem;
};
diff --git a/datasources/examplesdatasource.cpp b/src/datasources/examplesdatasource.cpp
index 8dc9b2d..0ff454e 100644
--- a/datasources/examplesdatasource.cpp
+++ b/src/datasources/examplesdatasource.cpp
@@ -62,7 +62,7 @@ QString ExamplesDataSource::name() const
QString ExamplesDataSource::description() const
{
- return tr("The list of examples openned by the user. "
+ return tr("The list of examples opened by you. "
"Only example paths are collected and sent, for example: "
"widgets/mainwindows/application/application.pro");
}
diff --git a/datasources/examplesdatasource.h b/src/datasources/examplesdatasource.h
index 19b5779..19b5779 100644
--- a/datasources/examplesdatasource.h
+++ b/src/datasources/examplesdatasource.h
diff --git a/datasources/kitsource.cpp b/src/datasources/kitsource.cpp
index 38d0ccc..9458853 100644
--- a/datasources/kitsource.cpp
+++ b/src/datasources/kitsource.cpp
@@ -56,7 +56,7 @@ QString KitSource::name() const
QString KitSource::description() const
{
- return tr("Kits usage statistic: compilers, debuggers, target architecture etc.");
+ return tr("Kits usage statistics: compilers, debuggers, target architecture, and so on.");
}
static QString kitsInfoKey() { return QStringLiteral("kitsInfo"); }
diff --git a/datasources/kitsource.h b/src/datasources/kitsource.h
index 4256c01..4256c01 100644
--- a/datasources/kitsource.h
+++ b/src/datasources/kitsource.h
diff --git a/datasources/modeusagetimesource.cpp b/src/datasources/modeusagetimesource.cpp
index 445e419..80e7664 100644
--- a/datasources/modeusagetimesource.cpp
+++ b/src/datasources/modeusagetimesource.cpp
@@ -50,12 +50,12 @@ ModeUsageTimeSource::~ModeUsageTimeSource() = default;
QString ModeUsageTimeSource::name() const
{
- return tr("Modes usage time");
+ return tr("Mode usage time");
}
QString ModeUsageTimeSource::description() const
{
- return tr("How much time a user spent working in each mode (edit, debug, design, etc.)");
+ return tr("How much time you spent working in different modes.");
}
// Keep synced with ModeUsageTimeSource::Mode {
diff --git a/datasources/modeusagetimesource.h b/src/datasources/modeusagetimesource.h
index f1fbde1..f1fbde1 100644
--- a/datasources/modeusagetimesource.h
+++ b/src/datasources/modeusagetimesource.h
diff --git a/datasources/qmldesignerusagetimesource.cpp b/src/datasources/qmldesignerusagetimesource.cpp
index 6bb4a32..5859345 100644
--- a/datasources/qmldesignerusagetimesource.cpp
+++ b/src/datasources/qmldesignerusagetimesource.cpp
@@ -60,12 +60,12 @@ QmlDesignerUsageTimeSource::~QmlDesignerUsageTimeSource() = default;
QString QmlDesignerUsageTimeSource::name() const
{
- return tr("QmlDesigner usage time");
+ return tr("Qt Quick Designer usage time");
}
QString QmlDesignerUsageTimeSource::description() const
{
- return tr("How long a user spent editing QML files in designer mode");
+ return tr("How much time you spent editing QML files in Design mode.");
}
static bool isDesignMode(const QString &modeName)
diff --git a/datasources/qmldesignerusagetimesource.h b/src/datasources/qmldesignerusagetimesource.h
index 3cadf57..3cadf57 100644
--- a/datasources/qmldesignerusagetimesource.h
+++ b/src/datasources/qmldesignerusagetimesource.h
diff --git a/datasources/qtclicensesource.cpp b/src/datasources/qtclicensesource.cpp
index bee2c8c..bee2c8c 100644
--- a/datasources/qtclicensesource.cpp
+++ b/src/datasources/qtclicensesource.cpp
diff --git a/datasources/qtclicensesource.h b/src/datasources/qtclicensesource.h
index 80630d2..80630d2 100644
--- a/datasources/qtclicensesource.h
+++ b/src/datasources/qtclicensesource.h
diff --git a/src/datasources/servicesource.cpp b/src/datasources/servicesource.cpp
new file mode 100644
index 0000000..8bb71eb
--- /dev/null
+++ b/src/datasources/servicesource.cpp
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** 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.
+**
+****************************************************************************/
+#include "servicesource.h"
+
+#include <QtCore/QDateTime>
+#include <QtCore/QSettings>
+
+#include "common/utils.h"
+#include "common/scopedsettingsgroupsetter.h"
+
+namespace UsageStatistic {
+namespace Internal {
+
+using namespace KUserFeedback;
+
+ServiceSource::ServiceSource(std::shared_ptr<KUserFeedback::Provider> provider)
+ : AbstractDataSource(QStringLiteral("serviceData"), Provider::BasicSystemInformation)
+ , m_provider(std::move(provider))
+{
+}
+
+QString ServiceSource::name() const
+{
+ return tr("Service data");
+}
+
+QString ServiceSource::description() const
+{
+ return tr("Additional technical things to make data processing more reliable and useful");
+}
+
+static QString documentVersionKey() { return QStringLiteral("documentVersion"); }
+static QString telemetryLevelKey() { return QStringLiteral("telemetryLevel"); }
+static QString createdAtKey() { return QStringLiteral("createdAt"); }
+static QString uuidKey() { return QStringLiteral("uuid"); }
+
+static QString documentVersionString()
+{
+ static const auto versionString = [](){
+ const Utils::DocumentVersion v;
+ return QStringLiteral("%1.%2.%3").arg(v.major).arg(v.minor).arg(v.patch);
+ }();
+ return versionString;
+}
+
+static int telemetryLevel(const std::shared_ptr<KUserFeedback::Provider> &provider)
+{
+ if (!provider) {
+ return -1;
+ }
+
+ switch (provider->telemetryMode()) {
+ case Provider::BasicSystemInformation:
+ return 1;
+ case Provider::BasicUsageStatistics:
+ return 2;
+ case Provider::DetailedSystemInformation:
+ return 3;
+ case Provider::DetailedUsageStatistics:
+ return 4;
+ default:
+ return -1;
+ }
+}
+
+static QString createdAtString()
+{
+ return QDateTime::currentDateTime().toString(Qt::ISODate);
+}
+
+QVariant ServiceSource::data()
+{
+ return QVariantMap{{documentVersionKey(), documentVersionString()},
+ {telemetryLevelKey(), telemetryLevel(m_provider)},
+ {createdAtKey(), createdAtString()},
+ {uuidKey(), m_uuid.toString(QUuid::WithoutBraces)}};
+}
+
+void ServiceSource::loadImpl(QSettings *settings)
+{
+ auto setter = ScopedSettingsGroupSetter::forDataSource(*this, *settings);
+ m_uuid = qvariant_cast<QUuid>(settings->value(uuidKey(), m_uuid));
+}
+
+void ServiceSource::storeImpl(QSettings *settings)
+{
+ auto setter = ScopedSettingsGroupSetter::forDataSource(*this, *settings);
+ settings->setValue(uuidKey(), m_uuid);
+}
+
+} // Internal
+} // UsageStatistic
diff --git a/src/datasources/servicesource.h b/src/datasources/servicesource.h
new file mode 100644
index 0000000..707c407
--- /dev/null
+++ b/src/datasources/servicesource.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** 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 <memory>
+
+#include <QtCore/QVariantMap>
+#include <QtCore/QUuid>
+
+#include <KUserFeedback/AbstractDataSource>
+#include <KUserFeedback/Provider>
+
+namespace UsageStatistic {
+namespace Internal {
+
+//! Additional technical data
+class ServiceSource : public KUserFeedback::AbstractDataSource
+{
+ Q_DECLARE_TR_FUNCTIONS(ServiceSource)
+
+public:
+ ServiceSource(std::shared_ptr<KUserFeedback::Provider> provider);
+
+public: // AbstractDataSource interface
+ QString name() const override;
+
+ QString description() const override;
+
+ /*! The output data format is:
+ * {
+ * "createdAt": "2019-10-14T10:22:38",
+ * "documentVersion": "1.0.0",
+ * "telemetryLevel": 4,
+ * "uuid": "049e5987-32de-487c-9e35-39b1a1380329"
+ * }
+ */
+ QVariant data() override;
+
+ void loadImpl(QSettings *settings) override;
+ void storeImpl(QSettings *settings) override;
+
+private:
+ std::shared_ptr<KUserFeedback::Provider> m_provider;
+ QUuid m_uuid = QUuid::createUuid();
+};
+
+} // Internal
+} // UsageStatistic
diff --git a/datasources/timeusagesourcebase.cpp b/src/datasources/timeusagesourcebase.cpp
index ab4c1e1..ab4c1e1 100644
--- a/datasources/timeusagesourcebase.cpp
+++ b/src/datasources/timeusagesourcebase.cpp
diff --git a/datasources/timeusagesourcebase.h b/src/datasources/timeusagesourcebase.h
index e3d3730..e3d3730 100644
--- a/datasources/timeusagesourcebase.h
+++ b/src/datasources/timeusagesourcebase.h
diff --git a/images/settingscategory_usagestatistic.png b/src/images/settingscategory_usagestatistic.png
index e45c00b..e45c00b 100644
--- a/images/settingscategory_usagestatistic.png
+++ b/src/images/settingscategory_usagestatistic.png
Binary files differ
diff --git a/images/settingscategory_usagestatistic.svg b/src/images/settingscategory_usagestatistic.svg
index c4bd019..c4bd019 100644
--- a/images/settingscategory_usagestatistic.svg
+++ b/src/images/settingscategory_usagestatistic.svg
diff --git a/images/settingscategory_usagestatistic@2x.png b/src/images/settingscategory_usagestatistic@2x.png
index 136c67e..136c67e 100644
--- a/images/settingscategory_usagestatistic@2x.png
+++ b/src/images/settingscategory_usagestatistic@2x.png
Binary files differ
diff --git a/services/datasubmitter.cpp b/src/services/datasubmitter.cpp
index ea8d2c4..ea8d2c4 100644
--- a/services/datasubmitter.cpp
+++ b/src/services/datasubmitter.cpp
diff --git a/services/datasubmitter.h b/src/services/datasubmitter.h
index 1ae66ac..1ae66ac 100644
--- a/services/datasubmitter.h
+++ b/src/services/datasubmitter.h
diff --git a/usagestatistic.pro b/src/src.pro
index f9fd69d..897f53c 100644
--- a/usagestatistic.pro
+++ b/src/src.pro
@@ -11,6 +11,7 @@ DEFINES += $$shell_quote(USP_SERVER_URL=\"$$(USP_SERVER_URL)\")
# UsageStatistic files
SOURCES += \
+ datasources/servicesource.cpp \
usagestatisticplugin.cpp \
datasources/qtclicensesource.cpp \
datasources/buildcountsource.cpp \
@@ -28,6 +29,7 @@ SOURCES += \
services/datasubmitter.cpp
HEADERS += \
+ datasources/servicesource.h \
usagestatisticplugin.h \
usagestatistic_global.h \
usagestatisticconstants.h \
@@ -88,7 +90,7 @@ QTC_PLUGIN_RECOMMENDS += \
###### End _dependencies.pri contents ######
# KUserFeedback
-include(3rdparty/kuserfeedback/kuserfeedback.pri)
+include(../3rdparty/kuserfeedback/kuserfeedback.pri)
include($$IDE_SOURCE_TREE/src/qtcreatorplugin.pri)
@@ -96,5 +98,3 @@ FORMS += \
ui/usagestatisticwidget.ui \
ui/encouragementwidget.ui
-QMAKE_EXTRA_TARGETS += docs install_docs # dummy targets for consistency
-
diff --git a/ui/encouragementwidget.cpp b/src/ui/encouragementwidget.cpp
index 457422e..457422e 100644
--- a/ui/encouragementwidget.cpp
+++ b/src/ui/encouragementwidget.cpp
diff --git a/ui/encouragementwidget.h b/src/ui/encouragementwidget.h
index 6386a54..6386a54 100644
--- a/ui/encouragementwidget.h
+++ b/src/ui/encouragementwidget.h
diff --git a/ui/encouragementwidget.ui b/src/ui/encouragementwidget.ui
index 19f24a1..19f24a1 100644
--- a/ui/encouragementwidget.ui
+++ b/src/ui/encouragementwidget.ui
diff --git a/ui/outputpane.cpp b/src/ui/outputpane.cpp
index 3529ca3..3529ca3 100644
--- a/ui/outputpane.cpp
+++ b/src/ui/outputpane.cpp
diff --git a/ui/outputpane.h b/src/ui/outputpane.h
index 039b3f2..039b3f2 100644
--- a/ui/outputpane.h
+++ b/src/ui/outputpane.h
diff --git a/ui/usagestatisticpage.cpp b/src/ui/usagestatisticpage.cpp
index a81fc87..c3c6558 100644
--- a/ui/usagestatisticpage.cpp
+++ b/src/ui/usagestatisticpage.cpp
@@ -85,7 +85,7 @@ void UsageStatisticPage::configure()
setCategoryIcon(Utils::Icon({{":/usagestatistic/images/settingscategory_usagestatistic.png",
Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint));
- setDisplayName(tr("Usage Statistic"));
+ setDisplayName(tr("Usage Statistics"));
setDisplayCategory(tr("Telemetry"));
}
diff --git a/ui/usagestatisticpage.h b/src/ui/usagestatisticpage.h
index 1052611..1052611 100644
--- a/ui/usagestatisticpage.h
+++ b/src/ui/usagestatisticpage.h
diff --git a/ui/usagestatisticwidget.cpp b/src/ui/usagestatisticwidget.cpp
index b6f7a3b..b6f7a3b 100644
--- a/ui/usagestatisticwidget.cpp
+++ b/src/ui/usagestatisticwidget.cpp
diff --git a/ui/usagestatisticwidget.h b/src/ui/usagestatisticwidget.h
index fb3341a..fb3341a 100644
--- a/ui/usagestatisticwidget.h
+++ b/src/ui/usagestatisticwidget.h
diff --git a/ui/usagestatisticwidget.ui b/src/ui/usagestatisticwidget.ui
index 484b69a..484b69a 100644
--- a/ui/usagestatisticwidget.ui
+++ b/src/ui/usagestatisticwidget.ui
diff --git a/usagestatistic.qrc b/src/usagestatistic.qrc
index 8ab02df..8ab02df 100644
--- a/usagestatistic.qrc
+++ b/src/usagestatistic.qrc
diff --git a/usagestatistic_global.h b/src/usagestatistic_global.h
index 094f51e..094f51e 100644
--- a/usagestatistic_global.h
+++ b/src/usagestatistic_global.h
diff --git a/usagestatisticconstants.h b/src/usagestatisticconstants.h
index 0abde08..0abde08 100644
--- a/usagestatisticconstants.h
+++ b/src/usagestatisticconstants.h
diff --git a/usagestatisticplugin.cpp b/src/usagestatisticplugin.cpp
index df09d74..5f04486 100644
--- a/usagestatisticplugin.cpp
+++ b/src/usagestatisticplugin.cpp
@@ -53,6 +53,7 @@
#include "datasources/examplesdatasource.h"
#include "datasources/kitsource.h"
#include "datasources/qmldesignerusagetimesource.h"
+#include "datasources/servicesource.h"
#include "services/datasubmitter.h"
@@ -110,6 +111,13 @@ static void addQtCreatorDataSources(KUserFeedback::Provider &provider)
provider.addDataSource(new QmlDesignerUsageTimeSource);
}
+static void addServiceDataSource(const std::shared_ptr<KUserFeedback::Provider> &provider)
+{
+ if (provider) {
+ provider->addDataSource(new ServiceSource(provider));
+ }
+}
+
bool UsageStatisticPlugin::delayedInitialize()
{
// We should create the provider only after everything else
@@ -118,6 +126,7 @@ bool UsageStatisticPlugin::delayedInitialize()
addDefaultDataSources(*m_provider);
addQtCreatorDataSources(*m_provider);
+ addServiceDataSource(m_provider);
createUsageStatisticPage();
diff --git a/usagestatisticplugin.h b/src/usagestatisticplugin.h
index 139acc3..139acc3 100644
--- a/usagestatisticplugin.h
+++ b/src/usagestatisticplugin.h