-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrate to Qt6 and clean up codebase
- Move Qt5 components and translations - Add Qt6/DTK6 dependencies - Update installation paths Log: migrate to Qt6 and clean up codebase
- Loading branch information
Showing
232 changed files
with
474 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ build/* | |
*.kdev4 | ||
.kdev_include_paths | ||
.directory | ||
*.user | ||
*.kate-swp | ||
*.orig | ||
*~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
usr/lib/*/dde-control-center/modules/libdcc-fcitx5configtool-plugin.so | ||
usr/lib/*/dde-control-center | ||
usr/share/dde-control-center/translations/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets X11Extras Concurrent) | ||
find_package(DtkCore REQUIRED) | ||
find_package(DtkWidget REQUIRED) | ||
|
||
find_package(KF5ItemViews REQUIRED) | ||
|
||
find_package(Fcitx5Qt5DBusAddons REQUIRED) | ||
find_package(Fcitx5Qt5WidgetsAddons 5.0.2 REQUIRED) | ||
find_package(Qt5Svg) | ||
set_package_properties(Qt5Svg PROPERTIES | ||
DESCRIPTION "May be used for show icons" | ||
TYPE RUNTIME) | ||
|
||
get_target_property(FCITX5_QT5_GUI_WRAPPER Fcitx5Qt5::gui-wrapper IMPORTED_LOCATION) | ||
|
||
find_package(KF5WidgetsAddons REQUIRED) | ||
kde_enable_exceptions() | ||
|
||
configure_file(config.h.in config.h) | ||
include_directories(${CMAKE_CURRENT_BINARY_DIR}) | ||
|
||
add_subdirectory(po) | ||
add_subdirectory(src) | ||
add_subdirectory(layout) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
add_subdirectory(lib) | ||
add_subdirectory(dcc-module) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
cmake_minimum_required(VERSION 3.7) | ||
|
||
set(PLUGIN_NAME "deepin-fcitx5configtool-plugin") | ||
|
||
project(${PLUGIN_NAME}) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
set(CMAKE_CXX_FLAGS "-g -Wall") | ||
|
||
# 增加安全编译参数 | ||
ADD_DEFINITIONS("-fstack-protector-strong -D_FORTITY_SOURCE=1 -z noexecstack -pie -fPIC -z lazy") | ||
|
||
# 指定要用到的库 | ||
# -DQT_MAJOR_VERSION=6 | ||
# find_package(QT NAMES Qt6 Qt5) | ||
# set(QT_MAJOR_VERSION 6) | ||
# set(QT_DEFAULT_MAJOR_VERSION 6) | ||
find_package(Qt6 COMPONENTS Core Gui DBus LinguistTools REQUIRED) | ||
find_package(DdeControlCenter REQUIRED) | ||
find_package(Dtk6 COMPONENTS Core REQUIRED) | ||
find_package(PkgConfig REQUIRED) | ||
|
||
|
||
set(DccFcitx5configtool_Name fcitx5configtool) | ||
file(GLOB_RECURSE DccFcitx5configtool_SRCS | ||
"*.cpp" | ||
"*.h" | ||
"operation/*.cpp" | ||
"operation/*.h" | ||
) | ||
|
||
add_library(${DccFcitx5configtool_Name} MODULE | ||
${DccFcitx5configtool_SRCS} | ||
) | ||
|
||
target_include_directories(${DccFcitx5configtool_Name} PUBLIC | ||
Dde::Control-Center | ||
) | ||
|
||
set(DccFcitx5configtool_Libraries | ||
Qt6::DBus | ||
Qt6::Gui | ||
Dtk6::Core | ||
Dde::Control-Center | ||
) | ||
|
||
target_link_libraries(${DccFcitx5configtool_Name} PRIVATE | ||
${DccFcitx5configtool_Libraries} | ||
) | ||
|
||
dcc_install_plugin(NAME ${DccFcitx5configtool_Name} TARGET ${DccFcitx5configtool_Name}) |
27 changes: 27 additions & 0 deletions
27
src-old/src/dcc-fcitx5configtool/operation/fcitx5configtool.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// SPDX-FileCopyrightText: 2024 - 2027 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
#include "fcitx5configtool.h" | ||
|
||
#include "dde-control-center/dccfactory.h" | ||
|
||
#include <QCoreApplication> | ||
#include <QDebug> | ||
#include <QGuiApplication> | ||
#include <QtQml/QQmlEngine> | ||
|
||
// #include "dccfactory.h" | ||
|
||
namespace deepin { | ||
namespace fcitx5configtool { | ||
Fcitx5ConfigToolWorker::Fcitx5ConfigToolWorker(QObject *parent) | ||
: QObject(parent) | ||
{ | ||
|
||
} | ||
|
||
DCC_FACTORY_CLASS(Fcitx5ConfigToolWorker) | ||
} // namespace fcitx5configtool | ||
} // namespace deepin | ||
|
||
#include "fcitx5configtool.moc" |
24 changes: 24 additions & 0 deletions
24
src-old/src/dcc-fcitx5configtool/operation/fcitx5configtool.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-FileCopyrightText: 2024 - 2027 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
#ifndef FCITX5CONFIGTOOL_H | ||
#define FCITX5CONFIGTOOL_H | ||
|
||
#include <QObject> | ||
#include <QVariant> | ||
#include <QVariantMap> | ||
|
||
namespace deepin { | ||
namespace fcitx5configtool { | ||
|
||
class Fcitx5ConfigToolWorker : public QObject | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit Fcitx5ConfigToolWorker(QObject *parent = nullptr); | ||
}; | ||
} // namespace fcitx5configtool | ||
} // namespace deepin | ||
|
||
#endif // FCITX5CONFIGTOOL_H |
6 changes: 6 additions & 0 deletions
6
src-old/src/dcc-fcitx5configtool/operation/qrc/fcitx5configtool.qrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<RCC> | ||
<qresource prefix="/icons/deepin/builtin"> | ||
<file>icons/dcc_nav_keyboard_42px.svg</file> | ||
<file>icons/dcc_nav_keyboard_84px.svg</file> | ||
</qresource> | ||
</RCC> |
Oops, something went wrong.