From 785fec293ea26cc693cf2813ca3877fe20cabdec Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 21 Sep 2023 11:14:00 +0400 Subject: [PATCH] Update fcitx5-qt --- external/CMakeLists.txt | 7 +- external/fcitx5_qt/CMakeLists.txt | 12 +-- external/fcitx_qt5/CMakeLists.txt | 97 -------------------- external/fcitx_qt5/init.cpp | 10 -- external/qt/qt_static_plugins/CMakeLists.txt | 11 +-- 5 files changed, 10 insertions(+), 127 deletions(-) delete mode 100644 external/fcitx_qt5/CMakeLists.txt delete mode 100644 external/fcitx_qt5/init.cpp diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 563732f..2f9165b 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -21,11 +21,8 @@ if (LINUX) add_checked_subdirectory(dispatch) endif() add_checked_subdirectory(expected) -if (LINUX AND TARGET Qt::DBus) - add_checked_subdirectory(fcitx_qt5) - if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) - add_checked_subdirectory(fcitx5_qt) - endif() +if (LINUX AND TARGET Qt::DBus AND NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) + add_checked_subdirectory(fcitx5_qt) endif() add_checked_subdirectory(ffmpeg) if (LINUX) diff --git a/external/fcitx5_qt/CMakeLists.txt b/external/fcitx5_qt/CMakeLists.txt index bfca166..c8801a5 100644 --- a/external/fcitx5_qt/CMakeLists.txt +++ b/external/fcitx5_qt/CMakeLists.txt @@ -18,23 +18,23 @@ set(fcitx5_qt_loc ${third_party_loc}/fcitx5-qt) set(fcitx5_qt_src ${fcitx5_qt_loc}/qt${QT_VERSION_MAJOR}/platforminputcontext) set_target_properties(external_fcitx5_qt PROPERTIES AUTOMOC ON) -set(FCITX5_QT_EXTRA_PLUGIN_NAME "") +set(FCITX5_QT_EXTRA_PLUGIN_NAME "\"fcitx\",") configure_file("${fcitx5_qt_src}/fcitx5.json.in" "${CMAKE_CURRENT_BINARY_DIR}/fcitx5.json") nice_target_sources(external_fcitx5_qt ${fcitx5_qt_src} PRIVATE + fcitx4watcher.cpp + fcitx4inputcontextproxy.cpp + fcitx4inputcontextproxyimpl.cpp + fcitx4inputmethodproxy.cpp + hybridinputcontext.cpp qfcitxplatforminputcontext.cpp - qfcitxplatforminputcontext.h fcitxcandidatewindow.cpp - fcitxcandidatewindow.h fcitxtheme.cpp - fcitxtheme.h font.cpp - font.h qtkey.cpp main.cpp - main.h ) target_include_directories(external_fcitx5_qt diff --git a/external/fcitx_qt5/CMakeLists.txt b/external/fcitx_qt5/CMakeLists.txt deleted file mode 100644 index 8945c84..0000000 --- a/external/fcitx_qt5/CMakeLists.txt +++ /dev/null @@ -1,97 +0,0 @@ -# This file is part of Desktop App Toolkit, -# a set of libraries for developing nice desktop applications. -# -# For license and copyright information please follow this link: -# https://github.com/desktop-app/legal/blob/master/LEGAL - -if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY) - add_library(external_fcitx_qt5 INTERFACE IMPORTED GLOBAL) - add_library(desktop-app::external_fcitx_qt5 ALIAS external_fcitx_qt5) - return() -endif() - -add_library(external_fcitx_qt5 STATIC) -add_library(desktop-app::external_fcitx_qt5 ALIAS external_fcitx_qt5) -init_target(external_fcitx_qt5 "(external)") - -set(fcitx_qt5_loc ${third_party_loc}/fcitx-qt5) -set(fcitx_qt5_src ${fcitx_qt5_loc}/qt${QT_VERSION_MAJOR}/platforminputcontext) - -set_target_properties(external_fcitx_qt5 PROPERTIES AUTOMOC ON) - -nice_target_sources(external_fcitx_qt5 ${fcitx_qt5_src} -PRIVATE - fcitxinputcontextproxy.cpp - fcitxqtdbustypes.cpp - fcitxwatcher.cpp - qfcitxplatforminputcontext.cpp - main.cpp - qtkey.cpp -) - -set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext.xml PROPERTIES -INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h) -set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext1.xml PROPERTIES -INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h) -set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod.xml PROPERTIES -INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h) -set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml PROPERTIES -INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h) - -qt_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext.xml inputcontextproxy) -qt_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext1.xml inputcontext1proxy) -qt_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod.xml inputmethodproxy) -qt_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml inputmethod1proxy) - -target_sources(external_fcitx_qt5 PRIVATE ${fcitx_qt5_adaptors}) - -target_include_directories(external_fcitx_qt5 -PRIVATE - ${fcitx_qt5_src} - "${CMAKE_CURRENT_BINARY_DIR}" -) - -target_compile_definitions(external_fcitx_qt5 -PRIVATE - QT_STATICPLUGIN -) - -target_link_libraries(external_fcitx_qt5 -PRIVATE - desktop-app::external_qt -) - -if (DESKTOP_APP_USE_PACKAGED) - find_package(PkgConfig REQUIRED) - pkg_check_modules(XKBCOMMON REQUIRED IMPORTED_TARGET xkbcommon) - - target_link_libraries(external_fcitx_qt5 - PRIVATE - PkgConfig::XKBCOMMON - ) -else() - target_link_static_libraries(external_fcitx_qt5 - PRIVATE - xkbcommon - ) -endif() - -add_library(external_fcitx_qt5_init OBJECT) -add_library(desktop-app::external_fcitx_qt5_init ALIAS external_fcitx_qt5_init) -init_target(external_fcitx_qt5_init "(external)") - -nice_target_sources(external_fcitx_qt5_init ${CMAKE_CURRENT_SOURCE_DIR} -PRIVATE - init.cpp -) - -target_link_libraries(external_fcitx_qt5_init -PRIVATE - desktop-app::external_qt -) - -target_link_libraries(external_fcitx_qt5 -INTERFACE - external_fcitx_qt5_init - $ -) diff --git a/external/fcitx_qt5/init.cpp b/external/fcitx_qt5/init.cpp deleted file mode 100644 index 86d9dd1..0000000 --- a/external/fcitx_qt5/init.cpp +++ /dev/null @@ -1,10 +0,0 @@ -/* -This file is part of Desktop App Toolkit, -a set of libraries for developing nice desktop applications. - -For license and copyright information please follow this link: -https://github.com/desktop-app/legal/blob/master/LEGAL -*/ -#include - -Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin) diff --git a/external/qt/qt_static_plugins/CMakeLists.txt b/external/qt/qt_static_plugins/CMakeLists.txt index a1dd245..ca56bbf 100644 --- a/external/qt/qt_static_plugins/CMakeLists.txt +++ b/external/qt/qt_static_plugins/CMakeLists.txt @@ -25,18 +25,11 @@ if (LINUX) desktop-app::external_nimf_qt5 ) - if (TARGET Qt::DBus) + if (TARGET Qt::DBus AND NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) target_link_libraries(external_qt_static_plugins PUBLIC - desktop-app::external_fcitx_qt5 + desktop-app::external_fcitx5_qt ) - - if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION) - target_link_libraries(external_qt_static_plugins - PUBLIC - desktop-app::external_fcitx5_qt - ) - endif() endif() if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)