feat: adapt to Qt6

adapt to Qt6; fix a few bugs

Log: adapt to Qt6; bump version to 4.2.14
This commit is contained in:
zty199
2024-06-21 01:55:09 +08:00
parent d6bc2a96a7
commit 2d1ca2463e
28 changed files with 290 additions and 260 deletions

View File

@@ -0,0 +1,19 @@
# Have to disable cleaning for this folder because cmake deletes .ts files upon clean
# Not sure what else wont clean up / dirty workaround of Qt bug
# @ref https://bugreports.qt.io/browse/QTBUG-41736
# @ref https://stackoverflow.com/a/24245615/1917249
set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM TRUE)
find_package(Qt6 REQUIRED COMPONENTS LinguistTools)
# Update ts files and release qm files only in Release build
file(GLOB TS_FILES "*.ts")
if (NOT ${CMAKE_BUILD_TYPE} MATCHES "Debug")
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_SOURCE_DIR})
qt6_create_translation(QM_FILES ${CMAKE_SOURCE_DIR}/src ${TS_FILES} OPTIONS -no-obsolete)
# https://stackoverflow.com/questions/70665191/cmake-does-not-generate-ts-files
add_custom_target(${PROJECT_NAME}_translations DEPENDS ${TS_FILES} ${QM_FILES})
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_translations)
endif ()
install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/translations)

View File

@@ -269,12 +269,12 @@
<context>
<name>DAboutDialog</name>
<message>
<location filename="../src/application.cpp" line="142"/>
<location filename="../src/application.cpp" line="141"/>
<source>Version: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/application.cpp" line="152"/>
<location filename="../src/application.cpp" line="151"/>
<source>%1 is released under %2</source>
<translation type="unfinished"></translation>
</message>
@@ -515,19 +515,19 @@
<context>
<name>QObject</name>
<message>
<location filename="../src/application.cpp" line="35"/>
<location filename="../src/application.cpp" line="36"/>
<location filename="../src/application.cpp" line="37"/>
<location filename="../src/mainwindow-dtk.cpp" line="126"/>
<source>Spark Store</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/application.cpp" line="41"/>
<location filename="../src/application.cpp" line="40"/>
<source>&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt;An appstore powered by community&lt;/span&gt;&lt;br/&gt;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&lt;span style=&apos; font-size:12pt;&apos;&gt;Spark developers&lt;/span&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/application.cpp" line="149"/>
<location filename="../src/application.cpp" line="148"/>
<source>Spark Project</source>
<translation type="unfinished"></translation>
</message>

View File

@@ -236,22 +236,6 @@
<source>The current application does not support or tested on current platform, there may be problems</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The current application does not support deepin, there may be problems</source>
<translation type="vanished">La aplicación actual no admite deepin, puede haber problemas</translation>
</message>
<message>
<source>The current application does not support UOS, there may be problems</source>
<translation type="vanished">La aplicación actual no admite uos, puede haber problemas</translation>
</message>
<message>
<source>The current application does not support Ubuntu, there may be problems</source>
<translation type="vanished">La aplicación actual no admite ubuntu, puede haber problemas</translation>
</message>
<message>
<source>The current application does not support current platform, there may be problems</source>
<translation type="vanished">La aplicación actual no admite la Plataforma actual, puede haber problemas</translation>
</message>
<message>
<location filename="../src/pages/appintopage.cpp" line="521"/>
<location filename="../src/pages/appintopage.cpp" line="536"/>
@@ -285,12 +269,12 @@
<context>
<name>DAboutDialog</name>
<message>
<location filename="../src/application.cpp" line="142"/>
<location filename="../src/application.cpp" line="141"/>
<source>Version: %1</source>
<translation>Versión %1</translation>
</message>
<message>
<location filename="../src/application.cpp" line="152"/>
<location filename="../src/application.cpp" line="151"/>
<source>%1 is released under %2</source>
<translation>%1 publicado bajo %2</translation>
</message>
@@ -531,19 +515,19 @@
<context>
<name>QObject</name>
<message>
<location filename="../src/application.cpp" line="35"/>
<location filename="../src/application.cpp" line="36"/>
<location filename="../src/application.cpp" line="37"/>
<location filename="../src/mainwindow-dtk.cpp" line="126"/>
<source>Spark Store</source>
<translation>SPARK Store</translation>
</message>
<message>
<location filename="../src/application.cpp" line="41"/>
<location filename="../src/application.cpp" line="40"/>
<source>&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt;An appstore powered by community&lt;/span&gt;&lt;br/&gt;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&lt;span style=&apos; font-size:12pt;&apos;&gt;Spark developers&lt;/span&gt;</source>
<translation>&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt;An appstore powered by community&lt;/span&gt;&lt;br/&gt;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&lt;span style=&apos; font-size:12pt;&apos;&gt;Spark developers&lt;/span&gt;</translation>
</message>
<message>
<location filename="../src/application.cpp" line="149"/>
<location filename="../src/application.cpp" line="148"/>
<source>Spark Project</source>
<translation>Proyecto spark</translation>
</message>

View File

@@ -236,22 +236,6 @@
<source>The current application does not support or tested on current platform, there may be problems</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The current application does not support deepin, there may be problems</source>
<translation type="vanished">L&apos;application actuelle ne supporte pas deepin, il peut y avoir un problème</translation>
</message>
<message>
<source>The current application does not support UOS, there may be problems</source>
<translation type="vanished">L&apos;application actuelle ne prend pas en charge uos, il peut y avoir un problème</translation>
</message>
<message>
<source>The current application does not support Ubuntu, there may be problems</source>
<translation type="vanished">L&apos;application actuelle ne supporte pas Ubuntu, il peut y avoir un problème</translation>
</message>
<message>
<source>The current application does not support current platform, there may be problems</source>
<translation type="vanished">L&apos;application actuelle ne prend pas en charge la plate - forme actuelle, il peut y avoir un problème</translation>
</message>
<message>
<location filename="../src/pages/appintopage.cpp" line="521"/>
<location filename="../src/pages/appintopage.cpp" line="536"/>
@@ -285,12 +269,12 @@
<context>
<name>DAboutDialog</name>
<message>
<location filename="../src/application.cpp" line="142"/>
<location filename="../src/application.cpp" line="141"/>
<source>Version: %1</source>
<translation>Version: %1</translation>
</message>
<message>
<location filename="../src/application.cpp" line="152"/>
<location filename="../src/application.cpp" line="151"/>
<source>%1 is released under %2</source>
<translation>%1 publié sous %2</translation>
</message>
@@ -531,19 +515,19 @@
<context>
<name>QObject</name>
<message>
<location filename="../src/application.cpp" line="35"/>
<location filename="../src/application.cpp" line="36"/>
<location filename="../src/application.cpp" line="37"/>
<location filename="../src/mainwindow-dtk.cpp" line="126"/>
<source>Spark Store</source>
<translation>Le Spark store</translation>
</message>
<message>
<location filename="../src/application.cpp" line="41"/>
<location filename="../src/application.cpp" line="40"/>
<source>&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt;An appstore powered by community&lt;/span&gt;&lt;br/&gt;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&lt;span style=&apos; font-size:12pt;&apos;&gt;Spark developers&lt;/span&gt;</source>
<translation>&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt;An appstore powered by community&lt;/span&gt;&lt;br/&gt;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&lt;span style=&apos; font-size:12pt;&apos;&gt;Spark developers&lt;/span&gt;</translation>
</message>
<message>
<location filename="../src/application.cpp" line="149"/>
<location filename="../src/application.cpp" line="148"/>
<source>Spark Project</source>
<translation>Le projet Spark</translation>
</message>

View File

@@ -236,22 +236,6 @@
<source>The current application does not support or tested on current platform, there may be problems</source>
<translation></translation>
</message>
<message>
<source>The current application does not support deepin, there may be problems</source>
<translation type="vanished">deepin</translation>
</message>
<message>
<source>The current application does not support UOS, there may be problems</source>
<translation type="vanished">UOS</translation>
</message>
<message>
<source>The current application does not support Ubuntu, there may be problems</source>
<translation type="vanished">Ubuntu</translation>
</message>
<message>
<source>The current application does not support current platform, there may be problems</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../src/pages/appintopage.cpp" line="521"/>
<location filename="../src/pages/appintopage.cpp" line="536"/>
@@ -285,12 +269,12 @@
<context>
<name>DAboutDialog</name>
<message>
<location filename="../src/application.cpp" line="142"/>
<location filename="../src/application.cpp" line="141"/>
<source>Version: %1</source>
<translation>%1</translation>
</message>
<message>
<location filename="../src/application.cpp" line="152"/>
<location filename="../src/application.cpp" line="151"/>
<source>%1 is released under %2</source>
<translation>%1%2</translation>
</message>
@@ -531,19 +515,19 @@
<context>
<name>QObject</name>
<message>
<location filename="../src/application.cpp" line="35"/>
<location filename="../src/application.cpp" line="36"/>
<location filename="../src/application.cpp" line="37"/>
<location filename="../src/mainwindow-dtk.cpp" line="126"/>
<source>Spark Store</source>
<translation></translation>
</message>
<message>
<location filename="../src/application.cpp" line="41"/>
<location filename="../src/application.cpp" line="40"/>
<source>&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt;An appstore powered by community&lt;/span&gt;&lt;br/&gt;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&lt;span style=&apos; font-size:12pt;&apos;&gt;Spark developers&lt;/span&gt;</source>
<translation>&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt;&lt;/span&gt;&lt;br/&gt;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&lt;span style=&apos; font-size:12pt;&apos;&gt;星火计划开发者&lt;/span&gt;</translation>
</message>
<message>
<location filename="../src/application.cpp" line="149"/>
<location filename="../src/application.cpp" line="148"/>
<source>Spark Project</source>
<translation></translation>
</message>

View File

@@ -269,12 +269,12 @@
<context>
<name>DAboutDialog</name>
<message>
<location filename="../src/application.cpp" line="142"/>
<location filename="../src/application.cpp" line="141"/>
<source>Version: %1</source>
<translation>%1</translation>
</message>
<message>
<location filename="../src/application.cpp" line="152"/>
<location filename="../src/application.cpp" line="151"/>
<source>%1 is released under %2</source>
<translation>%1%2</translation>
</message>
@@ -515,19 +515,19 @@
<context>
<name>QObject</name>
<message>
<location filename="../src/application.cpp" line="35"/>
<location filename="../src/application.cpp" line="36"/>
<location filename="../src/application.cpp" line="37"/>
<location filename="../src/mainwindow-dtk.cpp" line="126"/>
<source>Spark Store</source>
<translation></translation>
</message>
<message>
<location filename="../src/application.cpp" line="41"/>
<location filename="../src/application.cpp" line="40"/>
<source>&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt;An appstore powered by community&lt;/span&gt;&lt;br/&gt;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&lt;span style=&apos; font-size:12pt;&apos;&gt;Spark developers&lt;/span&gt;</source>
<translation>&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt;&lt;/span&gt;&lt;br/&gt;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&lt;span style=&apos; font-size:12pt;&apos;&gt;星火计划开发者&lt;/span&gt;</translation>
</message>
<message>
<location filename="../src/application.cpp" line="149"/>
<location filename="../src/application.cpp" line="148"/>
<source>Spark Project</source>
<translation></translation>
</message>