-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
android-file-transfer-4.3-qt6.patch
61 lines (60 loc) · 2.36 KB
/
android-file-transfer-4.3-qt6.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
diff -up android-file-transfer-linux-4.3/mtp/ptp/ObjectId.h.omv~ android-file-transfer-linux-4.3/mtp/ptp/ObjectId.h
diff -up android-file-transfer-linux-4.3/qt/CMakeLists.txt.omv~ android-file-transfer-linux-4.3/qt/CMakeLists.txt
--- android-file-transfer-linux-4.3/qt/CMakeLists.txt.omv~ 2024-12-29 04:08:53.382622950 +0100
+++ android-file-transfer-linux-4.3/qt/CMakeLists.txt 2024-12-29 04:11:03.900601141 +0100
@@ -1,12 +1,19 @@
if(DESIRED_QT_VERSION)
if(DESIRED_QT_VERSION MATCHES 4)
find_package(Qt4 QUIET)
- else()
+ elseif(DESIRED_QT_VERSION MATCHES 5)
find_package(Qt5Widgets QUIET)
find_package(Qt5Network QUIET)
find_package(Qt5LinguistTools QUIET)
+ else()
+ find_package(Qt6Widgets QUIET)
+ find_package(Qt6Network QUIET)
+ find_package(Qt6LinguistTools QUIET)
endif()
else()
+ find_package(Qt6Widgets QUIET)
+ find_package(Qt6Network QUIET)
+ find_package(Qt6LinguistTools QUIET)
find_package(Qt5Widgets QUIET)
find_package(Qt5Network QUIET)
find_package(Qt5LinguistTools QUIET)
@@ -53,7 +60,23 @@ set(TS_FILES
translations/android-file-transfer-linux_zh-CN.ts
)
-if (Qt5Widgets_FOUND)
+if (Qt6Widgets_FOUND)
+ message(STATUS "Using Qt6")
+ qt6_wrap_cpp(HEADERS_MOC ${HEADERS})
+ qt6_wrap_ui(FORMS_HEADERS ${FORMS})
+
+ qt6_add_translation(QM_FILES ${TS_FILES})
+ set(QM_FILES_XML "")
+ foreach(_QM ${QM_FILES})
+ get_filename_component(_QM ${_QM} NAME)
+ set(QM_FILES_XML "${QM_FILES_XML}<file>${_QM}</file>")
+ endforeach()
+ configure_file(translations/translations.qrc.in translations.qrc)
+
+ qt6_add_resources(RESOURCES android-file-transfer.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc)
+ include_directories(${Qt6Widgets_INCLUDE_DIRS} ${Qt6Network_INCLUDE_DIRS})
+ set(EXTRA_QT_LINK ${Qt6Widgets_LIBRARIES} ${Qt6Network_LIBRARIES})
+elseif (Qt5Widgets_FOUND)
message(STATUS "Using Qt5")
qt5_wrap_cpp(HEADERS_MOC ${HEADERS})
qt5_wrap_ui(FORMS_HEADERS ${FORMS})
diff -up android-file-transfer-linux-4.3/qt/commandqueue.h.omv~ android-file-transfer-linux-4.3/qt/commandqueue.h
--- android-file-transfer-linux-4.3/qt/commandqueue.h.omv~ 2024-12-29 04:19:27.305317217 +0100
+++ android-file-transfer-linux-4.3/qt/commandqueue.h 2024-12-29 04:19:34.663589811 +0100
@@ -23,6 +23,7 @@
#include <QObject>
#include <QQueue>
#include <QMap>
+#include <QDebug>
#include <mtp/ptp/ObjectId.h>
#include <mtp/ptp/ObjectFormat.h>
#include <mtp/metadata/Library.h>