Browse Source

Fix resources and Qt4 build

1.9.x
Syping 1 year ago
parent
commit
25ec67ec8b
  1. 6
      CMakeLists.txt
  2. 10
      ImportDialog.cpp
  3. 12
      gta5view.pro
  4. 0
      res/qt4/qt_de.qm
  5. 0
      res/qt4/qt_fr.qm
  6. 0
      res/qt4/qt_ko.qm
  7. 0
      res/qt4/qt_ru.qm
  8. 0
      res/qt4/qt_uk.qm
  9. 0
      res/qt4/qt_zh_TW.qm
  10. 0
      res/qt4/tr_qt.qrc
  11. 0
      res/qt5/qtbase_en_GB.qm
  12. 0
      res/qt5/qtbase_en_GB.ts
  13. 11
      res/qt5/tr_qt.qrc
  14. BIN
      res/qt6/qtbase_en_GB.qm
  15. 65
      res/qt6/qtbase_en_GB.ts
  16. 11
      res/qt6/tr_qt.qrc
  17. 11
      res/tr_qt5.qrc
  18. 11
      res/tr_qt6.qrc

6
CMakeLists.txt

@ -164,7 +164,7 @@ if(Qt5LinguistTools_FOUND)
res/gta5sync_ru.ts
res/gta5sync_uk.ts
res/gta5sync_zh_TW.ts
res/qtbase_en_GB.ts
res/qt5/qtbase_en_GB.ts
)
add_custom_target(translations DEPENDS ${GTA5VIEW_TRANSLATIONS})
else()
@ -176,7 +176,7 @@ else()
res/gta5sync_ru.qm
res/gta5sync_uk.qm
res/gta5sync_zh_TW.qm
res/qtbase_en_GB.qm
res/qt5/qtbase_en_GB.qm
)
endif()
@ -188,7 +188,7 @@ if(QCONF_BUILD)
else()
list(APPEND GTA5VIEW_RESOURCES
res/tr_g5p.qrc
res/tr_qt${QT_VERSION_MAJOR}.qrc
res/qt${QT_VERSION_MAJOR}/tr_qt.qrc
)
endif()

10
ImportDialog.cpp

@ -371,9 +371,13 @@ void ImportDialog::saveSettings(QString settingsProfile)
settings.setValue("SelectedColour", selectedColour);
settings.setValue("BackgroundStretch", ui->cbStretch->isChecked());
settings.setValue("ForceAvatarColour", ui->cbForceAvatarColour->isChecked());
#if QT_VERSION >= 0x050000
const QVariant data = ui->cbResolution->currentData();
#else
const QVariant data = ui->cbResolution->itemData(ui->cbResolution->currentIndex());
#endif
if (data.type() == QVariant::Size) {
settings.setValue("Resolution", ui->cbResolution->currentData());
settings.setValue("Resolution", data);
}
else {
settings.setValue("Resolution", SnapmaticPicture::getSnapmaticResolution());
@ -896,7 +900,11 @@ void ImportDialog::on_cbImportAsIs_toggled(bool checked)
void ImportDialog::on_cbResolution_currentIndexChanged(int index)
{
Q_UNUSED(index)
#if QT_VERSION >= 0x050000
const QVariant data = ui->cbResolution->currentData();
#else
const QVariant data = ui->cbResolution->itemData(ui->cbResolution->currentIndex());
#endif
if (data.type() == QVariant::Size) {
const QSize dataSize = data.toSize();
if (dataSize == SnapmaticPicture::getSnapmaticResolution()) {

12
gta5view.pro

@ -208,12 +208,12 @@ isEqual(QT_MAJOR_VERSION, 4): SOURCES += qjson4/QJsonArray.cpp \
qjson4/QJsonValueRef.cpp \
qjson4/QJsonParser.cpp
isEqual(QT_MAJOR_VERSION, 4): RESOURCES += res/tr_qt4.qrc
isEqual(QT_MAJOR_VERSION, 4): RESOURCES += res/qt4/tr_qt.qrc
isEqual(QT_MAJOR_VERSION, 4): GTA5SYNC_RCC = $$[QT_INSTALL_BINS]/rcc
# QT5 ONLY STUFF
isEqual(QT_MAJOR_VERSION, 5): RESOURCES += res/tr_qt5.qrc
isEqual(QT_MAJOR_VERSION, 5): RESOURCES += res/qt5/tr_qt.qrc
# QT5+ ONLY STUFF
@ -221,7 +221,7 @@ greaterThan(QT_MAJOR_VERSION, 4): GTA5SYNC_RCC = $$[QT_HOST_BINS]/rcc
# QT6 ONLY STUFF
isEqual(QT_MAJOR_VERSION, 6): RESOURCES += res/tr_qt6.qrc
isEqual(QT_MAJOR_VERSION, 6): RESOURCES += res/qt6/tr_qt.qrc
# RESOURCE COMPILATION
@ -245,9 +245,9 @@ INSTALLS += target pixmaps appfiles
# QCONF BASED BUILD STUFF
contains(DEFINES, GTA5SYNC_QCONF) {
isEqual(QT_MAJOR_VERSION, 4): RESOURCES -= res/tr_qt4.qrc
isEqual(QT_MAJOR_VERSION, 5): RESOURCES -= res/tr_qt5.qrc
isEqual(QT_MAJOR_VERSION, 6): RESOURCES -= res/tr_qt6.qrc
isEqual(QT_MAJOR_VERSION, 4): RESOURCES -= res/qt4/tr_qt.qrc
isEqual(QT_MAJOR_VERSION, 5): RESOURCES -= res/qt5/tr_qt.qrc
isEqual(QT_MAJOR_VERSION, 6): RESOURCES -= res/qt6/tr_qt.qrc
!contains(DEFINES, GTA5SYNC_QCONF_IN) {
RESOURCES -= res/tr_g5p.qrc
langfiles.path = $$GTA5SYNC_PREFIX/share/gta5view/translations

0
res/qt_de.qm → res/qt4/qt_de.qm

0
res/qt_fr.qm → res/qt4/qt_fr.qm

0
res/qt_ko.qm → res/qt4/qt_ko.qm

0
res/qt_ru.qm → res/qt4/qt_ru.qm

0
res/qt_uk.qm → res/qt4/qt_uk.qm

0
res/qt_zh_TW.qm → res/qt4/qt_zh_TW.qm

0
res/tr_qt4.qrc → res/qt4/tr_qt.qrc

0
res/qtbase_en_GB.qm → res/qt5/qtbase_en_GB.qm

0
res/qtbase_en_GB.ts → res/qt5/qtbase_en_GB.ts

11
res/qt5/tr_qt.qrc

@ -0,0 +1,11 @@
<RCC>
<qresource prefix="/tr">
<file>qtbase_en_GB.qm</file>
<file>qtbase_de.qm</file>
<file>qtbase_fr.qm</file>
<file>qtbase_ko.qm</file>
<file>qtbase_ru.qm</file>
<file>qtbase_uk.qm</file>
<file>qtbase_zh_TW.qm</file>
</qresource>
</RCC>

BIN
res/qt6/qtbase_en_GB.qm

Binary file not shown.

65
res/qt6/qtbase_en_GB.ts

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="en_GB">
<context>
<name>QColorDialog</name>
<message>
<source>Hu&amp;e:</source>
<translation></translation>
</message>
<message>
<source>&amp;Sat:</source>
<translation></translation>
</message>
<message>
<source>&amp;Val:</source>
<translation></translation>
</message>
<message>
<source>&amp;Red:</source>
<translation></translation>
</message>
<message>
<source>&amp;Green:</source>
<translation></translation>
</message>
<message>
<source>Bl&amp;ue:</source>
<translation></translation>
</message>
<message>
<source>A&amp;lpha channel:</source>
<translation></translation>
</message>
<message>
<source>&amp;HTML:</source>
<translation></translation>
</message>
<message>
<source>Cursor at %1, %2
Press ESC to cancel</source>
<translation>Cursour at %1, %2
Press ESC to cancel</translation>
</message>
<message>
<source>Select Color</source>
<translation>Select Colour</translation>
</message>
<message>
<source>&amp;Basic colors</source>
<translation>&amp;Basic colours</translation>
</message>
<message>
<source>&amp;Custom colors</source>
<translation>&amp;Custom colours</translation>
</message>
<message>
<source>&amp;Add to Custom Colors</source>
<translation>&amp;Add to Custom Colours</translation>
</message>
<message>
<source>&amp;Pick Screen Color</source>
<translation>&amp;Pick Screen Colour</translation>
</message>
</context>
</TS>

11
res/qt6/tr_qt.qrc

@ -0,0 +1,11 @@
<RCC>
<qresource prefix="/tr">
<file>qtbase_en_GB.qm</file>
<file>qtbase_de.qm</file>
<file>qtbase_fr.qm</file>
<file>qtbase_ko.qm</file>
<file>qtbase_ru.qm</file>
<file>qtbase_uk.qm</file>
<file>qtbase_zh_TW.qm</file>
</qresource>
</RCC>

11
res/tr_qt5.qrc

@ -1,11 +0,0 @@
<RCC>
<qresource prefix="/tr">
<file>qtbase_en_GB.qm</file>
<file>qt5/qtbase_de.qm</file>
<file>qt5/qtbase_fr.qm</file>
<file>qt5/qtbase_ko.qm</file>
<file>qt5/qtbase_ru.qm</file>
<file>qt5/qtbase_uk.qm</file>
<file>qt5/qtbase_zh_TW.qm</file>
</qresource>
</RCC>

11
res/tr_qt6.qrc

@ -1,11 +0,0 @@
<RCC>
<qresource prefix="/tr">
<file>qtbase_en_GB.qm</file>
<file>qt6/qtbase_de.qm</file>
<file>qt6/qtbase_fr.qm</file>
<file>qt6/qtbase_ko.qm</file>
<file>qt6/qtbase_ru.qm</file>
<file>qt6/qtbase_uk.qm</file>
<file>qt6/qtbase_zh_TW.qm</file>
</qresource>
</RCC>
Loading…
Cancel
Save