diff --git a/CMakeLists.txt b/CMakeLists.txt
index e3fb7c2..f2f2811 100644
--- a/CMakeLists.txt
+++ b/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()
diff --git a/ImportDialog.cpp b/ImportDialog.cpp
index e14bb00..94d9763 100644
--- a/ImportDialog.cpp
+++ b/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()) {
diff --git a/gta5view.pro b/gta5view.pro
index cacdc53..daa7ec4 100644
--- a/gta5view.pro
+++ b/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
diff --git a/res/qt_de.qm b/res/qt4/qt_de.qm
similarity index 100%
rename from res/qt_de.qm
rename to res/qt4/qt_de.qm
diff --git a/res/qt_fr.qm b/res/qt4/qt_fr.qm
similarity index 100%
rename from res/qt_fr.qm
rename to res/qt4/qt_fr.qm
diff --git a/res/qt_ko.qm b/res/qt4/qt_ko.qm
similarity index 100%
rename from res/qt_ko.qm
rename to res/qt4/qt_ko.qm
diff --git a/res/qt_ru.qm b/res/qt4/qt_ru.qm
similarity index 100%
rename from res/qt_ru.qm
rename to res/qt4/qt_ru.qm
diff --git a/res/qt_uk.qm b/res/qt4/qt_uk.qm
similarity index 100%
rename from res/qt_uk.qm
rename to res/qt4/qt_uk.qm
diff --git a/res/qt_zh_TW.qm b/res/qt4/qt_zh_TW.qm
similarity index 100%
rename from res/qt_zh_TW.qm
rename to res/qt4/qt_zh_TW.qm
diff --git a/res/tr_qt4.qrc b/res/qt4/tr_qt.qrc
similarity index 100%
rename from res/tr_qt4.qrc
rename to res/qt4/tr_qt.qrc
diff --git a/res/qtbase_en_GB.qm b/res/qt5/qtbase_en_GB.qm
similarity index 100%
rename from res/qtbase_en_GB.qm
rename to res/qt5/qtbase_en_GB.qm
diff --git a/res/qtbase_en_GB.ts b/res/qt5/qtbase_en_GB.ts
similarity index 100%
rename from res/qtbase_en_GB.ts
rename to res/qt5/qtbase_en_GB.ts
diff --git a/res/qt5/tr_qt.qrc b/res/qt5/tr_qt.qrc
new file mode 100644
index 0000000..7bfe7cc
--- /dev/null
+++ b/res/qt5/tr_qt.qrc
@@ -0,0 +1,11 @@
+
+
+ qtbase_en_GB.qm
+ qtbase_de.qm
+ qtbase_fr.qm
+ qtbase_ko.qm
+ qtbase_ru.qm
+ qtbase_uk.qm
+ qtbase_zh_TW.qm
+
+
diff --git a/res/qt6/qtbase_en_GB.qm b/res/qt6/qtbase_en_GB.qm
new file mode 100644
index 0000000..8a7e376
Binary files /dev/null and b/res/qt6/qtbase_en_GB.qm differ
diff --git a/res/qt6/qtbase_en_GB.ts b/res/qt6/qtbase_en_GB.ts
new file mode 100644
index 0000000..0fbfffd
--- /dev/null
+++ b/res/qt6/qtbase_en_GB.ts
@@ -0,0 +1,65 @@
+
+
+
+
+ QColorDialog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cursour at %1, %2
+Press ESC to cancel
+
+
+
+ Select Colour
+
+
+
+ &Basic colours
+
+
+
+ &Custom colours
+
+
+
+ &Add to Custom Colours
+
+
+
+ &Pick Screen Colour
+
+
+
diff --git a/res/qt6/tr_qt.qrc b/res/qt6/tr_qt.qrc
new file mode 100644
index 0000000..7bfe7cc
--- /dev/null
+++ b/res/qt6/tr_qt.qrc
@@ -0,0 +1,11 @@
+
+
+ qtbase_en_GB.qm
+ qtbase_de.qm
+ qtbase_fr.qm
+ qtbase_ko.qm
+ qtbase_ru.qm
+ qtbase_uk.qm
+ qtbase_zh_TW.qm
+
+
diff --git a/res/tr_qt5.qrc b/res/tr_qt5.qrc
deleted file mode 100644
index 7cfd46a..0000000
--- a/res/tr_qt5.qrc
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- qtbase_en_GB.qm
- qt5/qtbase_de.qm
- qt5/qtbase_fr.qm
- qt5/qtbase_ko.qm
- qt5/qtbase_ru.qm
- qt5/qtbase_uk.qm
- qt5/qtbase_zh_TW.qm
-
-
diff --git a/res/tr_qt6.qrc b/res/tr_qt6.qrc
deleted file mode 100644
index a8adf50..0000000
--- a/res/tr_qt6.qrc
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- qtbase_en_GB.qm
- qt6/qtbase_de.qm
- qt6/qtbase_fr.qm
- qt6/qtbase_ko.qm
- qt6/qtbase_ru.qm
- qt6/qtbase_uk.qm
- qt6/qtbase_zh_TW.qm
-
-