Telemetry system updated

This commit is contained in:
Syping 2018-05-31 06:12:47 +02:00
parent bd97ee86ba
commit cd20e0b512
15 changed files with 100 additions and 113 deletions

View File

@ -52,12 +52,8 @@ void TelemetryClass::init()
{
QSettings settings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR);
settings.beginGroup("Telemetry");
#ifndef GTA5SYNC_BUILDTYPE_DEV
telemetryEnabled = settings.value("IsEnabled", false).toBool();
#else
telemetryEnabled = true; // Always enable Telemetry for Developer Versions
telemetryEnabled = true;
telemetryStateForced = true;
#endif
QString telemetryLegacyClientID = settings.value("ClientID", QString()).toString();
if (telemetryLegacyClientID.isEmpty() || telemetryLegacyClientID == "v2+")
{

View File

@ -617,7 +617,6 @@ QString TranslationClass::getCountryCode(QLocale locale)
QStringList localeStrList = locale.name().split("_");
if (localeStrList.length() >= 2)
{
qDebug() << localeStrList;
return localeStrList.at(1).toLower();
}
else

View File

@ -116,18 +116,8 @@ int main(int argc, char *argv[])
Translator->loadTranslation(&a);
#ifdef GTA5SYNC_TELEMETRY
if (!applicationArgs.contains("--disable-telemetry"))
{
if (!applicationArgs.contains("--skip-telemetryinit"))
{
Telemetry->init();
Telemetry->work();
}
}
else
{
Telemetry->setDisabled(true);
}
Telemetry->init();
Telemetry->work();
#endif
if (!applicationArgs.contains("--skip-firststart"))
@ -148,8 +138,9 @@ int main(int argc, char *argv[])
}
#ifdef GTA5SYNC_TELEMETRY
bool telemetryWindowLaunched = settings.value("TelemetryWindowLaunched", false).toBool();
if (!telemetryWindowLaunched && !Telemetry->isEnabled() && !Telemetry->isStateForced())
bool telemetryWindowLaunched = settings.value("PersonalUsageDataWindowLaunched", false).toBool();
bool pushUsageData = settings.value("PushUsageData", false).toBool();
if (!telemetryWindowLaunched && !pushUsageData)
{
QDialog *telemetryDialog = new QDialog();
telemetryDialog->setObjectName(QStringLiteral("TelemetryDialog"));
@ -161,12 +152,13 @@ int main(int argc, char *argv[])
telemetryDialog->setLayout(telemetryLayout);
UiModLabel *telemetryLabel = new UiModLabel(telemetryDialog);
telemetryLabel->setObjectName(QStringLiteral("TelemetryLabel"));
telemetryLabel->setText(QString("<h4>%2</h4>%1").arg(QApplication::translate("TelemetryDialog", "You want help %1 to improve in the future by collection of data?").arg(GTA5SYNC_APPSTR), QApplication::translate("TelemetryDialog", "%1 User Statistics").arg(GTA5SYNC_APPSTR)));
telemetryLabel->setText(QString("<h4>%2</h4>%1").arg(
QApplication::translate("TelemetryDialog", "You want help %1 to improve in the future by including personal usage data in your submission?").arg(GTA5SYNC_APPSTR),
QApplication::translate("TelemetryDialog", "%1 User Statistics").arg(GTA5SYNC_APPSTR)));
telemetryLayout->addWidget(telemetryLabel);
QCheckBox *telemetryCheckBox = new QCheckBox(telemetryDialog);
telemetryCheckBox->setObjectName(QStringLiteral("TelemetryCheckBox"));
telemetryCheckBox->setText(QApplication::translate("TelemetryDialog", "Yes, I would like to take part."));
telemetryCheckBox->setChecked(true);
telemetryCheckBox->setText(QApplication::translate("TelemetryDialog", "Yes, I want include personal usage data."));
telemetryLayout->addWidget(telemetryCheckBox);
QHBoxLayout *telemetryButtonLayout = new QHBoxLayout();
telemetryButtonLayout->setObjectName(QStringLiteral("TelemetryButtonLayout"));
@ -185,12 +177,12 @@ int main(int argc, char *argv[])
{
QSettings telemetrySettings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR);
telemetrySettings.beginGroup("Telemetry");
telemetrySettings.setValue("IsEnabled", true);
telemetrySettings.setValue("PushUsageData", true);
telemetrySettings.endGroup();
Telemetry->init();
Telemetry->work();
}
settings.setValue("TelemetryWindowLaunched", true);
settings.setValue("PersonalUsageDataWindowLaunched", true);
delete telemetryDialog;
}
#endif

Binary file not shown.

View File

@ -758,7 +758,7 @@ Y: %2</translation>
<translation>Snapmatic Bildansicht - %1</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="117"/>
<location filename="../PictureDialog.ui" line="114"/>
<source>&lt;span style=&quot; font-weight:600;&quot;&gt;Title: &lt;/span&gt;%6&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Location: &lt;/span&gt;%7 (%1, %2, %3)&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Players: &lt;/span&gt;%4 (Crew %5)&lt;br/&gt;
@ -769,22 +769,22 @@ Y: %2</translation>
&lt;span style=&quot; font-weight:600;&quot;&gt;Erstellt: &lt;/span&gt;%8</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="177"/>
<location filename="../PictureDialog.ui" line="174"/>
<source>Manage picture</source>
<translation>Bild verwalten</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="180"/>
<location filename="../PictureDialog.ui" line="177"/>
<source>&amp;Manage</source>
<translation>&amp;Verwalten</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="199"/>
<location filename="../PictureDialog.ui" line="196"/>
<source>Close viewer</source>
<translation>Ansicht schließen</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="202"/>
<location filename="../PictureDialog.ui" line="199"/>
<source>&amp;Close</source>
<translation>S&amp;chließen</translation>
</message>
@ -1432,7 +1432,7 @@ Drücke 1 für Standardmodus</translation>
<translation>Ausgewähle Schrift: %1</translation>
</message>
<message>
<location filename="../main.cpp" line="137"/>
<location filename="../main.cpp" line="127"/>
<source>&lt;h4&gt;Welcome to %1!&lt;/h4&gt;You want to configure %1 before you start using it?</source>
<translation>&lt;h4&gt;Willkommen zu %1!&lt;/h4&gt;Möchtest du %1 einstellen bevor du es nutzt?</translation>
</message>
@ -2001,22 +2001,22 @@ Drücke 1 für Standardmodus</translation>
<context>
<name>TelemetryDialog</name>
<message>
<location filename="../main.cpp" line="164"/>
<location filename="../main.cpp" line="157"/>
<source>%1 User Statistics</source>
<translation>%1 Benutzerstatistik</translation>
</message>
<message>
<location filename="../main.cpp" line="164"/>
<source>You want help %1 to improve in the future by collection of data?</source>
<translation>Möchtest du helfen %1 in der Zukunft zu verbessern durch Sammlung von Daten?</translation>
<location filename="../main.cpp" line="156"/>
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
<translation>Sollen bei Einreichungen Persönliche Nutzungsdaten einbezogen werden um %1 in der Zukunft zu unterstützen?</translation>
</message>
<message>
<location filename="../main.cpp" line="168"/>
<source>Yes, I would like to take part.</source>
<translation>Ja, ich möchte teilnehmen.</translation>
<location filename="../main.cpp" line="161"/>
<source>Yes, I want include personal usage data.</source>
<translation>Ja, ich möchte Persönliche Nutzungsdaten einbeziehen.</translation>
</message>
<message>
<location filename="../main.cpp" line="178"/>
<location filename="../main.cpp" line="170"/>
<source>&amp;OK</source>
<translation>&amp;OK</translation>
</message>

Binary file not shown.

View File

@ -746,7 +746,7 @@ Y: %2</source>
<translation></translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="117"/>
<location filename="../PictureDialog.ui" line="114"/>
<source>&lt;span style=&quot; font-weight:600;&quot;&gt;Title: &lt;/span&gt;%6&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Location: &lt;/span&gt;%7 (%1, %2, %3)&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Players: &lt;/span&gt;%4 (Crew %5)&lt;br/&gt;
@ -754,22 +754,22 @@ Y: %2</source>
<translation></translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="177"/>
<location filename="../PictureDialog.ui" line="174"/>
<source>Manage picture</source>
<translation></translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="180"/>
<location filename="../PictureDialog.ui" line="177"/>
<source>&amp;Manage</source>
<translation></translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="199"/>
<location filename="../PictureDialog.ui" line="196"/>
<source>Close viewer</source>
<translation></translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="202"/>
<location filename="../PictureDialog.ui" line="199"/>
<source>&amp;Close</source>
<translation></translation>
</message>
@ -1409,7 +1409,7 @@ Press 1 for Default View</source>
<translation></translation>
</message>
<message>
<location filename="../main.cpp" line="137"/>
<location filename="../main.cpp" line="127"/>
<source>&lt;h4&gt;Welcome to %1!&lt;/h4&gt;You want to configure %1 before you start using it?</source>
<translation></translation>
</message>
@ -1976,22 +1976,22 @@ Press 1 for Default View</source>
<context>
<name>TelemetryDialog</name>
<message>
<location filename="../main.cpp" line="164"/>
<location filename="../main.cpp" line="157"/>
<source>%1 User Statistics</source>
<translation></translation>
</message>
<message>
<location filename="../main.cpp" line="164"/>
<source>You want help %1 to improve in the future by collection of data?</source>
<translation></translation>
<location filename="../main.cpp" line="156"/>
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="168"/>
<source>Yes, I would like to take part.</source>
<translation></translation>
<location filename="../main.cpp" line="161"/>
<source>Yes, I want include personal usage data.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="178"/>
<location filename="../main.cpp" line="170"/>
<source>&amp;OK</source>
<translation></translation>
</message>

Binary file not shown.

View File

@ -758,7 +758,7 @@ Y : %2</translation>
<translation>Visionneuse de photo Snapmatic - %1</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="117"/>
<location filename="../PictureDialog.ui" line="114"/>
<source>&lt;span style=&quot; font-weight:600;&quot;&gt;Title: &lt;/span&gt;%6&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Location: &lt;/span&gt;%7 (%1, %2, %3)&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Players: &lt;/span&gt;%4 (Crew %5)&lt;br/&gt;
@ -769,22 +769,22 @@ Y : %2</translation>
&lt;span style=&quot; font-weight:600;&quot;&gt;Créé le : &lt;/span&gt;%8</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="177"/>
<location filename="../PictureDialog.ui" line="174"/>
<source>Manage picture</source>
<translation>Gestion de l&apos;image</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="180"/>
<location filename="../PictureDialog.ui" line="177"/>
<source>&amp;Manage</source>
<translation>&amp;Gestion</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="199"/>
<location filename="../PictureDialog.ui" line="196"/>
<source>Close viewer</source>
<translation>Fermer la visionneuse</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="202"/>
<location filename="../PictureDialog.ui" line="199"/>
<source>&amp;Close</source>
<translation>&amp;Fermer</translation>
</message>
@ -1433,7 +1433,7 @@ Appuyer sur 1 pour le mode par défaut</translation>
<translation>Police sélectionnée : %1</translation>
</message>
<message>
<location filename="../main.cpp" line="137"/>
<location filename="../main.cpp" line="127"/>
<source>&lt;h4&gt;Welcome to %1!&lt;/h4&gt;You want to configure %1 before you start using it?</source>
<translation>&lt;h4&gt;Bienvenue sur %1!&lt;/h4&gt;Voulez-vous configurer %1 avant de l&apos;utiliser t?</translation>
</message>
@ -2004,22 +2004,22 @@ Appuyer sur 1 pour le mode par défaut</translation>
<context>
<name>TelemetryDialog</name>
<message>
<location filename="../main.cpp" line="164"/>
<location filename="../main.cpp" line="157"/>
<source>%1 User Statistics</source>
<translation>%1 Statistiques d&apos;usage</translation>
</message>
<message>
<location filename="../main.cpp" line="164"/>
<source>You want help %1 to improve in the future by collection of data?</source>
<translation>Voulez-vous aider à améliorer %1 en envoyant vos données d&apos;utilisation ?</translation>
<location filename="../main.cpp" line="156"/>
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="168"/>
<source>Yes, I would like to take part.</source>
<translation>Oui, je veux participer.</translation>
<location filename="../main.cpp" line="161"/>
<source>Yes, I want include personal usage data.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="178"/>
<location filename="../main.cpp" line="170"/>
<source>&amp;OK</source>
<translation>&amp;OK</translation>
</message>

Binary file not shown.

View File

@ -758,7 +758,7 @@ Y: %2</translation>
<context>
<name>PictureDialog</name>
<message>
<location filename="../PictureDialog.ui" line="117"/>
<location filename="../PictureDialog.ui" line="114"/>
<source>&lt;span style=&quot; font-weight:600;&quot;&gt;Title: &lt;/span&gt;%6&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Location: &lt;/span&gt;%7 (%1, %2, %3)&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Players: &lt;/span&gt;%4 (Crew %5)&lt;br/&gt;
@ -769,12 +769,12 @@ Y: %2</translation>
&lt;span style=&quot; font-weight:600;&quot;&gt;Сделано: &lt;/span&gt;%8</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="180"/>
<location filename="../PictureDialog.ui" line="177"/>
<source>&amp;Manage</source>
<translation>&amp;Управление</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="177"/>
<location filename="../PictureDialog.ui" line="174"/>
<source>Manage picture</source>
<translation>Настройки картинки</translation>
</message>
@ -784,12 +784,12 @@ Y: %2</translation>
<translation>Просмотрщик фотографий Snapmatic - %1</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="199"/>
<location filename="../PictureDialog.ui" line="196"/>
<source>Close viewer</source>
<translation>Закрыть просмотрщик</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="202"/>
<location filename="../PictureDialog.ui" line="199"/>
<source>&amp;Close</source>
<translation>&amp;Закрыть</translation>
</message>
@ -1439,7 +1439,7 @@ Press 1 for Default View</source>
<translation>Выбранный шрифт: %1</translation>
</message>
<message>
<location filename="../main.cpp" line="137"/>
<location filename="../main.cpp" line="127"/>
<source>&lt;h4&gt;Welcome to %1!&lt;/h4&gt;You want to configure %1 before you start using it?</source>
<translation>&lt;h4&gt;Добро пожаловать в %1!&lt;/h4&gt;Хочешь изменить настройки %1 перед использованием?</translation>
</message>
@ -2008,22 +2008,22 @@ Press 1 for Default View</source>
<context>
<name>TelemetryDialog</name>
<message>
<location filename="../main.cpp" line="164"/>
<location filename="../main.cpp" line="157"/>
<source>%1 User Statistics</source>
<translation>%1 пользовательская статистика</translation>
</message>
<message>
<location filename="../main.cpp" line="164"/>
<source>You want help %1 to improve in the future by collection of data?</source>
<translation>Хочешь ли помочь будущему развитию %1 отправкой данных?</translation>
<location filename="../main.cpp" line="156"/>
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="168"/>
<source>Yes, I would like to take part.</source>
<translation>Да, хочу участвовать.</translation>
<location filename="../main.cpp" line="161"/>
<source>Yes, I want include personal usage data.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="178"/>
<location filename="../main.cpp" line="170"/>
<source>&amp;OK</source>
<translation>&amp;ОК</translation>
</message>

Binary file not shown.

View File

@ -758,7 +758,7 @@ Y: %2</translation>
<translation>Переглядач зображень Snapmatic - %1</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="117"/>
<location filename="../PictureDialog.ui" line="114"/>
<source>&lt;span style=&quot; font-weight:600;&quot;&gt;Title: &lt;/span&gt;%6&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Location: &lt;/span&gt;%7 (%1, %2, %3)&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Players: &lt;/span&gt;%4 (Crew %5)&lt;br/&gt;
@ -769,22 +769,22 @@ Y: %2</translation>
&lt;span style=&quot; font-weight:600;&quot;&gt;Створено: &lt;/span&gt;%8</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="177"/>
<location filename="../PictureDialog.ui" line="174"/>
<source>Manage picture</source>
<translation>Керування зображенням</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="180"/>
<location filename="../PictureDialog.ui" line="177"/>
<source>&amp;Manage</source>
<translation>&amp;Керувати</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="199"/>
<location filename="../PictureDialog.ui" line="196"/>
<source>Close viewer</source>
<translation>Закрити переглядач</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="202"/>
<location filename="../PictureDialog.ui" line="199"/>
<source>&amp;Close</source>
<translation>&amp;Закрити</translation>
</message>
@ -1433,7 +1433,7 @@ Press 1 for Default View</source>
<translation>Вибраний шрифт:%1</translation>
</message>
<message>
<location filename="../main.cpp" line="137"/>
<location filename="../main.cpp" line="127"/>
<source>&lt;h4&gt;Welcome to %1!&lt;/h4&gt;You want to configure %1 before you start using it?</source>
<translation>&lt;h4&gt;Ласкаво просимо до %1!&lt;/h4&gt;Ви хочете налаштувати %1 перед використанням?</translation>
</message>
@ -2002,22 +2002,22 @@ Press 1 for Default View</source>
<context>
<name>TelemetryDialog</name>
<message>
<location filename="../main.cpp" line="164"/>
<source>You want help %1 to improve in the future by collection of data?</source>
<translation>Ви хочете допомогти %1 подальшому вдосконаленню шляхом збору даних?</translation>
</message>
<message>
<location filename="../main.cpp" line="164"/>
<location filename="../main.cpp" line="157"/>
<source>%1 User Statistics</source>
<translation>%1 Статистика користувачів</translation>
</message>
<message>
<location filename="../main.cpp" line="168"/>
<source>Yes, I would like to take part.</source>
<translation>Так, я хотів би взяти участь.</translation>
<location filename="../main.cpp" line="156"/>
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="178"/>
<location filename="../main.cpp" line="161"/>
<source>Yes, I want include personal usage data.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="170"/>
<source>&amp;OK</source>
<translation>&amp;OK</translation>
</message>

Binary file not shown.

View File

@ -756,7 +756,7 @@ Y: %2</translation>
<translation>Snapmatic - %1</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="117"/>
<location filename="../PictureDialog.ui" line="114"/>
<source>&lt;span style=&quot; font-weight:600;&quot;&gt;Title: &lt;/span&gt;%6&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Location: &lt;/span&gt;%7 (%1, %2, %3)&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Players: &lt;/span&gt;%4 (Crew %5)&lt;br/&gt;
@ -767,22 +767,22 @@ Y: %2</translation>
&lt;span style=&quot; font-weight:600;&quot;&gt;: &lt;/span&gt;%8</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="177"/>
<location filename="../PictureDialog.ui" line="174"/>
<source>Manage picture</source>
<translation></translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="180"/>
<location filename="../PictureDialog.ui" line="177"/>
<source>&amp;Manage</source>
<translation>(&amp;M)</translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="199"/>
<location filename="../PictureDialog.ui" line="196"/>
<source>Close viewer</source>
<translation></translation>
</message>
<message>
<location filename="../PictureDialog.ui" line="202"/>
<location filename="../PictureDialog.ui" line="199"/>
<source>&amp;Close</source>
<translation>(&amp;C)</translation>
</message>
@ -1427,7 +1427,7 @@ Press 1 for Default View</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../main.cpp" line="137"/>
<location filename="../main.cpp" line="127"/>
<source>&lt;h4&gt;Welcome to %1!&lt;/h4&gt;You want to configure %1 before you start using it?</source>
<translation>&lt;h4&gt;使 %1!&lt;/h4&gt; %1 ?</translation>
</message>
@ -1996,22 +1996,22 @@ Press 1 for Default View</source>
<context>
<name>TelemetryDialog</name>
<message>
<location filename="../main.cpp" line="164"/>
<source>You want help %1 to improve in the future by collection of data?</source>
<translation> %1 ?</translation>
</message>
<message>
<location filename="../main.cpp" line="164"/>
<location filename="../main.cpp" line="157"/>
<source>%1 User Statistics</source>
<translation>%1 使</translation>
</message>
<message>
<location filename="../main.cpp" line="168"/>
<source>Yes, I would like to take part.</source>
<translation>.</translation>
<location filename="../main.cpp" line="156"/>
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="178"/>
<location filename="../main.cpp" line="161"/>
<source>Yes, I want include personal usage data.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="170"/>
<source>&amp;OK</source>
<translation>(&amp;O)</translation>
</message>