summaryrefslogtreecommitdiffstats
path: root/libraries/ganalytics
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-12-05 02:29:08 +0100
committerPetr Mrázek <peterix@gmail.com>2017-01-01 20:04:08 +0100
commit722896d41f15a8bc78a864f7adcfd0527648073c (patch)
tree027d64870a6c38b0f93792bcf13772934ca8a1e5 /libraries/ganalytics
parent46c5368a784499c0ac4975b8a157a0f923c18b5a (diff)
downloadMultiMC-722896d41f15a8bc78a864f7adcfd0527648073c.tar
MultiMC-722896d41f15a8bc78a864f7adcfd0527648073c.tar.gz
MultiMC-722896d41f15a8bc78a864f7adcfd0527648073c.tar.lz
MultiMC-722896d41f15a8bc78a864f7adcfd0527648073c.tar.xz
MultiMC-722896d41f15a8bc78a864f7adcfd0527648073c.zip
NOISSUE Translations model and initial setup wizard work
Diffstat (limited to 'libraries/ganalytics')
-rw-r--r--libraries/ganalytics/include/ganalytics.h4
-rw-r--r--libraries/ganalytics/src/ganalytics.cpp8
-rw-r--r--libraries/ganalytics/src/ganalytics_worker.h1
3 files changed, 11 insertions, 2 deletions
diff --git a/libraries/ganalytics/include/ganalytics.h b/libraries/ganalytics/include/ganalytics.h
index 1776c71e..bfca6d37 100644
--- a/libraries/ganalytics/include/ganalytics.h
+++ b/libraries/ganalytics/include/ganalytics.h
@@ -12,7 +12,7 @@ class GAnalytics : public QObject
Q_ENUMS(LogLevel)
public:
- explicit GAnalytics(const QString &trackingID, const QString &clientID, QObject *parent = 0);
+ explicit GAnalytics(const QString &trackingID, const QString &clientID, const int version, QObject *parent = 0);
~GAnalytics();
public:
@@ -23,6 +23,8 @@ public:
Error
};
+ int version();
+
void setLogLevel(LogLevel logLevel);
LogLevel logLevel() const;
diff --git a/libraries/ganalytics/src/ganalytics.cpp b/libraries/ganalytics/src/ganalytics.cpp
index bc3fe21e..5f2d1484 100644
--- a/libraries/ganalytics/src/ganalytics.cpp
+++ b/libraries/ganalytics/src/ganalytics.cpp
@@ -14,11 +14,12 @@
#include <QUrlQuery>
#include <QUuid>
-GAnalytics::GAnalytics(const QString &trackingID, const QString &clientID, QObject *parent) : QObject(parent)
+GAnalytics::GAnalytics(const QString &trackingID, const QString &clientID, const int version, QObject *parent) : QObject(parent)
{
d = new GAnalyticsWorker(this);
d->m_trackingID = trackingID;
d->m_clientID = clientID;
+ d->m_version = version;
}
/**
@@ -90,6 +91,11 @@ void GAnalytics::enable(bool state)
d->enable(state);
}
+int GAnalytics::version()
+{
+ return d->m_version;
+}
+
void GAnalytics::setNetworkAccessManager(QNetworkAccessManager *networkAccessManager)
{
if (d->networkManager != networkAccessManager)
diff --git a/libraries/ganalytics/src/ganalytics_worker.h b/libraries/ganalytics/src/ganalytics_worker.h
index 3504a032..559e0eb6 100644
--- a/libraries/ganalytics/src/ganalytics_worker.h
+++ b/libraries/ganalytics/src/ganalytics_worker.h
@@ -40,6 +40,7 @@ public:
bool m_anonymizeIPs = false;
bool m_isEnabled = false;
int m_timerInterval = 30000;
+ int m_version = 0;
const static int fourHours = 4 * 60 * 60 * 1000;
const static QLatin1String dateTimeFormat;