diff options
author | Vitaly Fanaskov <vitaly.fanaskov@qt.io> | 2019-06-14 13:52:10 +0200 |
---|---|---|
committer | Vitaly Fanaskov <vitaly.fanaskov@qt.io> | 2019-06-19 16:58:23 +0200 |
commit | cb6a29b86acb9d7f163e32bda4a7d6aa7775d69d (patch) | |
tree | 4b7fe01731567d00c4dbe20f2551bc6f914e32e2 /usagestatistic.pro |
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 'usagestatistic.pro')
-rw-r--r-- | usagestatistic.pro | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/usagestatistic.pro b/usagestatistic.pro new file mode 100644 index 0000000..47216f5 --- /dev/null +++ b/usagestatistic.pro @@ -0,0 +1,93 @@ +DEFINES += USAGESTATISTIC_LIBRARY + +KUSERFEEDBACK_PATH = "$${PWD}/3rdparty/kuserfeedback" + +INCLUDEPATH *= "$${KUSERFEEDBACK_PATH}/include" "$${PWD}" +LIBS *= -L"$${KUSERFEEDBACK_PATH}/lib" -lKUserFeedbackCore -lKUserFeedbackWidgets -lKUserFeedbackCommon + +CONFIG += c++1z +QMAKE_CXXFLAGS *= -Wall -Wextra -pedantic + +DEFINES += $$shell_quote(USP_AUTH_KEY=\"$$(USP_AUTH_KEY)\") +DEFINES += $$shell_quote(USP_SERVER_URL=\"$$(USP_SERVER_URL)\") + +# UsageStatistic files +SOURCES += \ + usagestatisticplugin.cpp \ + datasources/qtclicensesource.cpp \ + datasources/buildcountsource.cpp \ + common/scopedsettingsgroupsetter.cpp \ + datasources/buildsystemsource.cpp \ + datasources/timeusagesourcebase.cpp \ + datasources/modeusagetimesource.cpp \ + datasources/examplesdatasource.cpp \ + datasources/kitsource.cpp \ + datasources/qmldesignerusagetimesource.cpp \ + ui/usagestatisticpage.cpp \ + ui/usagestatisticwidget.cpp \ + ui/outputpane.cpp \ + ui/encouragementwidget.cpp \ + services/datasubmitter.cpp + +HEADERS += \ + usagestatisticplugin.h \ + usagestatistic_global.h \ + usagestatisticconstants.h \ + datasources/qtclicensesource.h \ + datasources/buildcountsource.h \ + common/scopedsettingsgroupsetter.h \ + datasources/buildsystemsource.h \ + datasources/timeusagesourcebase.h \ + datasources/modeusagetimesource.h \ + datasources/examplesdatasource.h \ + datasources/kitsource.h \ + datasources/qmldesignerusagetimesource.h \ + ui/usagestatisticpage.h \ + ui/usagestatisticwidget.h \ + ui/outputpane.h \ + ui/encouragementwidget.h \ + services/datasubmitter.h \ + common/utils.h + +# Qt Creator linking + +## Either set the IDE_SOURCE_TREE when running qmake, +## or set the QTC_SOURCE environment variable, to override the default setting +isEmpty(IDE_SOURCE_TREE): IDE_SOURCE_TREE = $$(QTC_SOURCE) + +## Either set the IDE_BUILD_TREE when running qmake, +## or set the QTC_BUILD environment variable, to override the default setting +isEmpty(IDE_BUILD_TREE): IDE_BUILD_TREE = $$(QTC_BUILD) + +## uncomment to build plugin into user config directory +## <localappdata>/plugins/<ideversion> +## where <localappdata> is e.g. +## "%LOCALAPPDATA%\QtProject\qtcreator" on Windows Vista and later +## "$XDG_DATA_HOME/data/QtProject/qtcreator" or "~/.local/share/data/QtProject/qtcreator" on Linux +## "~/Library/Application Support/QtProject/Qt Creator" on macOS +# USE_USER_DESTDIR = yes + +###### If the plugin can be depended upon by other plugins, this code needs to be outsourced to +###### <dirname>_dependencies.pri, where <dirname> is the name of the directory containing the +###### plugin's sources. + +QTC_PLUGIN_NAME = UsageStatistic +QTC_LIB_DEPENDS += \ + # nothing here at this time + +QTC_PLUGIN_DEPENDS += \ + coreplugin \ + debugger \ + projectexplorer \ + qtsupport + +QTC_PLUGIN_RECOMMENDS += \ + # optional plugin dependencies. nothing here at this time + +###### End _dependencies.pri contents ###### + +include($$IDE_SOURCE_TREE/src/qtcreatorplugin.pri) + +FORMS += \ + ui/usagestatisticwidget.ui \ + ui/encouragementwidget.ui |