mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Added application version to logger
This commit is contained in:
parent
f33ad8a100
commit
d102795314
3 changed files with 13 additions and 10 deletions
|
@ -269,7 +269,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
|||
|
||||
// set the account manager's root URL and trigger a login request if we don't have the access token
|
||||
accountManager.setAuthURL(DEFAULT_NODE_AUTH_URL);
|
||||
UserActivityLogger::getInstance().launch();
|
||||
UserActivityLogger::getInstance().launch(applicationVersion());
|
||||
|
||||
// once the event loop has started, check and signal for an access token
|
||||
QMetaObject::invokeMethod(&accountManager, "checkAndSignalForAccessToken", Qt::QueuedConnection);
|
||||
|
|
|
@ -66,26 +66,29 @@ void UserActivityLogger::requestError(QNetworkReply::NetworkError error,const QS
|
|||
qDebug() << error << ": " << string;
|
||||
}
|
||||
|
||||
void UserActivityLogger::launch() {
|
||||
void UserActivityLogger::launch(QString applicationVersion) {
|
||||
const QString ACTION_NAME = "launch";
|
||||
QJsonObject actionDetails;
|
||||
|
||||
QString OS_KEY = "OS";
|
||||
QString VERSION_KEY = "Version";
|
||||
QString APP_VERION = "application_version";
|
||||
QString OS_KEY = "os";
|
||||
QString VERSION_KEY = "version";
|
||||
#ifdef Q_OS_MAC
|
||||
actionDetails.insert(OS_KEY, QJsonValue(QString("Mac")));
|
||||
actionDetails.insert(OS_KEY, QJsonValue(QString("osx")));
|
||||
actionDetails.insert(VERSION_KEY, QJsonValue(QSysInfo::macVersion()));
|
||||
#elif Q_OS_LINUX
|
||||
actionDetails.insert(OS_KEY, QJsonValue(QString("Linux")));
|
||||
actionDetails.insert(OS_KEY, QJsonValue(QString("linux")));
|
||||
#elif Q_OS_WIN
|
||||
actionDetails.insert(OS_KEY, QJsonValue(QString("Windows")));
|
||||
actionDetails.insert(OS_KEY, QJsonValue(QString("windows")));
|
||||
actionDetails.insert(VERSION_KEY, QJsonValue(QSysInfo::windowsVersion()));
|
||||
#elif Q_OS_UNIX
|
||||
actionDetails.insert(OS_KEY, QJsonValue(QString("Unknown UNIX")));
|
||||
actionDetails.insert(OS_KEY, QJsonValue(QString("unknown unix")));
|
||||
#else
|
||||
actionDetails.insert(OS_KEY, QJsonValue(QString("Unknown system")));
|
||||
actionDetails.insert(OS_KEY, QJsonValue(QString("unknown system")));
|
||||
#endif
|
||||
|
||||
actionDetails.insert(APP_VERION, applicationVersion);
|
||||
|
||||
logAction(ACTION_NAME, actionDetails);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
public slots:
|
||||
void logAction(QString action, QJsonObject details = QJsonObject(), JSONCallbackParameters params = JSONCallbackParameters());
|
||||
|
||||
void launch();
|
||||
void launch(QString applicationVersion);
|
||||
void close(JSONCallbackParameters params = JSONCallbackParameters());
|
||||
void changedDisplayName(QString displayName);
|
||||
void changedModel(QString typeOfModel, QString modelURL);
|
||||
|
|
Loading…
Reference in a new issue