From f62b1b08c07b6b84ac637ec6dc3ae822b1398bcf Mon Sep 17 00:00:00 2001 From: Syping Date: Sat, 21 Oct 2017 05:59:10 +0200 Subject: [PATCH] last code patch from gta5sync --- .travis.yml | 8 ++--- DatabaseThread.cpp | 27 ++++++++++++----- DatabaseThread.h | 1 + GlobalString.cpp | 5 ++-- GlobalString.h | 2 +- OptionsDialog.cpp | 20 ++++++------- OptionsDialog.h | 2 +- PictureDialog.cpp | 2 +- ProfileInterface.cpp | 37 +++++++++++------------ ProfileLoader.cpp | 8 ++--- SnapmaticEditor.cpp | 4 +-- SnapmaticPicture.cpp | 2 +- TranslationClass.cpp | 4 +-- UserInterface.cpp | 7 ++--- config.h | 2 +- main.cpp | 8 ++--- res/app.rc | 4 +-- res/gta5sync_de.ts | 66 ++++++++++++++++++++-------------------- res/gta5sync_en_US.ts | 66 ++++++++++++++++++++-------------------- res/gta5sync_fr.ts | 66 ++++++++++++++++++++-------------------- res/gta5sync_ru.qm | Bin 32283 -> 32303 bytes res/gta5sync_ru.ts | 68 +++++++++++++++++++++--------------------- 22 files changed, 208 insertions(+), 201 deletions(-) diff --git a/.travis.yml b/.travis.yml index dee4fc3..9597e9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,14 +32,14 @@ before_script: script: - cd qt5 - - qmake -qt=5 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=c++11 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$PACKAGE_VERSION-dev1\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro + - qmake -qt=5 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=c++11 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$PACKAGE_VERSION-dev2\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro - make -j 4 - - sudo checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt5 --pkgversion=$PACKAGE_VERSION --pkgrelease=dev1 --pkggroup=utility --maintainer="Syping on Travis \" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5widgets5,qttranslations5-l10n --conflicts=gta5view,gta5view-qt4 --replaces=gta5view,gta5view-qt4 --pakdir=../../package + - sudo checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt5 --pkgversion=$PACKAGE_VERSION --pkgrelease=dev2 --pkggroup=utility --maintainer="Syping on Travis \" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5widgets5,qttranslations5-l10n --conflicts=gta5view,gta5view-qt4 --replaces=gta5view,gta5view-qt4 --pakdir=../../package - cd .. - cd qt4 - - qmake -qt=4 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=c++11 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$PACKAGE_VERSION-dev1\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro + - qmake -qt=4 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=c++11 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$PACKAGE_VERSION-dev2\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro - make -j 4 - - sudo checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt4 --pkgversion=$PACKAGE_VERSION --pkgrelease=dev1 --pkggroup=utility --maintainer="Syping on Travis \" --requires=libqtcore4,libqtgui4,libqt4-network,qtcore4-l10n --conflicts=gta5view,gta5view-qt5 --replaces=gta5view,gta5view-qt5 --pakdir=../../package + - sudo checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt4 --pkgversion=$PACKAGE_VERSION --pkgrelease=dev2 --pkggroup=utility --maintainer="Syping on Travis \" --requires=libqtcore4,libqtgui4,libqt4-network,qtcore4-l10n --conflicts=gta5view,gta5view-qt5 --replaces=gta5view,gta5view-qt5 --pakdir=../../package - cd .. deploy: diff --git a/DatabaseThread.cpp b/DatabaseThread.cpp index 4e7d90d..aba55b9 100755 --- a/DatabaseThread.cpp +++ b/DatabaseThread.cpp @@ -125,9 +125,9 @@ void DatabaseThread::run() void DatabaseThread::scanCrewReference(const QStringList &crewList, const int &requestDelay) { - foreach (const QString &crewID, crewList) + for (QString crewID : crewList) { - if (threadRunning && crewID != "0") + if (threadRunning && crewID != QLatin1String("0")) { QNetworkAccessManager *netManager = new QNetworkAccessManager(); @@ -182,9 +182,9 @@ void DatabaseThread::scanCrewReference(const QStringList &crewList, const int &r void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int &maxPages, const int &requestDelay) { - foreach (const QString &crewID, crewList) + for (QString crewID : crewList) { - if (threadRunning && crewID != "0") + if (threadRunning && crewID != QLatin1String("0")) { int currentPage = 0; int foundPlayers = 0; @@ -223,8 +223,8 @@ void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int if (crewMap.contains("Members")) { - QList memberList = crewMap["Members"].toList(); - foreach (const QVariant &memberVariant, memberList) + const QList memberList = crewMap["Members"].toList(); + for (QVariant memberVariant : memberList) { QMap memberMap = memberVariant.toMap(); foundPlayers++; @@ -232,7 +232,7 @@ void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int { int RockstarId = memberMap["RockstarId"].toInt(); QString memberName = memberMap["Name"].toString(); - if (memberName != "" && RockstarId != 0) + if (!memberName.isEmpty() && RockstarId != 0) { emit playerNameFound(RockstarId, memberName); } @@ -256,10 +256,21 @@ void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int } } +void DatabaseThread::deleteCompatibleCrews(QStringList *crewList) +{ + for (QString& crewNID : *crewList) + { + if (crewDB->isCompatibleCrew(crewNID)) + { + crewList->removeAll(crewNID); + } + } +} + QStringList DatabaseThread::deleteCompatibleCrews(const QStringList &crewList) { QStringList crewListR = crewList; - foreach(const QString &crewNID, crewListR) + for (QString& crewNID : crewListR) { if (crewDB->isCompatibleCrew(crewNID)) { diff --git a/DatabaseThread.h b/DatabaseThread.h index 10a3b47..3abf047 100755 --- a/DatabaseThread.h +++ b/DatabaseThread.h @@ -36,6 +36,7 @@ private: CrewDatabase *crewDB; void scanCrewMembersList(const QStringList &crewList, const int &maxPages, const int &requestDelay); void scanCrewReference(const QStringList &crewList, const int &requestDelay); + void deleteCompatibleCrews(QStringList *crewList); QStringList deleteCompatibleCrews(const QStringList &crewList); bool threadRunning; int plyrPerReq; diff --git a/GlobalString.cpp b/GlobalString.cpp index fb94678..f0a63ae 100755 --- a/GlobalString.cpp +++ b/GlobalString.cpp @@ -37,8 +37,7 @@ QMap GlobalString::getGlobalMap() QSettings globalFile(getLanguageFile(), QSettings::IniFormat); globalFile.setIniCodec("UTF-8"); globalFile.beginGroup("Global"); - QStringList globalStrList = globalFile.childKeys(); - foreach(const QString &globalStr, globalStrList) + for (QString globalStr : globalFile.childKeys()) { globalMap[globalStr] = globalFile.value(globalStr, globalStr).toString(); } @@ -55,7 +54,7 @@ QString GlobalString::getString(QString valueStr, bool *ok) QStringList globalStrList = globalFile.childKeys(); if (globalStrList.contains(valueStr)) { - if (ok != NULL) *ok = true; + if (ok != nullptr) *ok = true; globalString = globalFile.value(valueStr, valueStr).toString(); } globalFile.endGroup(); diff --git a/GlobalString.h b/GlobalString.h index 9c2d77c..2d1f4ba 100755 --- a/GlobalString.h +++ b/GlobalString.h @@ -26,7 +26,7 @@ class GlobalString { public: GlobalString(); - static QString getString(QString valueStr, bool *ok = 0); + static QString getString(QString valueStr, bool *ok = nullptr); static QString getLanguageFile(); static QString getLanguage(); static QMap getGlobalMap(); diff --git a/OptionsDialog.cpp b/OptionsDialog.cpp index b907978..a6db0c2 100755 --- a/OptionsDialog.cpp +++ b/OptionsDialog.cpp @@ -94,16 +94,14 @@ OptionsDialog::OptionsDialog(ProfileDatabase *profileDB, QWidget *parent) : OptionsDialog::~OptionsDialog() { delete settings; - foreach(QTreeWidgetItem *playerItem, playerItems) - { - delete playerItem; - } + qDeleteAll(playerItems.begin(), playerItems.end()); + playerItems.clear(); delete ui; } void OptionsDialog::setupTreeWidget() { - foreach(const QString &playerIDStr, profileDB->getPlayers()) + for (QString playerIDStr : profileDB->getPlayers()) { bool ok; int playerID = playerIDStr.toInt(&ok); @@ -112,8 +110,8 @@ void OptionsDialog::setupTreeWidget() QString playerName = profileDB->getPlayerName(playerID); QStringList playerTreeViewList; - playerTreeViewList << playerIDStr; - playerTreeViewList << playerName; + playerTreeViewList += playerIDStr; + playerTreeViewList += playerName; QTreeWidgetItem *playerItem = new QTreeWidgetItem(playerTreeViewList); ui->twPlayers->addTopLevelItem(playerItem); @@ -126,7 +124,7 @@ void OptionsDialog::setupTreeWidget() void OptionsDialog::setupLanguageBox() { settings->beginGroup("Interface"); - currentLanguage = settings->value("Language","System").toString(); + currentLanguage = settings->value("Language", "System").toString(); settings->endGroup(); QString cbSysStr = tr("%1 (Next Closest Language)", "First language a person can talk with a different person/application. \"Native\" or \"Not Native\".").arg(tr("System", @@ -142,7 +140,7 @@ void OptionsDialog::setupLanguageBox() availableLanguages.removeDuplicates(); availableLanguages.sort(); - foreach(const QString &lang, availableLanguages) + for (QString lang : availableLanguages) { QLocale langLocale(lang); QString cbLangStr = langLocale.nativeLanguageName() % " (" % langLocale.nativeCountryName() % ") [" % lang % "]"; @@ -285,9 +283,9 @@ void OptionsDialog::setupDefaultProfile() ui->cbProfiles->addItem(cbNoneStr, ""); } -void OptionsDialog::commitProfiles(QStringList profiles) +void OptionsDialog::commitProfiles(const QStringList &profiles) { - foreach(const QString &profile, profiles) + for (QString profile : profiles) { ui->cbProfiles->addItem(tr("Profile: %1").arg(profile), profile); if (defaultProfile == profile) diff --git a/OptionsDialog.h b/OptionsDialog.h index d48ab85..af57d87 100755 --- a/OptionsDialog.h +++ b/OptionsDialog.h @@ -36,7 +36,7 @@ class OptionsDialog : public QDialog public: explicit OptionsDialog(ProfileDatabase *profileDB, QWidget *parent = 0); - void commitProfiles(QStringList profiles); + void commitProfiles(const QStringList &profiles); ~OptionsDialog(); private slots: diff --git a/PictureDialog.cpp b/PictureDialog.cpp index dd9cc28..61c255c 100755 --- a/PictureDialog.cpp +++ b/PictureDialog.cpp @@ -594,7 +594,7 @@ QString PictureDialog::generatePlayersString() QString plyrsStr; if (plyrsList.length() >= 1) { - foreach (const QString &player, plyrsList) + for (QString player : plyrsList) { QString playerName; if (withDatabase) diff --git a/ProfileInterface.cpp b/ProfileInterface.cpp index 9a398e3..af7058b 100755 --- a/ProfileInterface.cpp +++ b/ProfileInterface.cpp @@ -96,19 +96,19 @@ ProfileInterface::ProfileInterface(ProfileDatabase *profileDB, CrewDatabase *cre ProfileInterface::~ProfileInterface() { - foreach(ProfileWidget *widget, widgets.keys()) + foreach (ProfileWidget *widget, widgets.keys()) { widgets.remove(widget); widget->removeEventFilter(this); widget->disconnect(); delete widget; } - foreach(SavegameData *savegame, savegames) + foreach (SavegameData *savegame, savegames) { savegames.removeAll(savegame); delete savegame; } - foreach(SnapmaticPicture *picture, pictures) + foreach (SnapmaticPicture *picture, pictures) { pictures.removeAll(picture); delete picture; @@ -308,7 +308,7 @@ void ProfileInterface::sortingProfileInterface() QStringList widgetsKeyList = widgets.values(); qSort(widgetsKeyList.begin(), widgetsKeyList.end()); - foreach(QString widgetKey, widgetsKeyList) + for (QString widgetKey : widgetsKeyList) { ProfileWidget *widget = widgets.key(widgetKey); if (widget->getWidgetType() == "SnapmaticWidget") @@ -413,7 +413,7 @@ fileDialogPreOpen: //Work? // Getting readable Image formats QString imageFormatsStr = " "; - foreach(const QByteArray &imageFormat, QImageReader::supportedImageFormats()) + for (QByteArray imageFormat : QImageReader::supportedImageFormats()) { imageFormatsStr += QString("*.") % QString::fromUtf8(imageFormat).toLower() % " "; } @@ -486,7 +486,7 @@ void ProfileInterface::importFilesProgress(QStringList selectedFiles) QTime t; t.start(); - foreach(const QString &selectedFile, selectedFiles) + for (QString selectedFile : selectedFiles) { pbDialog.setValue(overallId); pbDialog.setLabelText(tr("Import file %1 of %2 files").arg(QString::number(overallId), QString::number(maximumId))); @@ -497,7 +497,7 @@ void ProfileInterface::importFilesProgress(QStringList selectedFiles) overallId++; } pbDialog.close(); - foreach (const QString &curErrorStr, failedFiles) + for (QString curErrorStr : failedFiles) { errorStr += ", " % curErrorStr; } @@ -820,7 +820,7 @@ void ProfileInterface::profileWidgetSelected() { if (selectedWidgts == 0) { - foreach(ProfileWidget *widget, widgets.keys()) + foreach (ProfileWidget *widget, widgets.keys()) { widget->setSelectionMode(true); } @@ -833,7 +833,7 @@ void ProfileInterface::profileWidgetDeselected() if (selectedWidgts == 1) { int scrollBarValue = ui->saProfile->verticalScrollBar()->value(); - foreach(ProfileWidget *widget, widgets.keys()) + foreach (ProfileWidget *widget, widgets.keys()) { if (contentMode != 2) { @@ -847,7 +847,7 @@ void ProfileInterface::profileWidgetDeselected() void ProfileInterface::selectAllWidgets() { - foreach(ProfileWidget *widget, widgets.keys()) + foreach (ProfileWidget *widget, widgets.keys()) { widget->setSelected(true); } @@ -855,7 +855,7 @@ void ProfileInterface::selectAllWidgets() void ProfileInterface::deselectAllWidgets() { - foreach(ProfileWidget *widget, widgets.keys()) + foreach (ProfileWidget *widget, widgets.keys()) { widget->setSelected(false); } @@ -985,7 +985,7 @@ void ProfileInterface::exportSelected() errorList << getFailedCopyPictures; errorList << getFailedSavegames; - foreach (const QString &curErrorStr, errorList) + for (QString curErrorStr : errorList) { errorStr += ", " % curErrorStr; } @@ -1069,7 +1069,7 @@ void ProfileInterface::settingsApplied(int _contentMode, bool languageChanged) contentMode = _contentMode; if (contentMode == 2) { - foreach(ProfileWidget *widget, widgets.keys()) + foreach (ProfileWidget *widget, widgets.keys()) { widget->setSelectionMode(true); widget->setContentMode(contentMode); @@ -1078,7 +1078,7 @@ void ProfileInterface::settingsApplied(int _contentMode, bool languageChanged) } else { - foreach(ProfileWidget *widget, widgets.keys()) + foreach (ProfileWidget *widget, widgets.keys()) { if (selectedWidgts == 0) { @@ -1217,9 +1217,8 @@ void ProfileInterface::on_saProfileContent_dropped(const QMimeData *mimeData) { if (!mimeData) return; QStringList pathList; - QList urlList = mimeData->urls(); - foreach(const QUrl ¤tUrl, urlList) + for (QUrl currentUrl : mimeData->urls()) { if (currentUrl.isLocalFile()) { @@ -1287,7 +1286,7 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event) if ((watched->objectName() == "SavegameWidget" || watched->objectName() == "SnapmaticWidget") && isProfileLoaded) { ProfileWidget *pWidget = nullptr; - foreach(ProfileWidget *widget, widgets.keys()) + foreach (ProfileWidget *widget, widgets.keys()) { QPoint mousePos = widget->mapFromGlobal(QCursor::pos()); if (widget->rect().contains(mousePos)) @@ -1356,7 +1355,7 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event) void ProfileInterface::hoverProfileWidgetCheck() { ProfileWidget *pWidget = nullptr; - foreach(ProfileWidget *widget, widgets.keys()) + foreach (ProfileWidget *widget, widgets.keys()) { if (widget->underMouse()) { @@ -1424,7 +1423,7 @@ void ProfileInterface::updatePalette() bool ProfileInterface::isSupportedImageFile(QString selectedFileName) { - foreach(const QByteArray &imageFormat, QImageReader::supportedImageFormats()) + for (QByteArray imageFormat : QImageReader::supportedImageFormats()) { QString imageFormatStr = QString(".") % QString::fromUtf8(imageFormat).toLower(); if (selectedFileName.length() >= imageFormatStr.length() && selectedFileName.toLower().right(imageFormatStr.length()) == imageFormatStr) diff --git a/ProfileLoader.cpp b/ProfileLoader.cpp index d5349ea..ec7b28a 100755 --- a/ProfileLoader.cpp +++ b/ProfileLoader.cpp @@ -50,7 +50,7 @@ void ProfileLoader::run() SavegameFiles.removeDuplicates(); SnapmaticPics.removeDuplicates(); - foreach(const QString &BackupFile, BackupFiles) + for (QString BackupFile : BackupFiles) { SavegameFiles.removeAll(BackupFile); SnapmaticPics.removeAll(BackupFile); @@ -60,7 +60,7 @@ void ProfileLoader::run() // Loading pictures and savegames emit loadingProgress(curFile, maximumV); - foreach(const QString &SavegameFile, SavegameFiles) + for (QString SavegameFile : SavegameFiles) { emit loadingProgress(curFile, maximumV); QString sgdPath = profileFolder % "/" % SavegameFile; @@ -71,7 +71,7 @@ void ProfileLoader::run() } curFile++; } - foreach(const QString &SnapmaticPic, SnapmaticPics) + for (QString SnapmaticPic : SnapmaticPics) { emit loadingProgress(curFile, maximumV); QString picturePath = profileFolder % "/" % SnapmaticPic; @@ -90,7 +90,7 @@ void ProfileLoader::run() // adding found crews crewDB->setAddingCrews(true); - foreach(int crewID, crewList) + for (int crewID : crewList) { crewDB->addCrew(crewID); } diff --git a/SnapmaticEditor.cpp b/SnapmaticEditor.cpp index 7cdbcfa..619e855 100644 --- a/SnapmaticEditor.cpp +++ b/SnapmaticEditor.cpp @@ -309,7 +309,7 @@ void SnapmaticEditor::on_labCrew_linkActivated(const QString &link) crewList += QLatin1String("0"); } crewList.sort(); - foreach(const QString &crew, crewList) + for (QString crew : crewList) { itemList += QString("%1 (%2)").arg(crew, returnCrewName(crew.toInt())); } @@ -322,7 +322,7 @@ void SnapmaticEditor::on_labCrew_linkActivated(const QString &link) { if (newCrew.contains(" ")) newCrew = newCrew.split(" ").at(0); if (newCrew.length() > 10) return; - foreach (const QChar &crewChar, newCrew) + for (QChar crewChar : newCrew) { if (!crewChar.isNumber()) { diff --git a/SnapmaticPicture.cpp b/SnapmaticPicture.cpp index 7fa186a..e1ca220 100755 --- a/SnapmaticPicture.cpp +++ b/SnapmaticPicture.cpp @@ -1137,7 +1137,7 @@ bool SnapmaticPicture::verifyTitle(const QString &title) // VERIFY TITLE FOR BE A VALID SNAPMATIC TITLE if (title.length() <= titlStreamCharacterMax) { - foreach(const QChar &titleChar, title) + for (QChar titleChar : title) { if (!verifyTitleChar(titleChar)) return false; } diff --git a/TranslationClass.cpp b/TranslationClass.cpp index e3b8e8f..fcb00d7 100644 --- a/TranslationClass.cpp +++ b/TranslationClass.cpp @@ -279,7 +279,7 @@ QStringList TranslationClass::listTranslations(const QString &langPath) langDir.setNameFilters(QStringList("gta5sync_*.qm")); langDir.setPath(langPath); QStringList availableLanguages; - foreach(const QString &lang, langDir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::NoSort)) + for (QString &lang : langDir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::NoSort)) { availableLanguages << QString(lang).remove("gta5sync_").remove(".qm"); } @@ -292,7 +292,7 @@ bool TranslationClass::loadSystemTranslation_p(const QString &langPath, QTransla qDebug() << "loadSystemTranslation_p"; #endif int currentLangCounter = 0; - foreach(const QString &languageName, QLocale::system().uiLanguages()) + for (QString languageName : QLocale::system().uiLanguages()) { #ifdef GTA5SYNC_DEBUG qDebug() << "loadLanguage" << languageName; diff --git a/UserInterface.cpp b/UserInterface.cpp index ded69dd..41dc44a 100755 --- a/UserInterface.cpp +++ b/UserInterface.cpp @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -158,7 +157,7 @@ void UserInterface::setupDirEnv() void UserInterface::setupProfileUi() { qreal screenRatio = AppEnv::screenRatio(); - if (GTAV_Profiles.length() == 0) + if (GTAV_Profiles.isEmpty()) { QPushButton *changeDirBtn = new QPushButton(tr("Select >A V Folder..."), ui->swSelection); changeDirBtn->setObjectName("cmdChangeDir"); @@ -169,7 +168,7 @@ void UserInterface::setupProfileUi() QObject::connect(changeDirBtn, SIGNAL(clicked(bool)), this, SLOT(changeFolder_clicked())); } - else foreach(const QString >AV_Profile, GTAV_Profiles) + else for (QString GTAV_Profile : GTAV_Profiles) { QPushButton *profileBtn = new QPushButton(GTAV_Profile, ui->swSelection); profileBtn->setObjectName(GTAV_Profile); @@ -190,7 +189,7 @@ void UserInterface::changeFolder_clicked() void UserInterface::on_cmdReload_clicked() { - foreach(QPushButton *profileBtn, profileBtns) + foreach (QPushButton *profileBtn, profileBtns) { ui->vlButtons->removeWidget(profileBtn); profileBtns.removeAll(profileBtn); diff --git a/config.h b/config.h index b68e57c..a7b1b70 100755 --- a/config.h +++ b/config.h @@ -50,7 +50,7 @@ #ifndef GTA5SYNC_APPVER #ifndef GTA5SYNC_DAILYB -#define GTA5SYNC_APPVER "1.5.0-dev1" +#define GTA5SYNC_APPVER "1.5.0-dev2" #else #define GTA5SYNC_APPVER GTA5SYNC_DAILYB #endif diff --git a/main.cpp b/main.cpp index 8ba3e9b..918d281 100755 --- a/main.cpp +++ b/main.cpp @@ -50,6 +50,7 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); a.setApplicationName(GTA5SYNC_APPSTR); a.setApplicationVersion(GTA5SYNC_APPVER); + a.setQuitOnLastWindowClosed(false); #ifdef GTA5SYNC_WIN #if QT_VERSION >= 0x050400 @@ -87,7 +88,7 @@ int main(int argc, char *argv[]) QString arg1; applicationArgs.removeAt(0); - foreach(QString currentArg, applicationArgs) + for (QString currentArg : applicationArgs) { QString reworkedArg; if (currentArg.left(9) == "-showpic=" && selectedAction == "") @@ -182,10 +183,9 @@ int main(int argc, char *argv[]) ProfileDatabase profileDB; DatabaseThread threadDB(&crewDB); - QEventLoop threadLoop; QObject::connect(&threadDB, SIGNAL(crewNameFound(int,QString)), &crewDB, SLOT(setCrewName(int, QString))); QObject::connect(&threadDB, SIGNAL(playerNameFound(int, QString)), &profileDB, SLOT(setPlayerName(int, QString))); - QObject::connect(&threadDB, SIGNAL(finished()), &threadLoop, SLOT(quit())); + QObject::connect(&threadDB, SIGNAL(finished()), &a, SLOT(quit())); threadDB.start(); UserInterface uiWindow(&profileDB, &crewDB, &threadDB); @@ -197,7 +197,7 @@ int main(int argc, char *argv[]) uiWindow.show(); #endif - threadLoop.exec(); + a.exec(); return 0; } diff --git a/res/app.rc b/res/app.rc index d609442..43bfa7a 100755 --- a/res/app.rc +++ b/res/app.rc @@ -25,12 +25,12 @@ BEGIN BEGIN VALUE "CompanyName", "Syping" VALUE "FileDescription", "gta5view\0" - VALUE "FileVersion", "1.5.0-dev1\0" + VALUE "FileVersion", "1.5.0-dev2\0" VALUE "InternalName", "gta5view\0" VALUE "LegalCopyright", "Copyright 2016-2017 Syping\0" VALUE "OriginalFilename", "gta5view.exe\0" VALUE "ProductName", "gta5view\0" - VALUE "ProductVersion", "1.5.0-dev1\0" + VALUE "ProductVersion", "1.5.0-dev2\0" END END END diff --git a/res/gta5sync_de.ts b/res/gta5sync_de.ts index 3f3a4ae..c55f317 100755 --- a/res/gta5sync_de.ts +++ b/res/gta5sync_de.ts @@ -673,7 +673,7 @@ Wenn du es als Avatar verwenden möchtest wird es abgetrennt! %1 (%2 wenn verfügbar) - + %1 %1 %1 @@ -687,19 +687,19 @@ Wenn du es als Avatar verwenden möchtest wird es abgetrennt! Der eigene Ordner initialisiert sobald du %1 neugestartet hast. - + %1 (Next Closest Language) First language a person can talk with a different person/application. "Native" or "Not Native". %1 (Erste näheste Sprache) - + System System in context of System default System - + The new Custom Folder will initialise after you restart %1. Der eigene Ordner wird initialisiert sobald du %1 neugestartet hast. @@ -708,15 +708,15 @@ Wenn du es als Avatar verwenden möchtest wird es abgetrennt! Die Änderung der Sprache nimmt Effekt sobald du %1 neugestartet hast. - + No Profile No Profile, as default Kein Profil - + + - Profile: %1 Profil: %1 @@ -1214,13 +1214,13 @@ Drücke A für Standardansicht - + Savegames files (SGTA*) Spielstanddateien (SGTA*) - + Snapmatic pictures (PGTA*) Snapmatic Bilder (PGTA*) @@ -1240,7 +1240,7 @@ Drücke A für Standardansicht - + All files (**) Alle Dateien (**) @@ -1261,13 +1261,13 @@ Drücke A für Standardansicht - + Failed to read Snapmatic picture Fehler beim Lesen vom Snapmatic Bild - + Failed to read Savegame file Fehler beim Lesen von Spielstanddatei @@ -1308,7 +1308,7 @@ Drücke A für Standardansicht - + No valid file is selected Keine gültige Datei wurde ausgewählt @@ -1475,13 +1475,13 @@ Exportieren als: Exportiere Datei %1 von %2 Dateien - + All profile files (*.g5e SGTA* PGTA*) Alle Profildateien (*.g5e SGTA* PGTA*) - + GTA V Export (*.g5e) GTA V Export (*.g5e) @@ -1489,12 +1489,12 @@ Exportieren als: QApplication - + Font Schrift - + Selected Font: %1 Ausgewähle Schrift: %1 @@ -2305,7 +2305,7 @@ Exportieren als: - + Select &GTA V Folder... Wähle &GTA V Ordner... @@ -2408,17 +2408,17 @@ Exportieren als: GTA V Ordner nicht gefunden! - - - + + + Select Profile Profil auswählen - - - + + + Select GTA V Folder... Wähle GTA V Ordner... @@ -2427,7 +2427,7 @@ Exportieren als: Wähle GTA V &Ordner... - + Open File... Datei öffnen... @@ -2437,27 +2437,27 @@ Exportieren als: - + %2 - %1 %2 - %1 - - + + &About %1 &Über %1 - - - - + + + + Open File Datei öffnen - + Can't open %1 because of not valid file format Kann nicht %1 öffnen weil Dateiformat nicht gültig ist diff --git a/res/gta5sync_en_US.ts b/res/gta5sync_en_US.ts index b706409..be65ee6 100644 --- a/res/gta5sync_en_US.ts +++ b/res/gta5sync_en_US.ts @@ -432,38 +432,38 @@ When you want to use it as Avatar the image will be detached! - + %1 (Next Closest Language) First language a person can talk with a different person/application. "Native" or "Not Native". - + System System in context of System default - + %1 %1 - + The new Custom Folder will initialise after you restart %1. The new Custom Folder will initialize after you restart %1. - + No Profile No Profile, as default - + + - Profile: %1 @@ -756,19 +756,19 @@ Press 1 for Default View - + GTA V Export (*.g5e) - + Savegames files (SGTA*) - + Snapmatic pictures (PGTA*) @@ -779,14 +779,14 @@ Press 1 for Default View - + All files (**) - + No valid file is selected @@ -805,13 +805,13 @@ Press 1 for Default View - + Failed to read Snapmatic picture - + Failed to read Savegame file @@ -922,7 +922,7 @@ Press 1 for Default View - + All profile files (*.g5e SGTA* PGTA*) @@ -930,12 +930,12 @@ Press 1 for Default View QApplication - + Font - + Selected Font: %1 @@ -1396,7 +1396,7 @@ Press 1 for Default View UserInterface - + %2 - %1 @@ -1458,8 +1458,8 @@ Press 1 for Default View - - + + &About %1 @@ -1565,15 +1565,15 @@ Press 1 for Default View - + Select &GTA V Folder... - - - + + + Select GTA V Folder... @@ -1603,27 +1603,27 @@ Press 1 for Default View - - - + + + Select Profile - + Open File... - - - - + + + + Open File - + Can't open %1 because of not valid file format diff --git a/res/gta5sync_fr.ts b/res/gta5sync_fr.ts index f535aa3..f83a274 100644 --- a/res/gta5sync_fr.ts +++ b/res/gta5sync_fr.ts @@ -567,25 +567,25 @@ When you want to use it as Avatar the image will be detached! Système - + %1 (Next Closest Language) First language a person can talk with a different person/application. "Native" or "Not Native". - + System System in context of System default Système - + %1 %1 %1 - + The new Custom Folder will initialise after you restart %1. @@ -598,15 +598,15 @@ When you want to use it as Avatar the image will be detached! Le changement de langue sera actif au prochain lancement de %1. - + No Profile No Profile, as default Aucun profil - + + - Profile: %1 Profil : %1 @@ -976,13 +976,13 @@ Appuyer sur 1 pour le mode par défaut - + Savegames files (SGTA*) Fichiers de sauvegarde GTA (SGTA*) - + Snapmatic pictures (PGTA*) Photos Snapmatic (PGTA*) @@ -993,7 +993,7 @@ Appuyer sur 1 pour le mode par défaut - + All files (**) Tous les fichiers (**) @@ -1015,7 +1015,7 @@ Appuyer sur 1 pour le mode par défaut - + No valid file is selected Fichier invalide @@ -1026,13 +1026,13 @@ Appuyer sur 1 pour le mode par défaut - + Failed to read Snapmatic picture Impossible d'ouvrir la photo Snapmatic - + Failed to read Savegame file Impossible de lire le fichier de sauvegarde @@ -1165,13 +1165,13 @@ Appuyer sur 1 pour le mode par défaut Impossible de supprimer la sélection - + All profile files (*.g5e SGTA* PGTA*) Tous les fichiers de profil (*.g5e SGTA* PGTA*) - + GTA V Export (*.g5e) GTA V Export (*.g5e) @@ -1179,12 +1179,12 @@ Appuyer sur 1 pour le mode par défaut QApplication - + Font Police - + Selected Font: %1 Police sélectionnée : %1 @@ -1824,15 +1824,15 @@ Appuyer sur 1 pour le mode par défaut - + Select &GTA V Folder... Modifier l'emplacement de &GTA V... - - - + + + Select GTA V Folder... Modifier l'emplacement de GTA V... @@ -1868,39 +1868,39 @@ Appuyer sur 1 pour le mode par défaut - + %2 - %1 %2 - %1 - - + + &About %1 &À propos de %1 - - - + + + Select Profile Sélectionner un profil - + Open File... Ouvrir... - - - - + + + + Open File Ouvrir - + Can't open %1 because of not valid file format Impossible d'ouvrir %1, format invalide diff --git a/res/gta5sync_ru.qm b/res/gta5sync_ru.qm index dfb9929824d2f51ea76a36df84785760ae874696..ff96a180195b84d39143a4aaa5634c3c375e8e55 100644 GIT binary patch delta 325 zcmWO0Pbh-{7{~GFdEa+?y?bk=NIPu1nAIyyD=v#sSk&4<*+G(nmOtCrCMVohta-Pd zCXy3QJ2>npBqX7ca8eY9g?3;qrFbsC&*gXcZvNulFJ@B0teQ;+EH==J62RmjXg3b_ z3$%|`fT_l8#fi&g#d$oZ90qZTK6!QO6oY?ZxZ ze*k7=_K)>Qc^%j&i|jTlvX2xNLl~!f(T6W&mF$?L4#|u4v>^4FrcLtBafEyJ=~_C% zVM-eUctKAFyP_%Ohh2cg7#WPd+N8-}>IWFQH3iFNfVi7Rj9y%)Eu)S-)FL-1&8iNs z9JWDz*=2cF55sT#TT@RvO91UFYB8}05WA$D?Bs+4c@(<})|xuR_kvp)m=JByL|0}< IArnif|0tPi@Bjb+ delta 323 zcmWO0F-QV&6vy%R&i{Gc9YjGS4k`_GAcfMB>ej$t699`L@Za^b zFW~ %1 (%2 если имеется) - + %1 (Next Closest Language) First language a person can talk with a different person/application. "Native" or "Not Native". - + System System in context of System default Система - + %1 %1 %1 - + The new Custom Folder will initialise after you restart %1. Другая папка будет загружена после перезапуска %1. @@ -562,15 +562,15 @@ When you want to use it as Avatar the image will be detached! Язык изменится после перезапуска %1. - + No Profile No Profile, as default Нет профиля - + + - Profile: %1 Профиль: %1 @@ -950,19 +950,19 @@ Press 1 for Default View - + Savegames files (SGTA*) Файлы сохранения (SGTA*) - + Snapmatic pictures (PGTA*) Картинка Snapmatic (PGTA*) - + All files (**) Все файлы (**) @@ -983,13 +983,13 @@ Press 1 for Default View - + Failed to read Snapmatic picture Не удалось загрузить картинку Snapmatic - + Failed to read Savegame file Не удалось загрузить файл сохранения @@ -1000,7 +1000,7 @@ Press 1 for Default View - + No valid file is selected Выбранный файл неверен @@ -1163,13 +1163,13 @@ Press 1 for Default View Экспортируется файл %1 из %2 - + All profile files (*.g5e SGTA* PGTA*) Все файлы профиля (*.g5e SGTA* PGTA*) - + GTA V Export (*.g5e) GTA V Export (*.g5e) @@ -1177,12 +1177,12 @@ Press 1 for Default View QApplication - + Font Шрифт - + Selected Font: %1 Выбранный шрифт: %1 @@ -1770,7 +1770,7 @@ Press 1 for Default View - + Select &GTA V Folder... Выбрать &папку GTA V... @@ -1886,48 +1886,48 @@ Press 1 for Default View Ctrl+D - - - + + + Select Profile Выбор профиля - - - + + + Select GTA V Folder... Выбрать папку GTA V... - + %2 - %1 %2 - %1 - - + + &About %1 - &О %1 + &О программе %1 - + Open File... Открыть файл... - - - - + + + + Open File Открыть файл - + Can't open %1 because of not valid file format Не удалось открыть %1 из-за неверного формата файла