Skip to content

Replace deprecated qt_add_translation function#3461

Open
QuentiumYT wants to merge 1 commit intohluk:masterfrom
Quentium-Forks:deprecations
Open

Replace deprecated qt_add_translation function#3461
QuentiumYT wants to merge 1 commit intohluk:masterfrom
Quentium-Forks:deprecations

Conversation

@QuentiumYT
Copy link
Contributor

Hello, the qt_add_translation is deprecated (as per https://doc.qt.io/qt-6/qtlinguist-cmake-qt-add-translation.html)

Also while trying to package your app, I struggled with set(copyq_DEFINITIONS ${${copyq_qt}Widgets_DEFINITIONS}). It seems to look for extra widgets definitions but launchpad didn't work. Looks fine without it so I'm wondering if it's still needed.

Thanks for your reply :)

@QuentiumYT QuentiumYT requested a review from hluk as a code owner March 5, 2026 15:10
@QuentiumYT
Copy link
Contributor Author

QuentiumYT commented Mar 5, 2026

Oh yes Qt5 doesn't support it, would you like me to add a fallback?

if("${QT_VERSION_MAJOR}" STREQUAL "5")
  qt5_add_translation(copyq_QM ${copyq_TRANSLATIONS})
else()
  qt6_add_translations(copyq-common TS_FILES ${${PROJECT_NAME}_translations} QM_FILES_OUTPUT_VARIABLE copyq_QM)
endif()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant