code cleanup, remove first start prompt
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
fd5006e70f
commit
929d341826
20 changed files with 279 additions and 512 deletions
233
AppEnv.cpp
233
AppEnv.cpp
|
@ -1,6 +1,6 @@
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* gta5view Grand Theft Auto V Profile Viewer
|
* gta5view Grand Theft Auto V Profile Viewer
|
||||||
* Copyright (C) 2016-2020 Syping
|
* Copyright (C) 2016-2021 Syping
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -33,12 +33,8 @@
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
AppEnv::AppEnv()
|
AppEnv::AppEnv()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build Stuff
|
// Build Stuff
|
||||||
|
@ -59,12 +55,11 @@ QString AppEnv::getGameFolder(bool *ok)
|
||||||
{
|
{
|
||||||
QDir dir;
|
QDir dir;
|
||||||
QString GTAV_FOLDER = QString::fromUtf8(qgetenv("GTAV_FOLDER"));
|
QString GTAV_FOLDER = QString::fromUtf8(qgetenv("GTAV_FOLDER"));
|
||||||
if (GTAV_FOLDER != "")
|
if (GTAV_FOLDER != "") {
|
||||||
{
|
|
||||||
dir.setPath(GTAV_FOLDER);
|
dir.setPath(GTAV_FOLDER);
|
||||||
if (dir.exists())
|
if (dir.exists()) {
|
||||||
{
|
if (ok != NULL)
|
||||||
if (ok != NULL) *ok = true;
|
*ok = true;
|
||||||
qputenv("GTAV_FOLDER", dir.absolutePath().toUtf8());
|
qputenv("GTAV_FOLDER", dir.absolutePath().toUtf8());
|
||||||
return dir.absolutePath();
|
return dir.absolutePath();
|
||||||
}
|
}
|
||||||
|
@ -79,46 +74,44 @@ QString AppEnv::getGameFolder(bool *ok)
|
||||||
GTAV_returnFolder = settings.value("dir", GTAV_defaultFolder).toString();
|
GTAV_returnFolder = settings.value("dir", GTAV_defaultFolder).toString();
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
if (forceDir)
|
if (forceDir) {
|
||||||
{
|
|
||||||
dir.setPath(GTAV_returnFolder);
|
dir.setPath(GTAV_returnFolder);
|
||||||
if (dir.exists())
|
if (dir.exists()) {
|
||||||
{
|
if (ok != 0)
|
||||||
if (ok != 0) *ok = true;
|
*ok = true;
|
||||||
qputenv("GTAV_FOLDER", dir.absolutePath().toUtf8());
|
qputenv("GTAV_FOLDER", dir.absolutePath().toUtf8());
|
||||||
return dir.absolutePath();
|
return dir.absolutePath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dir.setPath(GTAV_defaultFolder);
|
dir.setPath(GTAV_defaultFolder);
|
||||||
if (dir.exists())
|
if (dir.exists()) {
|
||||||
{
|
if (ok != 0)
|
||||||
if (ok != 0) *ok = true;
|
*ok = true;
|
||||||
qputenv("GTAV_FOLDER", dir.absolutePath().toUtf8());
|
qputenv("GTAV_FOLDER", dir.absolutePath().toUtf8());
|
||||||
return dir.absolutePath();
|
return dir.absolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!forceDir)
|
if (!forceDir) {
|
||||||
{
|
|
||||||
dir.setPath(GTAV_returnFolder);
|
dir.setPath(GTAV_returnFolder);
|
||||||
if (dir.exists())
|
if (dir.exists()) {
|
||||||
{
|
if (ok != 0)
|
||||||
if (ok != 0) *ok = true;
|
*ok = true;
|
||||||
qputenv("GTAV_FOLDER", dir.absolutePath().toUtf8());
|
qputenv("GTAV_FOLDER", dir.absolutePath().toUtf8());
|
||||||
return dir.absolutePath();
|
return dir.absolutePath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ok != 0) *ok = false;
|
if (ok != 0)
|
||||||
return "";
|
*ok = false;
|
||||||
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AppEnv::setGameFolder(QString gameFolder)
|
bool AppEnv::setGameFolder(QString gameFolder)
|
||||||
{
|
{
|
||||||
QDir dir;
|
QDir dir;
|
||||||
dir.setPath(gameFolder);
|
dir.setPath(gameFolder);
|
||||||
if (dir.exists())
|
if (dir.exists()) {
|
||||||
{
|
|
||||||
qputenv("GTAV_FOLDER", dir.absolutePath().toUtf8());
|
qputenv("GTAV_FOLDER", dir.absolutePath().toUtf8());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -160,24 +153,19 @@ QByteArray AppEnv::getUserAgent()
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QString kernelVersion = QSysInfo::kernelVersion();
|
QString kernelVersion = QSysInfo::kernelVersion();
|
||||||
const QStringList &kernelVersionList = kernelVersion.split(".");
|
const QStringList &kernelVersionList = kernelVersion.split(".");
|
||||||
if (kernelVersionList.length() > 2)
|
if (kernelVersionList.length() > 2) {
|
||||||
{
|
|
||||||
kernelVersion = kernelVersionList.at(0) % "." % kernelVersionList.at(1);
|
kernelVersion = kernelVersionList.at(0) % "." % kernelVersionList.at(1);
|
||||||
}
|
}
|
||||||
QString runArch = QSysInfo::buildCpuArchitecture();
|
QString runArch = QSysInfo::buildCpuArchitecture();
|
||||||
if (runArch == "x86_64")
|
if (runArch == "x86_64") {
|
||||||
{
|
|
||||||
runArch = "Win64; x64";
|
runArch = "Win64; x64";
|
||||||
}
|
}
|
||||||
else if (runArch == "i686")
|
else if (runArch == "i686") {
|
||||||
{
|
|
||||||
const QString &curArch = QSysInfo::currentCpuArchitecture();
|
const QString &curArch = QSysInfo::currentCpuArchitecture();
|
||||||
if (curArch == "x86_64")
|
if (curArch == "x86_64") {
|
||||||
{
|
|
||||||
runArch = "WOW64";
|
runArch = "WOW64";
|
||||||
}
|
}
|
||||||
else if (curArch == "i686")
|
else if (curArch == "i686") {
|
||||||
{
|
|
||||||
runArch = "Win32; x86";
|
runArch = "Win32; x86";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,11 +178,6 @@ QByteArray AppEnv::getUserAgent()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// QUrl AppEnv::getCrewFetchingUrl(QString crewID)
|
|
||||||
// {
|
|
||||||
// return QUrl(QString("https://socialclub.rockstargames.com/reference/crewfeed/%1").arg(crewID));
|
|
||||||
// }
|
|
||||||
|
|
||||||
QUrl AppEnv::getCrewFetchingUrl(QString crewID)
|
QUrl AppEnv::getCrewFetchingUrl(QString crewID)
|
||||||
{
|
{
|
||||||
return QUrl(QString("https://socialclub.rockstargames.com/crew/%1/%1").arg(crewID));
|
return QUrl(QString("https://socialclub.rockstargames.com/crew/%1/%1").arg(crewID));
|
||||||
|
@ -223,8 +206,7 @@ GameVersion AppEnv::getGameVersion()
|
||||||
QString installFolderSc = registrySettingsSc.value("InstallFolder", "").toString();
|
QString installFolderSc = registrySettingsSc.value("InstallFolder", "").toString();
|
||||||
QDir installFolderScDir(installFolderSc);
|
QDir installFolderScDir(installFolderSc);
|
||||||
bool scVersionInstalled = false;
|
bool scVersionInstalled = false;
|
||||||
if (!installFolderSc.isEmpty() && installFolderScDir.exists())
|
if (!installFolderSc.isEmpty() && installFolderScDir.exists()) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "gameVersionFoundSocialClubVersion";
|
qDebug() << "gameVersionFoundSocialClubVersion";
|
||||||
#endif
|
#endif
|
||||||
|
@ -233,34 +215,28 @@ GameVersion AppEnv::getGameVersion()
|
||||||
|
|
||||||
QSettings registrySettingsSteam(QString("HKEY_LOCAL_MACHINE\\SOFTWARE%1\\Rockstar Games\\GTAV").arg(argumentValue), QSettings::NativeFormat);
|
QSettings registrySettingsSteam(QString("HKEY_LOCAL_MACHINE\\SOFTWARE%1\\Rockstar Games\\GTAV").arg(argumentValue), QSettings::NativeFormat);
|
||||||
QString installFolderSteam = registrySettingsSteam.value("installfoldersteam", "").toString();
|
QString installFolderSteam = registrySettingsSteam.value("installfoldersteam", "").toString();
|
||||||
if (installFolderSteam.right(5) == "\\GTAV")
|
if (installFolderSteam.right(5) == "\\GTAV") {
|
||||||
{
|
|
||||||
installFolderSteam = installFolderSteam.remove(installFolderSteam.length() - 5, 5);
|
installFolderSteam = installFolderSteam.remove(installFolderSteam.length() - 5, 5);
|
||||||
}
|
}
|
||||||
QDir installFolderSteamDir(installFolderSteam);
|
QDir installFolderSteamDir(installFolderSteam);
|
||||||
bool steamVersionInstalled = false;
|
bool steamVersionInstalled = false;
|
||||||
if (!installFolderSteam.isEmpty() && installFolderSteamDir.exists())
|
if (!installFolderSteam.isEmpty() && installFolderSteamDir.exists()) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "gameVersionFoundSteamVersion";
|
qDebug() << "gameVersionFoundSteamVersion";
|
||||||
#endif
|
#endif
|
||||||
steamVersionInstalled = true;
|
steamVersionInstalled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scVersionInstalled && steamVersionInstalled)
|
if (scVersionInstalled && steamVersionInstalled) {
|
||||||
{
|
|
||||||
return GameVersion::BothVersions;
|
return GameVersion::BothVersions;
|
||||||
}
|
}
|
||||||
else if (scVersionInstalled)
|
else if (scVersionInstalled) {
|
||||||
{
|
|
||||||
return GameVersion::SocialClubVersion;
|
return GameVersion::SocialClubVersion;
|
||||||
}
|
}
|
||||||
else if (steamVersionInstalled)
|
else if (steamVersionInstalled) {
|
||||||
{
|
|
||||||
return GameVersion::SteamVersion;
|
return GameVersion::SteamVersion;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return GameVersion::NoVersion;
|
return GameVersion::NoVersion;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -270,8 +246,7 @@ GameVersion AppEnv::getGameVersion()
|
||||||
|
|
||||||
GameLanguage AppEnv::getGameLanguage(GameVersion gameVersion)
|
GameLanguage AppEnv::getGameLanguage(GameVersion gameVersion)
|
||||||
{
|
{
|
||||||
if (gameVersion == GameVersion::SocialClubVersion)
|
if (gameVersion == GameVersion::SocialClubVersion) {
|
||||||
{
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QString argumentValue;
|
QString argumentValue;
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
|
@ -284,8 +259,7 @@ GameLanguage AppEnv::getGameLanguage(GameVersion gameVersion)
|
||||||
return GameLanguage::Undefined;
|
return GameLanguage::Undefined;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (gameVersion == GameVersion::SteamVersion)
|
else if (gameVersion == GameVersion::SteamVersion) {
|
||||||
{
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QString argumentValue;
|
QString argumentValue;
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
|
@ -298,128 +272,81 @@ GameLanguage AppEnv::getGameLanguage(GameVersion gameVersion)
|
||||||
return GameLanguage::Undefined;
|
return GameLanguage::Undefined;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return GameLanguage::Undefined;
|
return GameLanguage::Undefined;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GameLanguage AppEnv::gameLanguageFromString(QString gameLanguage)
|
GameLanguage AppEnv::gameLanguageFromString(QString gameLanguage)
|
||||||
{
|
{
|
||||||
if (gameLanguage == "en-US")
|
if (gameLanguage == "en-US") {
|
||||||
{
|
|
||||||
return GameLanguage::English;
|
return GameLanguage::English;
|
||||||
}
|
}
|
||||||
else if (gameLanguage == "fr-FR")
|
else if (gameLanguage == "fr-FR") {
|
||||||
{
|
|
||||||
return GameLanguage::French;
|
return GameLanguage::French;
|
||||||
}
|
}
|
||||||
else if (gameLanguage == "it-IT")
|
else if (gameLanguage == "it-IT") {
|
||||||
{
|
|
||||||
return GameLanguage::Italian;
|
return GameLanguage::Italian;
|
||||||
}
|
}
|
||||||
else if (gameLanguage == "de-DE")
|
else if (gameLanguage == "de-DE") {
|
||||||
{
|
|
||||||
return GameLanguage::German;
|
return GameLanguage::German;
|
||||||
}
|
}
|
||||||
else if (gameLanguage == "es-ES")
|
else if (gameLanguage == "es-ES") {
|
||||||
{
|
|
||||||
return GameLanguage::Spanish;
|
return GameLanguage::Spanish;
|
||||||
}
|
}
|
||||||
else if (gameLanguage == "es-MX")
|
else if (gameLanguage == "es-MX") {
|
||||||
{
|
|
||||||
return GameLanguage::Mexican;
|
return GameLanguage::Mexican;
|
||||||
}
|
}
|
||||||
else if (gameLanguage == "pt-BR")
|
else if (gameLanguage == "pt-BR") {
|
||||||
{
|
|
||||||
return GameLanguage::Brasilian;
|
return GameLanguage::Brasilian;
|
||||||
}
|
}
|
||||||
else if (gameLanguage == "ru-RU")
|
else if (gameLanguage == "ru-RU") {
|
||||||
{
|
|
||||||
return GameLanguage::Russian;
|
return GameLanguage::Russian;
|
||||||
}
|
}
|
||||||
else if (gameLanguage == "pl-PL")
|
else if (gameLanguage == "pl-PL") {
|
||||||
{
|
|
||||||
return GameLanguage::Polish;
|
return GameLanguage::Polish;
|
||||||
}
|
}
|
||||||
else if (gameLanguage == "ja-JP")
|
else if (gameLanguage == "ja-JP") {
|
||||||
{
|
|
||||||
return GameLanguage::Japanese;
|
return GameLanguage::Japanese;
|
||||||
}
|
}
|
||||||
else if (gameLanguage == "zh-CHS")
|
else if (gameLanguage == "zh-CHS") {
|
||||||
{
|
|
||||||
return GameLanguage::SChinese;
|
return GameLanguage::SChinese;
|
||||||
}
|
}
|
||||||
else if (gameLanguage == "zh-CHT")
|
else if (gameLanguage == "zh-CHT") {
|
||||||
{
|
|
||||||
return GameLanguage::TChinese;
|
return GameLanguage::TChinese;
|
||||||
}
|
}
|
||||||
else if (gameLanguage == "ko-KR")
|
else if (gameLanguage == "ko-KR") {
|
||||||
{
|
return GameLanguage::Korean;
|
||||||
return GameLanguage::Koreana;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return GameLanguage::Undefined;
|
return GameLanguage::Undefined;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AppEnv::gameLanguageToString(GameLanguage gameLanguage)
|
QString AppEnv::gameLanguageToString(GameLanguage gameLanguage)
|
||||||
{
|
{
|
||||||
if (gameLanguage == GameLanguage::English)
|
switch (gameLanguage) {
|
||||||
{
|
case GameLanguage::English:
|
||||||
return "en-US";
|
return "en-US";
|
||||||
}
|
case GameLanguage::French:
|
||||||
else if (gameLanguage == GameLanguage::French)
|
|
||||||
{
|
|
||||||
return "fr-FR";
|
return "fr-FR";
|
||||||
}
|
case GameLanguage::Italian:
|
||||||
else if (gameLanguage == GameLanguage::Italian)
|
|
||||||
{
|
|
||||||
return "it-IT";
|
return "it-IT";
|
||||||
}
|
case GameLanguage::German:
|
||||||
else if (gameLanguage == GameLanguage::German)
|
|
||||||
{
|
|
||||||
return "de-DE";
|
return "de-DE";
|
||||||
}
|
case GameLanguage::Spanish:
|
||||||
else if (gameLanguage == GameLanguage::Spanish)
|
|
||||||
{
|
|
||||||
return "es-ES";
|
return "es-ES";
|
||||||
}
|
case GameLanguage::Mexican:
|
||||||
else if (gameLanguage == GameLanguage::Mexican)
|
|
||||||
{
|
|
||||||
return "es-MX";
|
return "es-MX";
|
||||||
}
|
case GameLanguage::Brasilian:
|
||||||
else if (gameLanguage == GameLanguage::Brasilian)
|
|
||||||
{
|
|
||||||
return "pt-BR";
|
return "pt-BR";
|
||||||
}
|
case GameLanguage::Polish:
|
||||||
else if (gameLanguage == GameLanguage::Russian)
|
|
||||||
{
|
|
||||||
return "ru-RU";
|
|
||||||
}
|
|
||||||
else if (gameLanguage == GameLanguage::Polish)
|
|
||||||
{
|
|
||||||
return "pl-PL";
|
return "pl-PL";
|
||||||
}
|
case GameLanguage::Japanese:
|
||||||
else if (gameLanguage == GameLanguage::Japanese)
|
|
||||||
{
|
|
||||||
return "ja-JP";
|
return "ja-JP";
|
||||||
}
|
case GameLanguage::SChinese:
|
||||||
else if (gameLanguage == GameLanguage::SChinese)
|
|
||||||
{
|
|
||||||
return "zh-CHS";
|
return "zh-CHS";
|
||||||
}
|
case GameLanguage::TChinese:
|
||||||
else if (gameLanguage == GameLanguage::TChinese)
|
|
||||||
{
|
|
||||||
return "zh-CHT";
|
return "zh-CHT";
|
||||||
}
|
case GameLanguage::Korean:
|
||||||
else if (gameLanguage == GameLanguage::Koreana)
|
|
||||||
{
|
|
||||||
return "ko-KR";
|
return "ko-KR";
|
||||||
}
|
default:
|
||||||
else
|
|
||||||
{
|
|
||||||
return "Undefinied";
|
return "Undefinied";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -428,67 +355,55 @@ bool AppEnv::setGameLanguage(GameVersion gameVersion, GameLanguage gameLanguage)
|
||||||
{
|
{
|
||||||
bool socialClubVersion = false;
|
bool socialClubVersion = false;
|
||||||
bool steamVersion = false;
|
bool steamVersion = false;
|
||||||
if (gameVersion == GameVersion::SocialClubVersion)
|
if (gameVersion == GameVersion::SocialClubVersion) {
|
||||||
{
|
|
||||||
socialClubVersion = true;
|
socialClubVersion = true;
|
||||||
}
|
}
|
||||||
else if (gameVersion == GameVersion::SteamVersion)
|
else if (gameVersion == GameVersion::SteamVersion) {
|
||||||
{
|
|
||||||
steamVersion = true;
|
steamVersion = true;
|
||||||
}
|
}
|
||||||
else if (gameVersion == GameVersion::BothVersions)
|
else if (gameVersion == GameVersion::BothVersions) {
|
||||||
{
|
|
||||||
socialClubVersion = true;
|
socialClubVersion = true;
|
||||||
steamVersion = true;
|
steamVersion = true;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (socialClubVersion)
|
if (socialClubVersion) {
|
||||||
{
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QString argumentValue;
|
QString argumentValue;
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
argumentValue = "\\WOW6432Node";
|
argumentValue = "\\WOW6432Node";
|
||||||
#endif
|
#endif
|
||||||
QSettings registrySettingsSc(QString("HKEY_LOCAL_MACHINE\\SOFTWARE%1\\Rockstar Games\\Grand Theft Auto V").arg(argumentValue), QSettings::NativeFormat);
|
QSettings registrySettingsSc(QString("HKEY_LOCAL_MACHINE\\SOFTWARE%1\\Rockstar Games\\Grand Theft Auto V").arg(argumentValue), QSettings::NativeFormat);
|
||||||
if (gameLanguage != GameLanguage::Undefined)
|
if (gameLanguage != GameLanguage::Undefined) {
|
||||||
{
|
|
||||||
registrySettingsSc.setValue("Language", gameLanguageToString(gameLanguage));
|
registrySettingsSc.setValue("Language", gameLanguageToString(gameLanguage));
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
registrySettingsSc.remove("Language");
|
registrySettingsSc.remove("Language");
|
||||||
}
|
}
|
||||||
registrySettingsSc.sync();
|
registrySettingsSc.sync();
|
||||||
if (registrySettingsSc.status() != QSettings::NoError)
|
if (registrySettingsSc.status() != QSettings::NoError) {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(gameLanguage)
|
Q_UNUSED(gameLanguage)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (steamVersion)
|
if (steamVersion) {
|
||||||
{
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QString argumentValue;
|
QString argumentValue;
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
argumentValue = "\\WOW6432Node";
|
argumentValue = "\\WOW6432Node";
|
||||||
#endif
|
#endif
|
||||||
QSettings registrySettingsSteam(QString("HKEY_LOCAL_MACHINE\\SOFTWARE%1\\Rockstar Games\\Grand Theft Auto V Steam").arg(argumentValue), QSettings::NativeFormat);
|
QSettings registrySettingsSteam(QString("HKEY_LOCAL_MACHINE\\SOFTWARE%1\\Rockstar Games\\Grand Theft Auto V Steam").arg(argumentValue), QSettings::NativeFormat);
|
||||||
if (gameLanguage != GameLanguage::Undefined)
|
if (gameLanguage != GameLanguage::Undefined) {
|
||||||
{
|
|
||||||
registrySettingsSteam.setValue("Language", gameLanguageToString(gameLanguage));
|
registrySettingsSteam.setValue("Language", gameLanguageToString(gameLanguage));
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
registrySettingsSteam.remove("Language");
|
registrySettingsSteam.remove("Language");
|
||||||
}
|
}
|
||||||
registrySettingsSteam.sync();
|
registrySettingsSteam.sync();
|
||||||
if (registrySettingsSteam.status() != QSettings::NoError)
|
if (registrySettingsSteam.status() != QSettings::NoError) {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
4
AppEnv.h
4
AppEnv.h
|
@ -1,6 +1,6 @@
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* gta5view Grand Theft Auto V Profile Viewer
|
* gta5view Grand Theft Auto V Profile Viewer
|
||||||
* Copyright (C) 2016-2018 Syping
|
* Copyright (C) 2016-2021 Syping
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
enum class GameVersion : int { NoVersion = 0, SocialClubVersion = 1, SteamVersion = 2, BothVersions = 3 };
|
enum class GameVersion : int { NoVersion = 0, SocialClubVersion = 1, SteamVersion = 2, BothVersions = 3 };
|
||||||
enum class GameLanguage : int { Undefined = 0, English = 1, French = 2, Italian = 3, German = 4, Spanish = 5, Mexican = 6, Brasilian = 7, Russian = 8, Polish = 9, Japanese = 10, SChinese = 11, TChinese = 12, Koreana = 13 };
|
enum class GameLanguage : int { Undefined = 0, English = 1, French = 2, Italian = 3, German = 4, Spanish = 5, Mexican = 6, Brasilian = 7, Russian = 8, Polish = 9, Japanese = 10, SChinese = 11, TChinese = 12, Korean = 13 };
|
||||||
|
|
||||||
class AppEnv
|
class AppEnv
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* gta5view Grand Theft Auto V Profile Viewer
|
* gta5view Grand Theft Auto V Profile Viewer
|
||||||
* Copyright (C) 2016-2020 Syping
|
* Copyright (C) 2016-2021 Syping
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -46,8 +46,7 @@ void DatabaseThread::run()
|
||||||
|
|
||||||
QObject::connect(this, SIGNAL(threadTerminated()), &threadLoop, SLOT(quit()));
|
QObject::connect(this, SIGNAL(threadTerminated()), &threadLoop, SLOT(quit()));
|
||||||
|
|
||||||
while (threadRunning)
|
while (threadRunning) {
|
||||||
{
|
|
||||||
QTimer::singleShot(300000, &threadLoop, SLOT(quit()));
|
QTimer::singleShot(300000, &threadLoop, SLOT(quit()));
|
||||||
threadLoop.exec();
|
threadLoop.exec();
|
||||||
}
|
}
|
||||||
|
@ -55,10 +54,8 @@ void DatabaseThread::run()
|
||||||
|
|
||||||
void DatabaseThread::scanCrewReference(const QStringList &crewList, const int &requestDelay)
|
void DatabaseThread::scanCrewReference(const QStringList &crewList, const int &requestDelay)
|
||||||
{
|
{
|
||||||
for (QString crewID : crewList)
|
for (const QString &crewID : crewList) {
|
||||||
{
|
if (threadRunning && crewID != QLatin1String("0")) {
|
||||||
if (threadRunning && crewID != QLatin1String("0"))
|
|
||||||
{
|
|
||||||
QNetworkAccessManager *netManager = new QNetworkAccessManager();
|
QNetworkAccessManager *netManager = new QNetworkAccessManager();
|
||||||
QNetworkRequest netRequest(AppEnv::getCrewFetchingUrl(crewID));
|
QNetworkRequest netRequest(AppEnv::getCrewFetchingUrl(crewID));
|
||||||
#if QT_VERSION >= 0x050600
|
#if QT_VERSION >= 0x050600
|
||||||
|
@ -76,40 +73,36 @@ void DatabaseThread::scanCrewReference(const QStringList &crewList, const int &r
|
||||||
|
|
||||||
QEventLoop *downloadLoop = new QEventLoop();
|
QEventLoop *downloadLoop = new QEventLoop();
|
||||||
QObject::connect(netReply, SIGNAL(finished()), downloadLoop, SLOT(quit()));
|
QObject::connect(netReply, SIGNAL(finished()), downloadLoop, SLOT(quit()));
|
||||||
if (!continueLastCrew) { QObject::connect(this, SIGNAL(threadTerminated()), downloadLoop, SLOT(quit())); }
|
if (!continueLastCrew)
|
||||||
|
QObject::connect(this, SIGNAL(threadTerminated()), downloadLoop, SLOT(quit()));
|
||||||
QTimer::singleShot(30000, downloadLoop, SLOT(quit()));
|
QTimer::singleShot(30000, downloadLoop, SLOT(quit()));
|
||||||
downloadLoop->exec();
|
downloadLoop->exec();
|
||||||
downloadLoop->disconnect();
|
downloadLoop->disconnect();
|
||||||
delete downloadLoop;
|
delete downloadLoop;
|
||||||
|
|
||||||
if (netReply->isFinished())
|
if (netReply->isFinished()) {
|
||||||
{
|
|
||||||
QString crewName;
|
QString crewName;
|
||||||
QByteArray crewHtml = netReply->readAll();
|
QByteArray crewHtml = netReply->readAll();
|
||||||
QStringList crewHtmlSplit1 = QString::fromUtf8(crewHtml).split("<title>Rockstar Games Social Club - Crew : ");
|
QStringList crewHtmlSplit1 = QString::fromUtf8(crewHtml).split("<title>Rockstar Games Social Club - Crew : ");
|
||||||
if (crewHtmlSplit1.length() >= 2)
|
if (crewHtmlSplit1.length() >= 2) {
|
||||||
{
|
|
||||||
QStringList crewHtmlSplit2 = QString(crewHtmlSplit1.at(1)).split("</title>");
|
QStringList crewHtmlSplit2 = QString(crewHtmlSplit1.at(1)).split("</title>");
|
||||||
if (crewHtmlSplit2.length() >= 1)
|
if (crewHtmlSplit2.length() >= 1) {
|
||||||
{
|
|
||||||
crewName = crewHtmlSplit2.at(0);
|
crewName = crewHtmlSplit2.at(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!crewName.isEmpty())
|
if (!crewName.isEmpty()) {
|
||||||
{
|
|
||||||
emit crewNameFound(crewID.toInt(), crewName);
|
emit crewNameFound(crewID.toInt(), crewName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
netReply->abort();
|
netReply->abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (threadRunning)
|
if (threadRunning) {
|
||||||
{
|
|
||||||
QEventLoop *waitingLoop = new QEventLoop();
|
QEventLoop *waitingLoop = new QEventLoop();
|
||||||
QTimer::singleShot(requestDelay, waitingLoop, SLOT(quit()));
|
QTimer::singleShot(requestDelay, waitingLoop, SLOT(quit()));
|
||||||
if (!continueLastCrew) { QObject::connect(this, SIGNAL(threadTerminated()), waitingLoop, SLOT(quit())); }
|
if (!continueLastCrew)
|
||||||
|
QObject::connect(this, SIGNAL(threadTerminated()), waitingLoop, SLOT(quit()));
|
||||||
waitingLoop->exec();
|
waitingLoop->exec();
|
||||||
waitingLoop->disconnect();
|
waitingLoop->disconnect();
|
||||||
delete waitingLoop;
|
delete waitingLoop;
|
||||||
|
@ -123,17 +116,14 @@ void DatabaseThread::scanCrewReference(const QStringList &crewList, const int &r
|
||||||
|
|
||||||
void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int &maxPages, const int &requestDelay)
|
void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int &maxPages, const int &requestDelay)
|
||||||
{
|
{
|
||||||
for (QString crewID : crewList)
|
for (const QString &crewID : crewList) {
|
||||||
{
|
if (threadRunning && crewID != QLatin1String("0")) {
|
||||||
if (threadRunning && crewID != QLatin1String("0"))
|
|
||||||
{
|
|
||||||
int currentFail = 0;
|
int currentFail = 0;
|
||||||
int currentPage = 0;
|
int currentPage = 0;
|
||||||
int foundPlayers = 0;
|
int foundPlayers = 0;
|
||||||
int totalPlayers = 1000;
|
int totalPlayers = 1000;
|
||||||
|
|
||||||
while(foundPlayers < totalPlayers && currentPage < maxPages && (continueLastCrew ? true : threadRunning))
|
while(foundPlayers < totalPlayers && currentPage < maxPages && (continueLastCrew ? true : threadRunning)) {
|
||||||
{
|
|
||||||
QNetworkAccessManager *netManager = new QNetworkAccessManager();
|
QNetworkAccessManager *netManager = new QNetworkAccessManager();
|
||||||
QNetworkRequest netRequest(AppEnv::getPlayerFetchingUrl(crewID, currentPage));
|
QNetworkRequest netRequest(AppEnv::getPlayerFetchingUrl(crewID, currentPage));
|
||||||
#if QT_VERSION >= 0x050600
|
#if QT_VERSION >= 0x050600
|
||||||
|
@ -151,14 +141,14 @@ void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int
|
||||||
|
|
||||||
QEventLoop *downloadLoop = new QEventLoop();
|
QEventLoop *downloadLoop = new QEventLoop();
|
||||||
QObject::connect(netReply, SIGNAL(finished()), downloadLoop, SLOT(quit()));
|
QObject::connect(netReply, SIGNAL(finished()), downloadLoop, SLOT(quit()));
|
||||||
if (!continueLastCrew) { QObject::connect(this, SIGNAL(threadTerminated()), downloadLoop, SLOT(quit())); }
|
if (!continueLastCrew)
|
||||||
|
QObject::connect(this, SIGNAL(threadTerminated()), downloadLoop, SLOT(quit()));
|
||||||
QTimer::singleShot(30000, downloadLoop, SLOT(quit()));
|
QTimer::singleShot(30000, downloadLoop, SLOT(quit()));
|
||||||
downloadLoop->exec();
|
downloadLoop->exec();
|
||||||
downloadLoop->disconnect();
|
downloadLoop->disconnect();
|
||||||
delete downloadLoop;
|
delete downloadLoop;
|
||||||
|
|
||||||
if (netReply->isFinished())
|
if (netReply->isFinished()) {
|
||||||
{
|
|
||||||
QByteArray crewJson = netReply->readAll();
|
QByteArray crewJson = netReply->readAll();
|
||||||
QJsonDocument crewDocument = QJsonDocument::fromJson(crewJson);
|
QJsonDocument crewDocument = QJsonDocument::fromJson(crewJson);
|
||||||
QJsonObject crewObject = crewDocument.object();
|
QJsonObject crewObject = crewDocument.object();
|
||||||
|
@ -166,32 +156,25 @@ void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int
|
||||||
|
|
||||||
if (crewMap.contains("Total")) { totalPlayers = crewMap["Total"].toInt(); }
|
if (crewMap.contains("Total")) { totalPlayers = crewMap["Total"].toInt(); }
|
||||||
|
|
||||||
if (crewMap.contains("Members"))
|
if (crewMap.contains("Members")) {
|
||||||
{
|
|
||||||
const QList<QVariant> memberList = crewMap["Members"].toList();
|
const QList<QVariant> memberList = crewMap["Members"].toList();
|
||||||
for (QVariant memberVariant : memberList)
|
for (const QVariant &memberVariant : memberList) {
|
||||||
{
|
|
||||||
QMap<QString, QVariant> memberMap = memberVariant.toMap();
|
QMap<QString, QVariant> memberMap = memberVariant.toMap();
|
||||||
if (memberMap.contains("RockstarId") && memberMap.contains("Name"))
|
if (memberMap.contains("RockstarId") && memberMap.contains("Name")) {
|
||||||
{
|
|
||||||
int RockstarId = memberMap["RockstarId"].toInt();
|
int RockstarId = memberMap["RockstarId"].toInt();
|
||||||
QString memberName = memberMap["Name"].toString();
|
QString memberName = memberMap["Name"].toString();
|
||||||
if (!memberName.isEmpty() && RockstarId != 0)
|
if (!memberName.isEmpty() && RockstarId != 0) {
|
||||||
{
|
|
||||||
foundPlayers++;
|
foundPlayers++;
|
||||||
emit playerNameFound(RockstarId, memberName);
|
emit playerNameFound(RockstarId, memberName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
currentPage++;
|
currentPage++;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
currentFail++;
|
currentFail++;
|
||||||
if (currentFail == maxLoadFails)
|
if (currentFail == maxLoadFails) {
|
||||||
{
|
|
||||||
currentFail = 0;
|
currentFail = 0;
|
||||||
currentPage++;
|
currentPage++;
|
||||||
}
|
}
|
||||||
|
@ -200,8 +183,7 @@ void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int
|
||||||
delete netReply;
|
delete netReply;
|
||||||
delete netManager;
|
delete netManager;
|
||||||
|
|
||||||
if (foundPlayers < totalPlayers && currentPage < maxPages && (continueLastCrew ? true : threadRunning))
|
if (foundPlayers < totalPlayers && currentPage < maxPages && (continueLastCrew ? true : threadRunning)) {
|
||||||
{
|
|
||||||
QEventLoop *waitingLoop = new QEventLoop();
|
QEventLoop *waitingLoop = new QEventLoop();
|
||||||
QTimer::singleShot(requestDelay, waitingLoop, SLOT(quit()));
|
QTimer::singleShot(requestDelay, waitingLoop, SLOT(quit()));
|
||||||
if (!continueLastCrew) { QObject::connect(this, SIGNAL(threadTerminated()), waitingLoop, SLOT(quit())); }
|
if (!continueLastCrew) { QObject::connect(this, SIGNAL(threadTerminated()), waitingLoop, SLOT(quit())); }
|
||||||
|
@ -216,10 +198,8 @@ void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int
|
||||||
|
|
||||||
void DatabaseThread::deleteCompatibleCrews(QStringList *crewList)
|
void DatabaseThread::deleteCompatibleCrews(QStringList *crewList)
|
||||||
{
|
{
|
||||||
for (QString crewNID : *crewList)
|
for (const QString &crewNID : *crewList) {
|
||||||
{
|
if (crewDB->isCompatibleCrew(crewNID)) {
|
||||||
if (crewDB->isCompatibleCrew(crewNID))
|
|
||||||
{
|
|
||||||
crewList->removeAll(crewNID);
|
crewList->removeAll(crewNID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,10 +208,8 @@ void DatabaseThread::deleteCompatibleCrews(QStringList *crewList)
|
||||||
QStringList DatabaseThread::deleteCompatibleCrews(const QStringList &crewList)
|
QStringList DatabaseThread::deleteCompatibleCrews(const QStringList &crewList)
|
||||||
{
|
{
|
||||||
QStringList crewListR = crewList;
|
QStringList crewListR = crewList;
|
||||||
for (QString crewNID : crewListR)
|
for (const QString &crewNID : crewListR) {
|
||||||
{
|
if (crewDB->isCompatibleCrew(crewNID)) {
|
||||||
if (crewDB->isCompatibleCrew(crewNID))
|
|
||||||
{
|
|
||||||
crewListR.removeAll(crewNID);
|
crewListR.removeAll(crewNID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* gta5view Grand Theft Auto V Profile Viewer
|
* gta5view Grand Theft Auto V Profile Viewer
|
||||||
* Copyright (C) 2016-2020 Syping
|
* Copyright (C) 2016-2021 Syping
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
GlobalString::GlobalString()
|
GlobalString::GlobalString()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMap<QString, QString> GlobalString::getGlobalMap()
|
QMap<QString, QString> GlobalString::getGlobalMap()
|
||||||
|
@ -39,8 +38,7 @@ QMap<QString, QString> GlobalString::getGlobalMap()
|
||||||
globalFile.setIniCodec("UTF-8");
|
globalFile.setIniCodec("UTF-8");
|
||||||
#endif
|
#endif
|
||||||
globalFile.beginGroup("Global");
|
globalFile.beginGroup("Global");
|
||||||
for (const QString &globalStr : globalFile.childKeys())
|
for (const QString &globalStr : globalFile.childKeys()) {
|
||||||
{
|
|
||||||
globalMap[globalStr] = globalFile.value(globalStr, globalStr).toString();
|
globalMap[globalStr] = globalFile.value(globalStr, globalStr).toString();
|
||||||
}
|
}
|
||||||
globalFile.endGroup();
|
globalFile.endGroup();
|
||||||
|
@ -56,9 +54,9 @@ QString GlobalString::getString(QString valueStr, bool *ok)
|
||||||
#endif
|
#endif
|
||||||
globalFile.beginGroup("Global");
|
globalFile.beginGroup("Global");
|
||||||
QStringList globalStrList = globalFile.childKeys();
|
QStringList globalStrList = globalFile.childKeys();
|
||||||
if (globalStrList.contains(valueStr))
|
if (globalStrList.contains(valueStr)) {
|
||||||
{
|
if (ok != nullptr)
|
||||||
if (ok != nullptr) *ok = true;
|
*ok = true;
|
||||||
globalString = globalFile.value(valueStr, valueStr).toString();
|
globalString = globalFile.value(valueStr, valueStr).toString();
|
||||||
}
|
}
|
||||||
globalFile.endGroup();
|
globalFile.endGroup();
|
||||||
|
@ -69,8 +67,7 @@ QString GlobalString::getLanguageFile()
|
||||||
{
|
{
|
||||||
QString language = getLanguage();
|
QString language = getLanguage();
|
||||||
QString languageFile = ":/global/global." % language % ".ini";
|
QString languageFile = ":/global/global." % language % ".ini";
|
||||||
if (!QFileInfo(languageFile).exists())
|
if (!QFileInfo::exists(languageFile)) {
|
||||||
{
|
|
||||||
languageFile = ":/global/global.en.ini";
|
languageFile = ":/global/global.en.ini";
|
||||||
}
|
}
|
||||||
return languageFile;
|
return languageFile;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* gta5view Grand Theft Auto V Profile Viewer
|
* gta5view Grand Theft Auto V Profile Viewer
|
||||||
* Copyright (C) 2017 Syping
|
* Copyright (C) 2017-2021 Syping
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -48,19 +48,20 @@ void TranslationClass::initUserLanguage()
|
||||||
|
|
||||||
void TranslationClass::loadTranslation(QApplication *app)
|
void TranslationClass::loadTranslation(QApplication *app)
|
||||||
{
|
{
|
||||||
if (isLangLoaded) { unloadTranslation(app); }
|
if (isLangLoaded) {
|
||||||
else { currentLangIndex = 0; }
|
unloadTranslation(app);
|
||||||
QString exLangPath = AppEnv::getExLangFolder();
|
}
|
||||||
QString inLangPath = AppEnv::getInLangFolder();
|
else {
|
||||||
if (userLanguage == "en" || userLanguage == "en_GB")
|
currentLangIndex = 0;
|
||||||
{
|
}
|
||||||
|
const QString exLangPath = AppEnv::getExLangFolder();
|
||||||
|
const QString inLangPath = AppEnv::getInLangFolder();
|
||||||
|
if (userLanguage == "en" || userLanguage == "en_GB") {
|
||||||
currentLanguage = "en_GB";
|
currentLanguage = "en_GB";
|
||||||
if (loadQtTranslation_p(exLangPath, &exQtTranslator))
|
if (loadQtTranslation_p(exLangPath, &exQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&exQtTranslator);
|
app->installTranslator(&exQtTranslator);
|
||||||
}
|
}
|
||||||
else if (loadQtTranslation_p(inLangPath, &inQtTranslator))
|
else if (loadQtTranslation_p(inLangPath, &inQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&inQtTranslator);
|
app->installTranslator(&inQtTranslator);
|
||||||
}
|
}
|
||||||
#if QT_VERSION >= 0x060000
|
#if QT_VERSION >= 0x060000
|
||||||
|
@ -77,33 +78,28 @@ void TranslationClass::loadTranslation(QApplication *app)
|
||||||
bool externalEnglishMode = false;
|
bool externalEnglishMode = false;
|
||||||
bool loadInternalLang = false;
|
bool loadInternalLang = false;
|
||||||
bool trLoadSuccess = false;
|
bool trLoadSuccess = false;
|
||||||
if (isUserLanguageSystem_p())
|
if (isUserLanguageSystem_p()) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadExSystemLanguage";
|
qDebug() << "loadExSystemLanguage";
|
||||||
#endif
|
#endif
|
||||||
trLoadSuccess = loadSystemTranslation_p(exLangPath, &exAppTranslator);
|
trLoadSuccess = loadSystemTranslation_p(exLangPath, &exAppTranslator);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadExUserLanguage";
|
qDebug() << "loadExUserLanguage";
|
||||||
#endif
|
#endif
|
||||||
trLoadSuccess = loadUserTranslation_p(exLangPath, &exAppTranslator);
|
trLoadSuccess = loadUserTranslation_p(exLangPath, &exAppTranslator);
|
||||||
if (!trLoadSuccess)
|
if (!trLoadSuccess) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadInUserLanguage";
|
qDebug() << "loadInUserLanguage";
|
||||||
#endif
|
#endif
|
||||||
trLoadSuccess = loadUserTranslation_p(inLangPath, &inAppTranslator);
|
trLoadSuccess = loadUserTranslation_p(inLangPath, &inAppTranslator);
|
||||||
if (!trLoadSuccess)
|
if (!trLoadSuccess) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadUserLanguageFailed";
|
qDebug() << "loadUserLanguageFailed";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadUserLanguageSuccess";
|
qDebug() << "loadUserLanguageSuccess";
|
||||||
#endif
|
#endif
|
||||||
|
@ -111,18 +107,16 @@ void TranslationClass::loadTranslation(QApplication *app)
|
||||||
isLangLoaded = true;
|
isLangLoaded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadUserLanguageSuccess";
|
qDebug() << "loadUserLanguageSuccess";
|
||||||
#endif
|
#endif
|
||||||
isLangLoaded = true;
|
isLangLoaded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (trLoadSuccess)
|
if (trLoadSuccess) {
|
||||||
{
|
// Don't install the language until we know we not have a better language for the user
|
||||||
if (currentLangIndex != 0 || isEnglishMode) // Don't install the language until we know we not have a better language for the user
|
if (currentLangIndex != 0 || isEnglishMode) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "externalLanguageReady" << currentLanguage;
|
qDebug() << "externalLanguageReady" << currentLanguage;
|
||||||
#endif
|
#endif
|
||||||
|
@ -130,25 +124,20 @@ void TranslationClass::loadTranslation(QApplication *app)
|
||||||
externalLanguageStr = currentLanguage;
|
externalLanguageStr = currentLanguage;
|
||||||
externalLanguageReady = true;
|
externalLanguageReady = true;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "installTranslation";
|
qDebug() << "installTranslation";
|
||||||
#endif
|
#endif
|
||||||
if (loadInternalLang)
|
if (loadInternalLang) {
|
||||||
{
|
|
||||||
app->installTranslator(&inAppTranslator);
|
app->installTranslator(&inAppTranslator);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
app->installTranslator(&exAppTranslator);
|
app->installTranslator(&exAppTranslator);
|
||||||
}
|
}
|
||||||
if (loadQtTranslation_p(exLangPath, &exQtTranslator))
|
if (loadQtTranslation_p(exLangPath, &exQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&exQtTranslator);
|
app->installTranslator(&exQtTranslator);
|
||||||
}
|
}
|
||||||
else if (loadQtTranslation_p(inLangPath, &inQtTranslator))
|
else if (loadQtTranslation_p(inLangPath, &inQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&inQtTranslator);
|
app->installTranslator(&inQtTranslator);
|
||||||
}
|
}
|
||||||
#if QT_VERSION >= 0x060000
|
#if QT_VERSION >= 0x060000
|
||||||
|
@ -159,8 +148,7 @@ void TranslationClass::loadTranslation(QApplication *app)
|
||||||
isLangLoaded = true;
|
isLangLoaded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (externalLanguageReady)
|
if (externalLanguageReady) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadInSystemLanguage";
|
qDebug() << "loadInSystemLanguage";
|
||||||
#endif
|
#endif
|
||||||
|
@ -170,18 +158,15 @@ void TranslationClass::loadTranslation(QApplication *app)
|
||||||
qDebug() << "externalLangIndex" << externalLangIndex << "internalLangIndex" << currentLangIndex;
|
qDebug() << "externalLangIndex" << externalLangIndex << "internalLangIndex" << currentLangIndex;
|
||||||
qDebug() << "externalEnglishMode" << externalEnglishMode << "internalEnglishMode" << isEnglishMode;
|
qDebug() << "externalEnglishMode" << externalEnglishMode << "internalEnglishMode" << isEnglishMode;
|
||||||
#endif
|
#endif
|
||||||
if ((trLoadSuccess && externalLangIndex > currentLangIndex) || (trLoadSuccess && externalEnglishMode && !isEnglishMode))
|
if ((trLoadSuccess && externalLangIndex > currentLangIndex) || (trLoadSuccess && externalEnglishMode && !isEnglishMode)) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "installInternalTranslation";
|
qDebug() << "installInternalTranslation";
|
||||||
#endif
|
#endif
|
||||||
app->installTranslator(&inAppTranslator);
|
app->installTranslator(&inAppTranslator);
|
||||||
if (loadQtTranslation_p(exLangPath, &exQtTranslator))
|
if (loadQtTranslation_p(exLangPath, &exQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&exQtTranslator);
|
app->installTranslator(&exQtTranslator);
|
||||||
}
|
}
|
||||||
else if (loadQtTranslation_p(inLangPath, &inQtTranslator))
|
else if (loadQtTranslation_p(inLangPath, &inQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&inQtTranslator);
|
app->installTranslator(&inQtTranslator);
|
||||||
}
|
}
|
||||||
#if QT_VERSION >= 0x060000
|
#if QT_VERSION >= 0x060000
|
||||||
|
@ -191,20 +176,17 @@ void TranslationClass::loadTranslation(QApplication *app)
|
||||||
#endif
|
#endif
|
||||||
isLangLoaded = true;
|
isLangLoaded = true;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "installExternalTranslation";
|
qDebug() << "installExternalTranslation";
|
||||||
#endif
|
#endif
|
||||||
isEnglishMode = externalEnglishMode;
|
isEnglishMode = externalEnglishMode;
|
||||||
currentLanguage = externalLanguageStr;
|
currentLanguage = externalLanguageStr;
|
||||||
app->installTranslator(&exAppTranslator);
|
app->installTranslator(&exAppTranslator);
|
||||||
if (loadQtTranslation_p(exLangPath, &exQtTranslator))
|
if (loadQtTranslation_p(exLangPath, &exQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&exQtTranslator);
|
app->installTranslator(&exQtTranslator);
|
||||||
}
|
}
|
||||||
else if (loadQtTranslation_p(inLangPath, &inQtTranslator))
|
else if (loadQtTranslation_p(inLangPath, &inQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&inQtTranslator);
|
app->installTranslator(&inQtTranslator);
|
||||||
}
|
}
|
||||||
#if QT_VERSION >= 0x060000
|
#if QT_VERSION >= 0x060000
|
||||||
|
@ -215,24 +197,20 @@ void TranslationClass::loadTranslation(QApplication *app)
|
||||||
isLangLoaded = true;
|
isLangLoaded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!isLangLoaded)
|
else if (!isLangLoaded) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadInSystemLanguage";
|
qDebug() << "loadInSystemLanguage";
|
||||||
#endif
|
#endif
|
||||||
trLoadSuccess = loadSystemTranslation_p(inLangPath, &inAppTranslator);
|
trLoadSuccess = loadSystemTranslation_p(inLangPath, &inAppTranslator);
|
||||||
if (trLoadSuccess)
|
if (trLoadSuccess) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "installInternalTranslation";
|
qDebug() << "installInternalTranslation";
|
||||||
#endif
|
#endif
|
||||||
app->installTranslator(&inAppTranslator);
|
app->installTranslator(&inAppTranslator);
|
||||||
if (loadQtTranslation_p(exLangPath, &exQtTranslator))
|
if (loadQtTranslation_p(exLangPath, &exQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&exQtTranslator);
|
app->installTranslator(&exQtTranslator);
|
||||||
}
|
}
|
||||||
else if (loadQtTranslation_p(inLangPath, &inQtTranslator))
|
else if (loadQtTranslation_p(inLangPath, &inQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&inQtTranslator);
|
app->installTranslator(&inQtTranslator);
|
||||||
}
|
}
|
||||||
#if QT_VERSION >= 0x060000
|
#if QT_VERSION >= 0x060000
|
||||||
|
@ -242,18 +220,15 @@ void TranslationClass::loadTranslation(QApplication *app)
|
||||||
#endif
|
#endif
|
||||||
isLangLoaded = true;
|
isLangLoaded = true;
|
||||||
}
|
}
|
||||||
else if (!trLoadSuccess)
|
else if (!trLoadSuccess) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "fallbackToDefaultApplicationLanguage";
|
qDebug() << "fallbackToDefaultApplicationLanguage";
|
||||||
#endif
|
#endif
|
||||||
currentLanguage = "en_GB";
|
currentLanguage = "en_GB";
|
||||||
if (loadQtTranslation_p(exLangPath, &exQtTranslator))
|
if (loadQtTranslation_p(exLangPath, &exQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&exQtTranslator);
|
app->installTranslator(&exQtTranslator);
|
||||||
}
|
}
|
||||||
else if (loadQtTranslation_p(inLangPath, &inQtTranslator))
|
else if (loadQtTranslation_p(inLangPath, &inQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&inQtTranslator);
|
app->installTranslator(&inQtTranslator);
|
||||||
}
|
}
|
||||||
#if QT_VERSION >= 0x060000
|
#if QT_VERSION >= 0x060000
|
||||||
|
@ -266,30 +241,24 @@ void TranslationClass::loadTranslation(QApplication *app)
|
||||||
}
|
}
|
||||||
#else // New qconf loading method
|
#else // New qconf loading method
|
||||||
bool trLoadSuccess;
|
bool trLoadSuccess;
|
||||||
if (isUserLanguageSystem_p())
|
if (isUserLanguageSystem_p()) {
|
||||||
{
|
|
||||||
trLoadSuccess = loadSystemTranslation_p(inLangPath, &inAppTranslator);
|
trLoadSuccess = loadSystemTranslation_p(inLangPath, &inAppTranslator);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
trLoadSuccess = loadUserTranslation_p(inLangPath, &inAppTranslator);
|
trLoadSuccess = loadUserTranslation_p(inLangPath, &inAppTranslator);
|
||||||
}
|
}
|
||||||
if (!trLoadSuccess && !isUserLanguageSystem_p())
|
if (!trLoadSuccess && !isUserLanguageSystem_p()) {
|
||||||
{
|
|
||||||
trLoadSuccess = loadSystemTranslation_p(inLangPath, &inAppTranslator);
|
trLoadSuccess = loadSystemTranslation_p(inLangPath, &inAppTranslator);
|
||||||
}
|
}
|
||||||
if (trLoadSuccess)
|
if (trLoadSuccess) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "installTranslation" << currentLanguage;
|
qDebug() << "installTranslation" << currentLanguage;
|
||||||
#endif
|
#endif
|
||||||
app->installTranslator(&inAppTranslator);
|
app->installTranslator(&inAppTranslator);
|
||||||
if (loadQtTranslation_p(exLangPath, &exQtTranslator))
|
if (loadQtTranslation_p(exLangPath, &exQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&exQtTranslator);
|
app->installTranslator(&exQtTranslator);
|
||||||
}
|
}
|
||||||
else if (loadQtTranslation_p(inLangPath, &inQtTranslator))
|
else if (loadQtTranslation_p(inLangPath, &inQtTranslator)) {
|
||||||
{
|
|
||||||
app->installTranslator(&inQtTranslator);
|
app->installTranslator(&inQtTranslator);
|
||||||
}
|
}
|
||||||
#if QT_VERSION >= 0x060000
|
#if QT_VERSION >= 0x060000
|
||||||
|
@ -332,21 +301,17 @@ bool TranslationClass::loadSystemTranslation_p(const QString &langPath, QTransla
|
||||||
qDebug() << "loadSystemTranslation_p";
|
qDebug() << "loadSystemTranslation_p";
|
||||||
#endif
|
#endif
|
||||||
int currentLangCounter = 0;
|
int currentLangCounter = 0;
|
||||||
for (QString languageName : QLocale::system().uiLanguages())
|
for (const QString &languageName : QLocale::system().uiLanguages()) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguage" << languageName;
|
qDebug() << "loadLanguage" << languageName;
|
||||||
#endif
|
#endif
|
||||||
QStringList langList = QString(languageName).replace("-","_").split("_");
|
const QStringList langList = QString(languageName).replace("-","_").split("_");
|
||||||
if (langList.length() == 2)
|
if (langList.length() == 2) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFile" << QString(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm");
|
qDebug() << "loadLanguageFile" << QString(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
if (QFile::exists(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm"))
|
if (QFile::exists(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm")) {
|
||||||
{
|
if (appTranslator->load(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm")) {
|
||||||
if (appTranslator->load(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm"))
|
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFileSuccess" << QString(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm");
|
qDebug() << "loadLanguageFileSuccess" << QString(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
|
@ -359,10 +324,8 @@ bool TranslationClass::loadSystemTranslation_p(const QString &langPath, QTransla
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFile" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
qDebug() << "loadLanguageFile" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
if (QFile::exists(langPath % "/gta5sync_" % langList.at(0) % ".qm"))
|
if (QFile::exists(langPath % "/gta5sync_" % langList.at(0) % ".qm")) {
|
||||||
{
|
if (appTranslator->load(langPath % "/gta5sync_" % langList.at(0) % ".qm")) {
|
||||||
if (appTranslator->load(langPath % "/gta5sync_" % langList.at(0) % ".qm"))
|
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFileSuccess" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
qDebug() << "loadLanguageFileSuccess" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
|
@ -371,8 +334,7 @@ bool TranslationClass::loadSystemTranslation_p(const QString &langPath, QTransla
|
||||||
currentLangIndex = currentLangCounter;
|
currentLangIndex = currentLangCounter;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (langList.at(0) == "en")
|
else if (langList.at(0) == "en") {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "languageEnglishMode index" << currentLangCounter;
|
qDebug() << "languageEnglishMode index" << currentLangCounter;
|
||||||
#endif
|
#endif
|
||||||
|
@ -382,8 +344,7 @@ bool TranslationClass::loadSystemTranslation_p(const QString &langPath, QTransla
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (langList.at(0) == "en")
|
else if (langList.at(0) == "en") {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "languageEnglishMode index" << currentLangCounter;
|
qDebug() << "languageEnglishMode index" << currentLangCounter;
|
||||||
#endif
|
#endif
|
||||||
|
@ -393,15 +354,12 @@ bool TranslationClass::loadSystemTranslation_p(const QString &langPath, QTransla
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (langList.length() == 1)
|
else if (langList.length() == 1) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFile" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
qDebug() << "loadLanguageFile" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
if (QFile::exists(langPath % "/gta5sync_" % langList.at(0) % ".qm"))
|
if (QFile::exists(langPath % "/gta5sync_" % langList.at(0) % ".qm")) {
|
||||||
{
|
if (appTranslator->load(langPath % "/gta5sync_" % langList.at(0) % ".qm")) {
|
||||||
if (appTranslator->load(langPath % "/gta5sync_" % langList.at(0) % ".qm"))
|
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFileSuccess" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
qDebug() << "loadLanguageFileSuccess" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
|
@ -425,17 +383,14 @@ bool TranslationClass::loadUserTranslation_p(const QString &langPath, QTranslato
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadUserTranslation_p";
|
qDebug() << "loadUserTranslation_p";
|
||||||
#endif
|
#endif
|
||||||
QString languageName = userLanguage;
|
const QString languageName = userLanguage;
|
||||||
QStringList langList = QString(languageName).replace("-","_").split("_");
|
const QStringList langList = QString(languageName).replace("-","_").split("_");
|
||||||
if (langList.length() == 2)
|
if (langList.length() == 2) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFile" << QString(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm");
|
qDebug() << "loadLanguageFile" << QString(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
if (QFile::exists(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm"))
|
if (QFile::exists(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm")) {
|
||||||
{
|
if (appTranslator->load(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm")) {
|
||||||
if (appTranslator->load(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm"))
|
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFileSuccess" << QString(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm");
|
qDebug() << "loadLanguageFileSuccess" << QString(langPath % "/gta5sync_" % langList.at(0) % "_" % langList.at(1) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
|
@ -446,10 +401,8 @@ bool TranslationClass::loadUserTranslation_p(const QString &langPath, QTranslato
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFile" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
qDebug() << "loadLanguageFile" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
if (QFile::exists(langPath % "/gta5sync_" % langList.at(0) % ".qm"))
|
if (QFile::exists(langPath % "/gta5sync_" % langList.at(0) % ".qm")) {
|
||||||
{
|
if (appTranslator->load(langPath % "/gta5sync_" % langList.at(0) % ".qm")) {
|
||||||
if (appTranslator->load(langPath % "/gta5sync_" % langList.at(0) % ".qm"))
|
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFileSuccess" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
qDebug() << "loadLanguageFileSuccess" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
|
@ -458,15 +411,12 @@ bool TranslationClass::loadUserTranslation_p(const QString &langPath, QTranslato
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (langList.length() == 1)
|
else if (langList.length() == 1) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFile" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
qDebug() << "loadLanguageFile" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
if (QFile::exists(langPath % "/gta5sync_" % langList.at(0) % ".qm"))
|
if (QFile::exists(langPath % "/gta5sync_" % langList.at(0) % ".qm")) {
|
||||||
{
|
if (appTranslator->load(langPath % "/gta5sync_" % langList.at(0) % ".qm")) {
|
||||||
if (appTranslator->load(langPath % "/gta5sync_" % langList.at(0) % ".qm"))
|
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFileSuccess" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
qDebug() << "loadLanguageFileSuccess" << QString(langPath % "/gta5sync_" % langList.at(0) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
|
@ -483,17 +433,14 @@ bool TranslationClass::loadQtTranslation_p(const QString &langPath, QTranslator
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadQtTranslation_p" << currentLanguage;
|
qDebug() << "loadQtTranslation_p" << currentLanguage;
|
||||||
#endif
|
#endif
|
||||||
QString languageName = currentLanguage;
|
const QString languageName = currentLanguage;
|
||||||
QStringList langList = QString(languageName).replace("-","_").split("_");
|
const QStringList langList = QString(languageName).replace("-","_").split("_");
|
||||||
if (langList.length() == 2)
|
if (langList.length() == 2) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFile" << QString(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % "_" % langList.at(1) % ".qm");
|
qDebug() << "loadLanguageFile" << QString(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % "_" % langList.at(1) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
if (QFile::exists(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % "_" % langList.at(1) % ".qm"))
|
if (QFile::exists(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % "_" % langList.at(1) % ".qm")) {
|
||||||
{
|
if (qtTranslator->load(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % "_" % langList.at(1) % ".qm")) {
|
||||||
if (qtTranslator->load(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % "_" % langList.at(1) % ".qm"))
|
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFileSuccess" << QString(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % "_" % langList.at(1) % ".qm");
|
qDebug() << "loadLanguageFileSuccess" << QString(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % "_" % langList.at(1) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
|
@ -503,10 +450,8 @@ bool TranslationClass::loadQtTranslation_p(const QString &langPath, QTranslator
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFile" << QString(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm");
|
qDebug() << "loadLanguageFile" << QString(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
if (QFile::exists(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm"))
|
if (QFile::exists(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm")) {
|
||||||
{
|
if (qtTranslator->load(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm")) {
|
||||||
if (qtTranslator->load(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm"))
|
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFileSuccess" << QString(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm");
|
qDebug() << "loadLanguageFileSuccess" << QString(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
|
@ -514,15 +459,12 @@ bool TranslationClass::loadQtTranslation_p(const QString &langPath, QTranslator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (langList.length() == 1)
|
else if (langList.length() == 1) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFile" << QString(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm");
|
qDebug() << "loadLanguageFile" << QString(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
if (QFile::exists(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm"))
|
if (QFile::exists(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm")) {
|
||||||
{
|
if (qtTranslator->load(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm")) {
|
||||||
if (qtTranslator->load(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm"))
|
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "loadLanguageFileSuccess" << QString(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm");
|
qDebug() << "loadLanguageFileSuccess" << QString(langPath % QDir::separator() % QtBaseTranslationFormat % langList.at(0) % ".qm");
|
||||||
#endif
|
#endif
|
||||||
|
@ -541,49 +483,44 @@ bool TranslationClass::isUserLanguageSystem_p()
|
||||||
QString TranslationClass::getCurrentAreaLanguage()
|
QString TranslationClass::getCurrentAreaLanguage()
|
||||||
{
|
{
|
||||||
const QStringList areaTranslations = listAreaTranslations();
|
const QStringList areaTranslations = listAreaTranslations();
|
||||||
if (userAreaLanguage == "Auto" || userAreaLanguage.trimmed().isEmpty())
|
if (userAreaLanguage == "Auto" || userAreaLanguage.trimmed().isEmpty()) {
|
||||||
{
|
const GameLanguage gameLanguage = AppEnv::getGameLanguage(AppEnv::getGameVersion());
|
||||||
GameLanguage gameLanguage = AppEnv::getGameLanguage(AppEnv::getGameVersion());
|
if (gameLanguage == GameLanguage::Undefined) {
|
||||||
if (gameLanguage == GameLanguage::Undefined)
|
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "autoAreaLanguageModeInterface";
|
qDebug() << "autoAreaLanguageModeInterface";
|
||||||
#endif
|
#endif
|
||||||
QString langCode = QString(currentLanguage).replace("-", "_");
|
QString langCode = QString(currentLanguage).replace("-", "_");
|
||||||
if (areaTranslations.contains(langCode))
|
if (areaTranslations.contains(langCode)) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "autoAreaLanguageSelected" << langCode;
|
qDebug() << "autoAreaLanguageSelected" << langCode;
|
||||||
#endif
|
#endif
|
||||||
return langCode;
|
return langCode;
|
||||||
}
|
}
|
||||||
else if (langCode.contains("_"))
|
else if (langCode.contains("_")) {
|
||||||
{
|
|
||||||
langCode = langCode.split("_").at(0);
|
langCode = langCode.split("_").at(0);
|
||||||
if (!areaTranslations.contains(langCode)) goto outputDefaultLanguage;
|
if (!areaTranslations.contains(langCode))
|
||||||
|
goto outputDefaultLanguage;
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "autoAreaLanguageSelected" << langCode;
|
qDebug() << "autoAreaLanguageSelected" << langCode;
|
||||||
#endif
|
#endif
|
||||||
return langCode;
|
return langCode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "autoAreaLanguageModeGame";
|
qDebug() << "autoAreaLanguageModeGame";
|
||||||
#endif
|
#endif
|
||||||
QString langCode = AppEnv::gameLanguageToString(gameLanguage).replace("-", "_");
|
QString langCode = AppEnv::gameLanguageToString(gameLanguage).replace("-", "_");
|
||||||
if (areaTranslations.contains(langCode))
|
if (areaTranslations.contains(langCode)) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "autoAreaLanguageSelected" << langCode;
|
qDebug() << "autoAreaLanguageSelected" << langCode;
|
||||||
#endif
|
#endif
|
||||||
return langCode;
|
return langCode;
|
||||||
}
|
}
|
||||||
else if (langCode.contains("_"))
|
else if (langCode.contains("_")) {
|
||||||
{
|
|
||||||
langCode = langCode.split("_").at(0);
|
langCode = langCode.split("_").at(0);
|
||||||
if (!areaTranslations.contains(langCode)) goto outputDefaultLanguage;
|
if (!areaTranslations.contains(langCode))
|
||||||
|
goto outputDefaultLanguage;
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "autoAreaLanguageSelected" << langCode;
|
qDebug() << "autoAreaLanguageSelected" << langCode;
|
||||||
#endif
|
#endif
|
||||||
|
@ -591,17 +528,16 @@ QString TranslationClass::getCurrentAreaLanguage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (areaTranslations.contains(userAreaLanguage))
|
else if (areaTranslations.contains(userAreaLanguage)) {
|
||||||
{
|
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "userAreaLanguageSelected" << userAreaLanguage;
|
qDebug() << "userAreaLanguageSelected" << userAreaLanguage;
|
||||||
#endif
|
#endif
|
||||||
return userAreaLanguage;
|
return userAreaLanguage;
|
||||||
}
|
}
|
||||||
else if (userAreaLanguage.contains("_"))
|
else if (userAreaLanguage.contains("_")) {
|
||||||
{
|
const QString langCode = QString(userAreaLanguage).replace("-", "_").split("_").at(0);
|
||||||
QString langCode = QString(userAreaLanguage).replace("-", "_").split("_").at(0);
|
if (!areaTranslations.contains(langCode))
|
||||||
if (!areaTranslations.contains(langCode)) goto outputDefaultLanguage;
|
goto outputDefaultLanguage;
|
||||||
#ifdef GTA5SYNC_DEBUG
|
#ifdef GTA5SYNC_DEBUG
|
||||||
qDebug() << "userAreaLanguageSelected" << langCode;
|
qDebug() << "userAreaLanguageSelected" << langCode;
|
||||||
#endif
|
#endif
|
||||||
|
@ -626,8 +562,7 @@ bool TranslationClass::isLanguageLoaded()
|
||||||
|
|
||||||
void TranslationClass::unloadTranslation(QApplication *app)
|
void TranslationClass::unloadTranslation(QApplication *app)
|
||||||
{
|
{
|
||||||
if (isLangLoaded)
|
if (isLangLoaded) {
|
||||||
{
|
|
||||||
#ifndef GTA5SYNC_QCONF
|
#ifndef GTA5SYNC_QCONF
|
||||||
app->removeTranslator(&exAppTranslator);
|
app->removeTranslator(&exAppTranslator);
|
||||||
app->removeTranslator(&exQtTranslator);
|
app->removeTranslator(&exQtTranslator);
|
||||||
|
@ -650,30 +585,21 @@ void TranslationClass::unloadTranslation(QApplication *app)
|
||||||
|
|
||||||
QString TranslationClass::getCountryCode(QLocale::Country country)
|
QString TranslationClass::getCountryCode(QLocale::Country country)
|
||||||
{
|
{
|
||||||
QList<QLocale> locales = QLocale::matchingLocales(QLocale::AnyLanguage,
|
const QList<QLocale> locales = QLocale::matchingLocales(QLocale::AnyLanguage, QLocale::AnyScript, country);
|
||||||
QLocale::AnyScript,
|
if (!locales.isEmpty()) {
|
||||||
country);
|
const QStringList localeStrList = locales.at(0).name().split("_");
|
||||||
if (locales.isEmpty()) return QString();
|
if (localeStrList.length() >= 2) {
|
||||||
QStringList localeStrList = locales.at(0).name().split("_");
|
|
||||||
if (localeStrList.length() >= 2)
|
|
||||||
{
|
|
||||||
return localeStrList.at(1).toLower();
|
return localeStrList.at(1).toLower();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return QString();
|
|
||||||
}
|
}
|
||||||
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TranslationClass::getCountryCode(QLocale locale)
|
QString TranslationClass::getCountryCode(QLocale locale)
|
||||||
{
|
{
|
||||||
QStringList localeStrList = locale.name().split("_");
|
QStringList localeStrList = locale.name().split("_");
|
||||||
if (localeStrList.length() >= 2)
|
if (localeStrList.length() >= 2) {
|
||||||
{
|
|
||||||
return localeStrList.at(1).toLower();
|
return localeStrList.at(1).toLower();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return QString();
|
return QString();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
69
main.cpp
69
main.cpp
|
@ -1,6 +1,6 @@
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* gta5view Grand Theft Auto V Profile Viewer
|
* gta5view Grand Theft Auto V Profile Viewer
|
||||||
* Copyright (C) 2016-2019 Syping
|
* Copyright (C) 2016-2021 Syping
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -94,7 +94,6 @@ int main(int argc, char *argv[])
|
||||||
settings.sync();
|
settings.sync();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool isFirstStart = settings.value("IsFirstStart", true).toBool();
|
|
||||||
bool customStyle = settings.value("CustomStyle", false).toBool();
|
bool customStyle = settings.value("CustomStyle", false).toBool();
|
||||||
if (customStyle) {
|
if (customStyle) {
|
||||||
const QString appStyle = settings.value("AppStyle", "Default").toString();
|
const QString appStyle = settings.value("AppStyle", "Default").toString();
|
||||||
|
@ -130,28 +129,10 @@ int main(int argc, char *argv[])
|
||||||
Telemetry->work();
|
Telemetry->work();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!applicationArgs.contains("--skip-firststart"))
|
|
||||||
{
|
|
||||||
if (isFirstStart)
|
|
||||||
{
|
|
||||||
QMessageBox::StandardButton button = QMessageBox::information(nullptr, QString("%1 %2").arg(GTA5SYNC_APPSTR, GTA5SYNC_APPVER), QApplication::tr("<h4>Welcome to %1!</h4>You want to configure %1 before you start using it?").arg(GTA5SYNC_APPSTR), QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
|
||||||
if (button == QMessageBox::Yes)
|
|
||||||
{
|
|
||||||
ProfileDatabase profileDB;
|
|
||||||
OptionsDialog optionsDialog(&profileDB);
|
|
||||||
optionsDialog.setWindowIcon(IconLoader::loadingAppIcon());
|
|
||||||
optionsDialog.show();
|
|
||||||
optionsDialog.exec();
|
|
||||||
}
|
|
||||||
settings.setValue("IsFirstStart", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef GTA5SYNC_TELEMETRY
|
#ifdef GTA5SYNC_TELEMETRY
|
||||||
bool telemetryWindowLaunched = settings.value("PersonalUsageDataWindowLaunched", false).toBool();
|
bool telemetryWindowLaunched = settings.value("PersonalUsageDataWindowLaunched", false).toBool();
|
||||||
bool pushUsageData = settings.value("PushUsageData", false).toBool();
|
bool pushUsageData = settings.value("PushUsageData", false).toBool();
|
||||||
if (!telemetryWindowLaunched && !pushUsageData)
|
if (!telemetryWindowLaunched && !pushUsageData) {
|
||||||
{
|
|
||||||
QDialog *telemetryDialog = new QDialog();
|
QDialog *telemetryDialog = new QDialog();
|
||||||
telemetryDialog->setObjectName(QStringLiteral("TelemetryDialog"));
|
telemetryDialog->setObjectName(QStringLiteral("TelemetryDialog"));
|
||||||
telemetryDialog->setWindowTitle(QString("%1 %2").arg(GTA5SYNC_APPSTR, GTA5SYNC_APPVER));
|
telemetryDialog->setWindowTitle(QString("%1 %2").arg(GTA5SYNC_APPSTR, GTA5SYNC_APPVER));
|
||||||
|
@ -183,8 +164,7 @@ int main(int argc, char *argv[])
|
||||||
telemetryDialog->setFixedSize(telemetryDialog->sizeHint());
|
telemetryDialog->setFixedSize(telemetryDialog->sizeHint());
|
||||||
telemetryDialog->exec();
|
telemetryDialog->exec();
|
||||||
QObject::disconnect(telemetryButton, SIGNAL(clicked(bool)), telemetryDialog, SLOT(close()));
|
QObject::disconnect(telemetryButton, SIGNAL(clicked(bool)), telemetryDialog, SLOT(close()));
|
||||||
if (telemetryCheckBox->isChecked())
|
if (telemetryCheckBox->isChecked()) {
|
||||||
{
|
|
||||||
QSettings telemetrySettings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR);
|
QSettings telemetrySettings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR);
|
||||||
telemetrySettings.beginGroup("Telemetry");
|
telemetrySettings.beginGroup("Telemetry");
|
||||||
telemetrySettings.setValue("PushUsageData", true);
|
telemetrySettings.setValue("PushUsageData", true);
|
||||||
|
@ -200,43 +180,35 @@ int main(int argc, char *argv[])
|
||||||
#endif
|
#endif
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
for (QString currentArg : applicationArgs)
|
for (const QString ¤tArg : applicationArgs) {
|
||||||
{
|
|
||||||
QString reworkedArg;
|
QString reworkedArg;
|
||||||
if (currentArg.left(9) == "-showpic=" && selectedAction == "")
|
if (currentArg.left(9) == "-showpic=" && selectedAction == "") {
|
||||||
{
|
reworkedArg = QString(currentArg).remove(0,9);
|
||||||
reworkedArg = currentArg.remove(0,9);
|
|
||||||
arg1 = reworkedArg;
|
arg1 = reworkedArg;
|
||||||
selectedAction = "showpic";
|
selectedAction = "showpic";
|
||||||
}
|
}
|
||||||
else if (currentArg.left(9) == "-showsgd=" && selectedAction == "")
|
else if (currentArg.left(9) == "-showsgd=" && selectedAction == "") {
|
||||||
{
|
reworkedArg = QString(currentArg).remove(0,9);
|
||||||
reworkedArg = currentArg.remove(0,9);
|
|
||||||
arg1 = reworkedArg;
|
arg1 = reworkedArg;
|
||||||
selectedAction = "showsgd";
|
selectedAction = "showsgd";
|
||||||
}
|
}
|
||||||
else if (selectedAction == "")
|
else if (selectedAction == "") {
|
||||||
{
|
|
||||||
QFile argumentFile(currentArg);
|
QFile argumentFile(currentArg);
|
||||||
QFileInfo argumentFileInfo(argumentFile);
|
QFileInfo argumentFileInfo(argumentFile);
|
||||||
if (argumentFile.exists())
|
if (argumentFile.exists()) {
|
||||||
{
|
|
||||||
QString argumentFileName = argumentFileInfo.fileName();
|
QString argumentFileName = argumentFileInfo.fileName();
|
||||||
QString argumentFileType = argumentFileName.left(4);
|
QString argumentFileType = argumentFileName.left(4);
|
||||||
QString argumentFileExt = argumentFileName.right(4);
|
QString argumentFileExt = argumentFileName.right(4);
|
||||||
|
|
||||||
if (argumentFileType == "PGTA" || argumentFileExt == ".g5e")
|
if (argumentFileType == "PGTA" || argumentFileExt == ".g5e") {
|
||||||
{
|
|
||||||
arg1 = currentArg;
|
arg1 = currentArg;
|
||||||
selectedAction = "showpic";
|
selectedAction = "showpic";
|
||||||
}
|
}
|
||||||
else if (argumentFileType == "SGTA")
|
else if (argumentFileType == "SGTA") {
|
||||||
{
|
|
||||||
arg1 = currentArg;
|
arg1 = currentArg;
|
||||||
selectedAction = "showsgd";
|
selectedAction = "showsgd";
|
||||||
}
|
}
|
||||||
else if (argumentFileType == "MISR")
|
else if (argumentFileType == "MISR") {
|
||||||
{
|
|
||||||
arg1 = currentArg;
|
arg1 = currentArg;
|
||||||
selectedAction = "showsgd";
|
selectedAction = "showsgd";
|
||||||
}
|
}
|
||||||
|
@ -244,8 +216,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedAction == "showpic")
|
if (selectedAction == "showpic") {
|
||||||
{
|
|
||||||
CrewDatabase crewDB;
|
CrewDatabase crewDB;
|
||||||
ProfileDatabase profileDB;
|
ProfileDatabase profileDB;
|
||||||
DatabaseThread threadDB(&crewDB);
|
DatabaseThread threadDB(&crewDB);
|
||||||
|
@ -258,8 +229,10 @@ int main(int argc, char *argv[])
|
||||||
picDialog.setWindowFlags(picDialog.windowFlags()^Qt::Dialog^Qt::Window);
|
picDialog.setWindowFlags(picDialog.windowFlags()^Qt::Dialog^Qt::Window);
|
||||||
|
|
||||||
int crewID = picture.getSnapmaticProperties().crewID;
|
int crewID = picture.getSnapmaticProperties().crewID;
|
||||||
if (crewID != 0) { crewDB.addCrew(crewID); }
|
if (crewID != 0)
|
||||||
if (!readOk) { return 1; }
|
crewDB.addCrew(crewID);
|
||||||
|
if (!readOk)
|
||||||
|
return 1;
|
||||||
|
|
||||||
QObject::connect(&threadDB, SIGNAL(crewNameFound(int, QString)), &crewDB, SLOT(setCrewName(int, QString)));
|
QObject::connect(&threadDB, SIGNAL(crewNameFound(int, QString)), &crewDB, SLOT(setCrewName(int, QString)));
|
||||||
QObject::connect(&threadDB, SIGNAL(crewNameUpdated()), &picDialog, SLOT(crewNameUpdated()));
|
QObject::connect(&threadDB, SIGNAL(crewNameUpdated()), &picDialog, SLOT(crewNameUpdated()));
|
||||||
|
@ -273,8 +246,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
return a.exec();
|
return a.exec();
|
||||||
}
|
}
|
||||||
else if (selectedAction == "showsgd")
|
else if (selectedAction == "showsgd") {
|
||||||
{
|
|
||||||
SavegameDialog savegameDialog;
|
SavegameDialog savegameDialog;
|
||||||
SavegameData savegame;
|
SavegameData savegame;
|
||||||
|
|
||||||
|
@ -283,7 +255,8 @@ int main(int argc, char *argv[])
|
||||||
savegameDialog.setSavegameData(&savegame, arg1, readOk);
|
savegameDialog.setSavegameData(&savegame, arg1, readOk);
|
||||||
savegameDialog.setWindowFlags(savegameDialog.windowFlags()^Qt::Dialog^Qt::Window);
|
savegameDialog.setWindowFlags(savegameDialog.windowFlags()^Qt::Dialog^Qt::Window);
|
||||||
|
|
||||||
if (!readOk) { return 1; }
|
if (!readOk)
|
||||||
|
return 1;
|
||||||
|
|
||||||
a.setQuitOnLastWindowClosed(true);
|
a.setQuitOnLastWindowClosed(true);
|
||||||
savegameDialog.show();
|
savegameDialog.show();
|
||||||
|
|
|
@ -1639,14 +1639,6 @@ Press 1 for Default View</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>QApplication</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../main.cpp" line="137"/>
|
|
||||||
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>SavegameDialog</name>
|
<name>SavegameDialog</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -2237,22 +2229,22 @@ Press 1 for Default View</source>
|
||||||
<context>
|
<context>
|
||||||
<name>TelemetryDialog</name>
|
<name>TelemetryDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="166"/>
|
<location filename="../main.cpp" line="147"/>
|
||||||
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="167"/>
|
<location filename="../main.cpp" line="148"/>
|
||||||
<source>%1 User Statistics</source>
|
<source>%1 User Statistics</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="171"/>
|
<location filename="../main.cpp" line="152"/>
|
||||||
<source>Yes, I want include personal usage data.</source>
|
<source>Yes, I want include personal usage data.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="180"/>
|
<location filename="../main.cpp" line="161"/>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Binary file not shown.
|
@ -1685,9 +1685,8 @@ Drücke 1 für Standardmodus</translation>
|
||||||
<context>
|
<context>
|
||||||
<name>QApplication</name>
|
<name>QApplication</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="137"/>
|
|
||||||
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
||||||
<translation><h4>Willkommen zu %1!</h4>Möchtest du %1 einstellen bevor du es nutzt?</translation>
|
<translation type="vanished"><h4>Willkommen zu %1!</h4>Möchtest du %1 einstellen bevor du es nutzt?</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -2282,22 +2281,22 @@ Drücke 1 für Standardmodus</translation>
|
||||||
<context>
|
<context>
|
||||||
<name>TelemetryDialog</name>
|
<name>TelemetryDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="167"/>
|
<location filename="../main.cpp" line="148"/>
|
||||||
<source>%1 User Statistics</source>
|
<source>%1 User Statistics</source>
|
||||||
<translation>%1 Benutzerstatistik</translation>
|
<translation>%1 Benutzerstatistik</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="166"/>
|
<location filename="../main.cpp" line="147"/>
|
||||||
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
<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>
|
<translation>Sollen bei Einreichungen Persönliche Nutzungsdaten einbezogen werden um %1 in der Zukunft zu unterstützen?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="171"/>
|
<location filename="../main.cpp" line="152"/>
|
||||||
<source>Yes, I want include personal usage data.</source>
|
<source>Yes, I want include personal usage data.</source>
|
||||||
<translation>Ja, ich möchte Persönliche Nutzungsdaten einbeziehen.</translation>
|
<translation>Ja, ich möchte Persönliche Nutzungsdaten einbeziehen.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="180"/>
|
<location filename="../main.cpp" line="161"/>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation>&OK</translation>
|
<translation>&OK</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -1639,14 +1639,6 @@ Press 1 for Default View</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>QApplication</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../main.cpp" line="137"/>
|
|
||||||
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>SavegameDialog</name>
|
<name>SavegameDialog</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -2237,22 +2229,22 @@ Press 1 for Default View</source>
|
||||||
<context>
|
<context>
|
||||||
<name>TelemetryDialog</name>
|
<name>TelemetryDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="166"/>
|
<location filename="../main.cpp" line="147"/>
|
||||||
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="167"/>
|
<location filename="../main.cpp" line="148"/>
|
||||||
<source>%1 User Statistics</source>
|
<source>%1 User Statistics</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="171"/>
|
<location filename="../main.cpp" line="152"/>
|
||||||
<source>Yes, I want include personal usage data.</source>
|
<source>Yes, I want include personal usage data.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="180"/>
|
<location filename="../main.cpp" line="161"/>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Binary file not shown.
|
@ -1695,9 +1695,8 @@ Appuyer sur 1 pour le mode par défaut</translation>
|
||||||
<translation type="obsolete">Police sélectionnée : %1</translation>
|
<translation type="obsolete">Police sélectionnée : %1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="137"/>
|
|
||||||
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
||||||
<translation><h4>Bienvenue sur %1!</h4>Voulez-vous configurer %1 avant de l'utiliser t?</translation>
|
<translation type="vanished"><h4>Bienvenue sur %1!</h4>Voulez-vous configurer %1 avant de l'utiliser t?</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -2294,22 +2293,22 @@ Appuyer sur 1 pour le mode par défaut</translation>
|
||||||
<context>
|
<context>
|
||||||
<name>TelemetryDialog</name>
|
<name>TelemetryDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="166"/>
|
<location filename="../main.cpp" line="147"/>
|
||||||
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
||||||
<translation>Voulez-vous aider au développement de %1 en transmettant vos données d'utilisation ?</translation>
|
<translation>Voulez-vous aider au développement de %1 en transmettant vos données d'utilisation ?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="167"/>
|
<location filename="../main.cpp" line="148"/>
|
||||||
<source>%1 User Statistics</source>
|
<source>%1 User Statistics</source>
|
||||||
<translation>Statistiques utilisateurs %1</translation>
|
<translation>Statistiques utilisateurs %1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="171"/>
|
<location filename="../main.cpp" line="152"/>
|
||||||
<source>Yes, I want include personal usage data.</source>
|
<source>Yes, I want include personal usage data.</source>
|
||||||
<translation>Oui, je veux partager mes données d'utilisation.</translation>
|
<translation>Oui, je veux partager mes données d'utilisation.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="180"/>
|
<location filename="../main.cpp" line="161"/>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation>&OK</translation>
|
<translation>&OK</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Binary file not shown.
|
@ -1713,9 +1713,8 @@ Press 1 for Default View</source>
|
||||||
<translation type="obsolete">선택된 폰트: %1</translation>
|
<translation type="obsolete">선택된 폰트: %1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="137"/>
|
|
||||||
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
||||||
<translation><h4>%1에 오신 것을 환영합니다!</h4>%1을 사용하기 전에 설정 창을 여시겠습니까?</translation>
|
<translation type="vanished"><h4>%1에 오신 것을 환영합니다!</h4>%1을 사용하기 전에 설정 창을 여시겠습니까?</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -2315,22 +2314,22 @@ Press 1 for Default View</source>
|
||||||
<context>
|
<context>
|
||||||
<name>TelemetryDialog</name>
|
<name>TelemetryDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="166"/>
|
<location filename="../main.cpp" line="147"/>
|
||||||
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
||||||
<translation>개인 사용 데이터를 제출에 포함시켜 %1이(가) 개선되기를 원합니까?</translation>
|
<translation>개인 사용 데이터를 제출에 포함시켜 %1이(가) 개선되기를 원합니까?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="167"/>
|
<location filename="../main.cpp" line="148"/>
|
||||||
<source>%1 User Statistics</source>
|
<source>%1 User Statistics</source>
|
||||||
<translation>%1 사용자 통계</translation>
|
<translation>%1 사용자 통계</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="171"/>
|
<location filename="../main.cpp" line="152"/>
|
||||||
<source>Yes, I want include personal usage data.</source>
|
<source>Yes, I want include personal usage data.</source>
|
||||||
<translation>예, 개인 사용 데이터를 포함시키고 싶습니다.</translation>
|
<translation>예, 개인 사용 데이터를 포함시키고 싶습니다.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="180"/>
|
<location filename="../main.cpp" line="161"/>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation>확인(&O)</translation>
|
<translation>확인(&O)</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Binary file not shown.
|
@ -1700,9 +1700,8 @@ Press 1 for Default View</source>
|
||||||
<context>
|
<context>
|
||||||
<name>QApplication</name>
|
<name>QApplication</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="137"/>
|
|
||||||
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
||||||
<translation><h4>Добро пожаловать в %1!</h4>Хочешь изменить настройки %1 перед использованием?</translation>
|
<translation type="vanished"><h4>Добро пожаловать в %1!</h4>Хочешь изменить настройки %1 перед использованием?</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -2297,22 +2296,22 @@ Press 1 for Default View</source>
|
||||||
<context>
|
<context>
|
||||||
<name>TelemetryDialog</name>
|
<name>TelemetryDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="166"/>
|
<location filename="../main.cpp" line="147"/>
|
||||||
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
||||||
<translation>Разрешишь нам собирать статистику о пользовании тобой %1? Это поможет нам в разработке.</translation>
|
<translation>Разрешишь нам собирать статистику о пользовании тобой %1? Это поможет нам в разработке.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="167"/>
|
<location filename="../main.cpp" line="148"/>
|
||||||
<source>%1 User Statistics</source>
|
<source>%1 User Statistics</source>
|
||||||
<translation>%1 Пользовательская статистика</translation>
|
<translation>%1 Пользовательская статистика</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="171"/>
|
<location filename="../main.cpp" line="152"/>
|
||||||
<source>Yes, I want include personal usage data.</source>
|
<source>Yes, I want include personal usage data.</source>
|
||||||
<translation>Да, передавать данные о пользовании программой.</translation>
|
<translation>Да, передавать данные о пользовании программой.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="180"/>
|
<location filename="../main.cpp" line="161"/>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation>&ОК</translation>
|
<translation>&ОК</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Binary file not shown.
|
@ -1698,9 +1698,8 @@ Press 1 for Default View</source>
|
||||||
<translation type="obsolete">Вибраний шрифт:%1</translation>
|
<translation type="obsolete">Вибраний шрифт:%1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="137"/>
|
|
||||||
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
||||||
<translation><h4>Ласкаво просимо до %1!</h4>Ви хочете налаштувати %1 перед використанням?</translation>
|
<translation type="vanished"><h4>Ласкаво просимо до %1!</h4>Ви хочете налаштувати %1 перед використанням?</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -2295,22 +2294,22 @@ Press 1 for Default View</source>
|
||||||
<context>
|
<context>
|
||||||
<name>TelemetryDialog</name>
|
<name>TelemetryDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="166"/>
|
<location filename="../main.cpp" line="147"/>
|
||||||
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
||||||
<translation>Ви хочете допомогти %1 покращитись у майбутньому, включивши дані особистого користування?</translation>
|
<translation>Ви хочете допомогти %1 покращитись у майбутньому, включивши дані особистого користування?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="167"/>
|
<location filename="../main.cpp" line="148"/>
|
||||||
<source>%1 User Statistics</source>
|
<source>%1 User Statistics</source>
|
||||||
<translation>%1 Статистика користувачів</translation>
|
<translation>%1 Статистика користувачів</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="171"/>
|
<location filename="../main.cpp" line="152"/>
|
||||||
<source>Yes, I want include personal usage data.</source>
|
<source>Yes, I want include personal usage data.</source>
|
||||||
<translation>Так, я хочу включити дані особистого користування.</translation>
|
<translation>Так, я хочу включити дані особистого користування.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="180"/>
|
<location filename="../main.cpp" line="161"/>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translatorcomment>&OK</translatorcomment>
|
<translatorcomment>&OK</translatorcomment>
|
||||||
<translation>&OK</translation>
|
<translation>&OK</translation>
|
||||||
|
|
Binary file not shown.
|
@ -1680,9 +1680,8 @@ Press 1 for Default View</source>
|
||||||
<context>
|
<context>
|
||||||
<name>QApplication</name>
|
<name>QApplication</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="137"/>
|
|
||||||
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
<source><h4>Welcome to %1!</h4>You want to configure %1 before you start using it?</source>
|
||||||
<translation><h4>歡迎使用 %1!</h4> 你想在開始前先設定 %1 嗎?</translation>
|
<translation type="vanished"><h4>歡迎使用 %1!</h4> 你想在開始前先設定 %1 嗎?</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -2277,22 +2276,22 @@ Press 1 for Default View</source>
|
||||||
<context>
|
<context>
|
||||||
<name>TelemetryDialog</name>
|
<name>TelemetryDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="166"/>
|
<location filename="../main.cpp" line="147"/>
|
||||||
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
<source>You want help %1 to improve in the future by including personal usage data in your submission?</source>
|
||||||
<translation>你希望通過收集資料來幫助改善 %1 嗎?</translation>
|
<translation>你希望通過收集資料來幫助改善 %1 嗎?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="167"/>
|
<location filename="../main.cpp" line="148"/>
|
||||||
<source>%1 User Statistics</source>
|
<source>%1 User Statistics</source>
|
||||||
<translation>%1 使用者統計</translation>
|
<translation>%1 使用者統計</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="171"/>
|
<location filename="../main.cpp" line="152"/>
|
||||||
<source>Yes, I want include personal usage data.</source>
|
<source>Yes, I want include personal usage data.</source>
|
||||||
<translation>是的,我想幫忙.</translation>
|
<translation>是的,我想幫忙.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../main.cpp" line="180"/>
|
<location filename="../main.cpp" line="161"/>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation>確定(&O)</translation>
|
<translation>確定(&O)</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Loading…
Reference in a new issue