summaryrefslogtreecommitdiffstats
path: root/libraries/ganalytics/src
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ganalytics/src')
-rw-r--r--libraries/ganalytics/src/ganalytics.cpp8
-rw-r--r--libraries/ganalytics/src/ganalytics_worker.h1
2 files changed, 8 insertions, 1 deletions
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;