Fix resources and Qt4 build
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Syping 2020-11-17 06:58:29 +01:00
parent 4a699f2f56
commit 25ec67ec8b
18 changed files with 105 additions and 32 deletions

View file

@ -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()

View file

@ -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()) {

View file

@ -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

11
res/qt5/tr_qt.qrc Normal file
View file

@ -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 Normal file

Binary file not shown.

65
res/qt6/qtbase_en_GB.ts Normal file
View file

@ -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 Normal file
View file

@ -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>

View file

@ -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>

View file

@ -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>