Browse Source

SnapmaticPicture now stay alone, gta5sync references reduced

1.6.x
Syping 3 years ago
parent
commit
fdf07dd681
  1. 2
      .travis/gta5view.nsi
  2. 6
      AboutDialog.cpp
  3. 2
      AboutDialog.h
  4. 2
      AppEnv.cpp
  5. 2
      AppEnv.h
  6. 2
      CrewDatabase.cpp
  7. 2
      CrewDatabase.h
  8. 2
      DatabaseThread.cpp
  9. 2
      DatabaseThread.h
  10. 2
      ExportDialog.cpp
  11. 2
      ExportDialog.h
  12. 2
      ExportThread.cpp
  13. 2
      ExportThread.h
  14. 2
      GlobalString.cpp
  15. 2
      GlobalString.h
  16. 2
      IconLoader.cpp
  17. 2
      IconLoader.h
  18. 2
      ImageEditorDialog.cpp
  19. 2
      ImageEditorDialog.h
  20. 2
      ImportDialog.cpp
  21. 2
      ImportDialog.h
  22. 2
      JsonEditorDialog.cpp
  23. 2
      JsonEditorDialog.h
  24. 2
      MapLocationDialog.cpp
  25. 2
      MapLocationDialog.h
  26. 6
      OptionsDialog.cpp
  27. 2
      OptionsDialog.h
  28. 22
      OptionsDialog.ui
  29. 2
      PictureDialog.cpp
  30. 2
      PictureDialog.h
  31. 2
      PictureExport.cpp
  32. 2
      PictureExport.h
  33. 2
      PictureWidget.cpp
  34. 2
      PictureWidget.h
  35. 2
      PlayerListDialog.cpp
  36. 2
      PlayerListDialog.h
  37. 2
      ProfileDatabase.cpp
  38. 2
      ProfileDatabase.h
  39. 2
      ProfileInterface.cpp
  40. 2
      ProfileInterface.h
  41. 2
      ProfileLoader.cpp
  42. 2
      ProfileLoader.h
  43. 2
      ProfileWidget.cpp
  44. 2
      ProfileWidget.h
  45. 2
      SavegameCopy.cpp
  46. 2
      SavegameCopy.h
  47. 9
      SavegameData.cpp
  48. 2
      SavegameData.h
  49. 2
      SavegameDialog.cpp
  50. 2
      SavegameDialog.h
  51. 2
      SavegameWidget.cpp
  52. 2
      SavegameWidget.h
  53. 2
      SidebarGenerator.cpp
  54. 2
      SidebarGenerator.h
  55. 2
      SnapmaticEditor.cpp
  56. 2
      SnapmaticEditor.h
  57. 76
      SnapmaticPicture.cpp
  58. 9
      SnapmaticPicture.h
  59. 2
      SnapmaticWidget.cpp
  60. 2
      SnapmaticWidget.h
  61. 2
      StandardPaths.cpp
  62. 2
      StandardPaths.h
  63. 22
      StringParser.cpp
  64. 5
      StringParser.h
  65. 2
      TelemetryClass.cpp
  66. 2
      TelemetryClass.h
  67. 2
      TranslationClass.cpp
  68. 2
      TranslationClass.h
  69. 2
      UserInterface.cpp
  70. 2
      UserInterface.h
  71. 2
      anpro/JSHighlighter.cpp
  72. 2
      anpro/JSHighlighter.h
  73. 12
      config.h
  74. 3
      gta5view.pro
  75. 2
      main.cpp
  76. 2
      qjson4/QJsonArray.cpp
  77. 2
      qjson4/QJsonArray.h
  78. 2
      qjson4/QJsonDocument.cpp
  79. 2
      qjson4/QJsonDocument.h
  80. 2
      qjson4/QJsonObject.cpp
  81. 2
      qjson4/QJsonObject.h
  82. 2
      qjson4/QJsonParseError.cpp
  83. 2
      qjson4/QJsonParseError.h
  84. 2
      qjson4/QJsonParser.cpp
  85. 2
      qjson4/QJsonParser.h
  86. 2
      qjson4/QJsonRoot.h
  87. 2
      qjson4/QJsonValue.cpp
  88. 2
      qjson4/QJsonValue.h
  89. 2
      qjson4/QJsonValueRef.cpp
  90. 2
      qjson4/QJsonValueRef.h
  91. 8
      res/app.rc
  92. 2
      tmext/TelemetryClassAuthenticator.cpp
  93. 2
      tmext/TelemetryClassAuthenticator.h
  94. 2
      uimod/UiModLabel.cpp
  95. 2
      uimod/UiModLabel.h
  96. 2
      uimod/UiModWidget.cpp
  97. 2
      uimod/UiModWidget.h

2
.travis/gta5view.nsi

@ -3,7 +3,7 @@
!define APP_NAME "gta5view"
!define COMP_NAME "Syping"
!define WEB_SITE "https://gta5view.syping.de/"
!define VERSION "1.5.4.0"
!define VERSION "1.6.0.0"
!define COPYRIGHT "Copyright © 2016-2018 Syping"
!define DESCRIPTION "Grand Theft Auto V Savegame and Snapmatic Viewer/Editor"
!define INSTALLER_NAME "gta5view_setup.exe"

6
AboutDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -65,11 +65,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
}
// Project Description
#ifdef GTA5SYNC_ENABLED
QString projectDes = tr("A project for viewing and sync Grand Theft Auto V Snapmatic<br/>\nPictures and Savegames");
#else
QString projectDes = tr("A project for viewing Grand Theft Auto V Snapmatic<br/>\nPictures and Savegames");
#endif
// Copyright Description
QString copyrightDes1 = tr("Copyright &copy; <a href=\"%1\">%2</a> %3");

2
AboutDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
AppEnv.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
AppEnv.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
CrewDatabase.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
CrewDatabase.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
DatabaseThread.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
DatabaseThread.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ExportDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ExportDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ExportThread.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ExportThread.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
GlobalString.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
GlobalString.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
IconLoader.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
IconLoader.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ImageEditorDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ImageEditorDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ImportDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ImportDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
JsonEditorDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
JsonEditorDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
MapLocationDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
MapLocationDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping
*
* This program is free software: you can redistribute it and/or modify

6
OptionsDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -109,10 +109,6 @@ OptionsDialog::OptionsDialog(ProfileDatabase *profileDB, QWidget *parent) :
resize(435 * screenRatio, 405 * screenRatio);
#endif
#ifdef GTA5SYNC_DISABLED
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabSync));
#endif
this->setWindowTitle(windowTitle().arg(GTA5SYNC_APPSTR));
}

2
OptionsDialog.h

@ -1,5 +1,5 @@
/******************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

22
OptionsDialog.ui

@ -20,7 +20,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabProfile">
<attribute name="title">
@ -683,26 +683,6 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tabSync">
<attribute name="title">
<string>Sync</string>
</attribute>
<layout class="QVBoxLayout" name="vlSync">
<item>
<widget class="QLabel" name="labSync">
<property name="text">
<string>Sync is not implemented at current time</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>

2
PictureDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PictureDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PictureExport.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PictureExport.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PictureWidget.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PictureWidget.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PlayerListDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PlayerListDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileDatabase.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileDatabase.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileInterface.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileInterface.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileLoader.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileLoader.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileWidget.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileWidget.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SavegameCopy.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SavegameCopy.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

9
SavegameData.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
#include "SnapmaticPicture.h"
#include "StringParser.h"
#include "SavegameData.h"
#include <QStringBuilder>
@ -42,7 +43,7 @@ bool SavegameData::readingSavegame()
QFile *saveFile = new QFile(savegameFileName);
if (!saveFile->open(QFile::ReadOnly))
{
lastStep = "1;/1,OpenFile," % StringParser::convertDrawStringForLog(savegameFileName);
lastStep = "1;/1,OpenFile," % SnapmaticPicture::convertDrawStringForLog(savegameFileName);
saveFile->deleteLater();
delete saveFile;
return false;
@ -51,7 +52,7 @@ bool SavegameData::readingSavegame()
// Reading Savegame Header
if (!saveFile->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(savegameFileName) % ",1,NOHEADER";
lastStep = "2;/3,ReadingFile," % SnapmaticPicture::convertDrawStringForLog(savegameFileName) % ",1,NOHEADER";
saveFile->close();
saveFile->deleteLater();
delete saveFile;
@ -78,7 +79,7 @@ QString SavegameData::getSavegameDataString(const QByteArray &savegameHeader)
QList<QByteArray> savegameBytesList = savegameBytes.split(char(0x01));
savegameBytes = savegameBytesList.at(1);
savegameBytesList.clear();
return StringParser::parseTitleString(savegameBytes, savegameBytes.length());
return SnapmaticPicture::parseTitleString(savegameBytes, savegameBytes.length());
}
bool SavegameData::readingSavegameFromFile(const QString &fileName)

2
SavegameData.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SavegameDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SavegameDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SavegameWidget.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SavegameWidget.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SidebarGenerator.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SidebarGenerator.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SnapmaticEditor.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SnapmaticEditor.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

76
SnapmaticPicture.cpp

@ -1,6 +1,6 @@
/*****************************************************************************
* gta5sync-spv Grand Theft Auto Snapmatic Picture Viewer
* Copyright (C) 2016-2017 Syping
* gta5spv Grand Theft Auto Snapmatic Picture Viewer
* Copyright (C) 2016-2018 Syping
*
* 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
@ -17,12 +17,12 @@
*****************************************************************************/
#include "SnapmaticPicture.h"
#include "StringParser.h"
#include <QStringBuilder>
#include <QJsonDocument>
#include <QJsonObject>
#include <QStringList>
#include <QVariantMap>
#include <QTextCodec>
#include <QJsonArray>
#include <QFileInfo>
#include <QPainter>
@ -101,7 +101,7 @@ void SnapmaticPicture::reset()
jsonStr = QString();
// SNAPMATIC DEFAULTS
#ifdef GTA5SYNC_CSDF
#ifdef GTA5SYNC_NOASSIST
careSnapDefault = false;
#else
careSnapDefault = true;
@ -121,7 +121,7 @@ bool SnapmaticPicture::preloadFile()
if (!picFile->open(QFile::ReadOnly))
{
lastStep = "1;/1,OpenFile," % StringParser::convertDrawStringForLog(picFilePath);
lastStep = "1;/1,OpenFile," % convertDrawStringForLog(picFilePath);
delete picFile;
return false;
}
@ -191,31 +191,31 @@ bool SnapmaticPicture::preloadFile()
}
else
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",4,G5E_FORMATERROR";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",4,G5E_FORMATERROR";
return false;
}
}
else
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",3,G5E_FORMATERROR";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",3,G5E_FORMATERROR";
return false;
}
}
else
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",2,G5E_FORMATERROR";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",2,G5E_FORMATERROR";
return false;
}
}
else
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",1,G5E_NOTCOMPATIBLE";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",1,G5E_NOTCOMPATIBLE";
return false;
}
}
else
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",1,G5E_FORMATERROR";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",1,G5E_FORMATERROR";
return false;
}
}
@ -244,7 +244,7 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
// Reading Snapmatic Header
if (!picStream->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",1,NOHEADER";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",1,NOHEADER";
picStream->close();
delete picStream;
return false;
@ -253,7 +253,7 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
pictureHead = getSnapmaticHeaderString(snapmaticHeaderLine);
if (pictureHead == QLatin1String("MALFORMED"))
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",1,MALFORMEDHEADER";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",1,MALFORMEDHEADER";
picStream->close();
delete picStream;
return false;
@ -262,7 +262,7 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
// Reading JPEG Header Line
if (!picStream->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",2,NOHEADER";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",2,NOHEADER";
picStream->close();
delete picStream;
return false;
@ -273,7 +273,7 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
jpegHeaderLine.remove(0, jpegHeaderLineDifStr);
if (jpegHeaderLine.left(4) != QByteArray("JPEG"))
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",2,NOJPEG";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",2,NOJPEG";
picStream->close();
delete picStream;
return false;
@ -282,7 +282,7 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
// Read JPEG Stream
if (!picStream->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",2,NOPIC";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",2,NOPIC";
picStream->close();
delete picStream;
return false;
@ -336,14 +336,14 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
// Read JSON Stream
if (!picStream->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",3,NOJSON";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",3,NOJSON";
picStream->close();
delete picStream;
return false;
}
else if (picStream->read(4) != QByteArray("JSON"))
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",3,CTJSON";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",3,CTJSON";
picStream->close();
delete picStream;
return false;
@ -354,14 +354,14 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
if (!picStream->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",4,NOTITL";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",4,NOTITL";
picStream->close();
delete picStream;
return false;
}
else if (picStream->read(4) != QByteArray("TITL"))
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",4,CTTITL";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",4,CTTITL";
picStream->close();
delete picStream;
return false;
@ -371,14 +371,14 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
if (!picStream->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",5,NODESC";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",5,NODESC";
picStream->close();
delete picStream;
return picOk;
}
else if (picStream->read(4) != QByteArray("DESC"))
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",5,CTDESC";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",5,CTDESC";
picStream->close();
delete picStream;
return false;
@ -403,7 +403,7 @@ QString SnapmaticPicture::getSnapmaticHeaderString(const QByteArray &snapmaticHe
QList<QByteArray> snapmaticBytesList = snapmaticHeader.left(snapmaticUsefulLength).split('\x01');
if (snapmaticBytesList.length() < 2) { return QLatin1String("MALFORMED"); }
QByteArray snapmaticBytes = snapmaticBytesList.at(1);
return StringParser::parseTitleString(snapmaticBytes, snapmaticBytes.length());
return parseTitleString(snapmaticBytes, snapmaticBytes.length());
}
QString SnapmaticPicture::getSnapmaticJSONString(const QByteArray &jsonBytes)
@ -792,7 +792,7 @@ QImage SnapmaticPicture::getImage(bool fastLoad)
QFile *picFile = new QFile(picFilePath);
if (!picFile->open(QFile::ReadOnly))
{
lastStep = "1;/1,OpenFile," % StringParser::convertDrawStringForLog(picFilePath);
lastStep = "1;/1,OpenFile," % convertDrawStringForLog(picFilePath);
delete picFile;
return QImage();
}
@ -1014,15 +1014,15 @@ void SnapmaticPicture::parseJsonContent()
{
if (jsonIncomplete && jsonError)
{
lastStep = "2;/4,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",3,JSONINCOMPLETE,JSONERROR";
lastStep = "2;/4,ReadingFile," % convertDrawStringForLog(picFilePath) % ",3,JSONINCOMPLETE,JSONERROR";
}
else if (jsonIncomplete)
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",3,JSONINCOMPLETE";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",3,JSONINCOMPLETE";
}
else if (jsonError)
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",3,JSONERROR";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",3,JSONERROR";
}
jsonOk = false;
}
@ -1377,7 +1377,7 @@ bool SnapmaticPicture::verifyTitle(const QString &title)
// VERIFY TITLE FOR BE A VALID SNAPMATIC TITLE
if (title.length() <= titlStreamCharacterMax && title.length() > 0)
{
for (QChar titleChar : title)
for (const QChar &titleChar : title)
{
if (!verifyTitleChar(titleChar)) return false;
}
@ -1396,3 +1396,25 @@ bool SnapmaticPicture::verifyTitleChar(const QChar &titleChar)
}
return false;
}
// STRING OPERATIONS
QString SnapmaticPicture::parseTitleString(const QByteArray &commitBytes, int maxLength)
{
Q_UNUSED(maxLength)
QString retStr = QTextCodec::codecForName("UTF-16LE")->toUnicode(commitBytes).trimmed();
retStr.remove(QChar('\x00'));
return retStr;
}
QString SnapmaticPicture::convertDrawStringForLog(const QString &inputStr)
{
QString outputStr = inputStr;
return outputStr.replace("&","&u;").replace(",", "&c;");
}
QString SnapmaticPicture::convertLogStringForDraw(const QString &inputStr)
{
QString outputStr = inputStr;
return outputStr.replace("&c;",",").replace("&u;", "&");
}

9
SnapmaticPicture.h

@ -1,6 +1,6 @@
/*****************************************************************************
* gta5sync-spv Grand Theft Auto Snapmatic Picture Viewer
* Copyright (C) 2016-2017 Syping
* gta5spv Grand Theft Auto Snapmatic Picture Viewer
* Copyright (C) 2016-2018 Syping
*
* 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
@ -134,6 +134,11 @@ public:
// VERIFY CONTENT
static bool verifyTitle(const QString &title);
// STRING OPERATIONS
static QString parseTitleString(const QByteArray &commitBytes, int maxLength);
static QString convertDrawStringForLog(const QString &inputStr);
static QString convertLogStringForDraw(const QString &inputStr);
private:
QString getSnapmaticHeaderString(const QByteArray &snapmaticHeader);
QString getSnapmaticJSONString(const QByteArray &jsonBytes);

2
SnapmaticWidget.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SnapmaticWidget.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
StandardPaths.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
StandardPaths.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

22
StringParser.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -36,26 +36,6 @@ StringParser::StringParser()
}
QString StringParser::parseTitleString(const QByteArray &commitBytes, int maxLength)
{
Q_UNUSED(maxLength)
QString retStr = QTextCodec::codecForName("UTF-16LE")->toUnicode(commitBytes).trimmed();
retStr.remove(QChar('\x00'));
return retStr;
}
QString StringParser::convertDrawStringForLog(const QString &inputStr)
{
QString outputStr = inputStr;
return outputStr.replace("&","&u;").replace(",", "&c;");
}
QString StringParser::convertLogStringForDraw(const QString &inputStr)
{
QString outputStr = inputStr;
return outputStr.replace("&c;",",").replace("&u;", "&");
}
QString StringParser::escapeString(const QString &toEscape)
{
#if QT_VERSION >= 0x050000

5
StringParser.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -26,9 +26,6 @@ class StringParser
{
public:
StringParser();
static QString parseTitleString(const QByteArray &commitBytes, int maxLength);
static QString convertDrawStringForLog(const QString &inputStr);
static QString convertLogStringForDraw(const QString &inputStr);
static QString escapeString(const QString &toEscape);
#ifdef GTA5SYNC_PROJECT
static QString convertBuildedString(const QString &buildedStr);

2
TelemetryClass.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
TelemetryClass.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
TranslationClass.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
TranslationClass.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
UserInterface.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
UserInterface.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
anpro/JSHighlighter.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
anpro/JSHighlighter.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping
*
* This program is free software: you can redistribute it and/or modify

12
config.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -28,17 +28,9 @@
#define GTA5SYNC_APPVENDORLINK "https://github.com/Syping/"
#endif
#ifndef GTA5SYNC_DISABLED
#define GTA5SYNC_ENABLED
#endif
#ifndef GTA5SYNC_APPSTR
#ifdef GTA5SYNC_ENABLED
#define GTA5SYNC_APPSTR "gta5sync"
#else
#define GTA5SYNC_APPSTR "gta5view"
#endif
#endif
#ifndef GTA5SYNC_APPDES
#define GTA5SYNC_APPDES "INSERT YOUR APPLICATION DESCRIPTION HERE"
@ -49,7 +41,7 @@
#endif
#ifndef GTA5SYNC_APPVER
#define GTA5SYNC_APPVER "1.5.4"
#define GTA5SYNC_APPVER "1.6.0"
#endif
#ifdef GTA5SYNC_BUILDTYPE_REL

3
gta5view.pro

@ -154,9 +154,8 @@ INCLUDEPATH += ./anpro ./tmext ./uimod
# GTA5SYNC/GTA5VIEW ONLY
DEFINES += GTA5SYNC_DISABLED
DEFINES += GTA5SYNC_PROJECT # Enable exclusive gta5sync/gta5view functions
DEFINES += GTA5SYNC_CSDF # Not assisting at proper usage of SnapmaticPicture class
DEFINES += GTA5SYNC_NOASSIST # Not assisting at proper usage of SnapmaticPicture class
# WINDOWS ONLY

2
main.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonArray.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonArray.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonDocument.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonDocument.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonObject.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonObject.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonParseError.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonParseError.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonParser.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonParser.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonRoot.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonValue.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonValue.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016 Syping
*
* This program is free software: you can redistribute it and/or modify

2
qjson4/QJsonValueRef.cpp

@ -1,5 +1,5 @@
/*****************************************************************************