Skip to content

Commit

Permalink
refactor: [debugger] Code optimization
Browse files Browse the repository at this point in the history
Log:
Change-Id: If486b7fde05fea0d9a12824ca3e795f4db41b3c9
  • Loading branch information
deepin-mozart committed Mar 20, 2024
1 parent 9341336 commit a4a71fc
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 366 deletions.
133 changes: 11 additions & 122 deletions src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,133 +9,22 @@ find_package(Qt5Network)

set(CMAKE_CXX_STANDARD 17)

set(CXX_H
common.h
inotify/private/inotify_hook.h
inotify/private/inotify_impl.h
inotify/private/inotify_linux.h
inotify/private/inotify_p.h
inotify/inotify.h
lsp/client/private/client_p.h
lsp/client/client.h
lsp/client/stdoutjsonrpcparser.h
lsp/server/servercmdparse.h
lsp/server/serverapplication.h
lsp/server/stdinreadloop.h
lsp/server/stdinjsonrpcparser.h
lsp/server/route.h
lsp/protocol/newprotocol.h
lsp/protocol/protocol.h
lsp/protocol/new/jsonrpcparser.h
lsp/protocol/new/basicjsonstructures.h
lsp/protocol/new/lifecyclemessage.h
lsp/protocol/new/documentsynchronization.h
lsp/protocol/new/languagefeatures.h
lsp/protocol/new/extendedproject.h
lsp/lsp.h
util/processutil.h
util/customicons.h
util/custompaths.h
util/eventdefinitions.h
util/singleton.h
util/polkit.h
util/shortcututil.h
util/fileoperation.h
util/qtcassert.h
util/downloadutil.h
util/environment.h
util/commandparser.h
util/themeparser.h
util/fileutils.h
util/fuzzymatcher.h
supportfile/editorstyle.h
supportfile/language.h
supportfile/windowstyle.h
supportfile/dapconfig.h
dialog/commondialog.h
dialog/propertiesdialog.h
dialog/pip3dialog.h
dialog/processdialog.h
dialog/wgetdialog.h
widget/configurewidget.h
widget/collapsewidget.h
widget/detailsbutton.h
widget/statuswidget.h
widget/singlechoicebox.h
widget/elidedlabel.h
widget/generator.h
widget/pagewidget.h
widget/outputpane.h
type/constants.h
type/menuext.h
type/task.h
toolchain/toolchain.h
actionmanager/actionmanager.h
actionmanager/command.h
unilog.h
project/projectinfo.h
)

set(CXX_CPP
inotify/inotify.cpp
lsp/protocol/newprotocol.cpp
lsp/protocol/protocol.cpp
lsp/client/client.cpp
lsp/client/stdoutjsonrpcparser.cpp
lsp/server/servercmdparse.cpp
lsp/server/serverapplication.cpp
lsp/server/stdinreadloop.cpp
lsp/server/stdinjsonrpcparser.cpp
lsp/server/route.cpp
lsp/protocol/new/jsonrpcparser.cpp
lsp/protocol/new/basicjsonstructures.cpp
lsp/protocol/new/lifecyclemessage.cpp
lsp/protocol/new/documentsynchronization.cpp
lsp/protocol/new/languagefeatures.cpp
lsp/protocol/new/extendedproject.cpp
util/processutil.cpp
util/customicons.cpp
util/custompaths.cpp
util/polkit.cpp
util/eventdefinitions.cpp
util/shortcututil.cpp
util/fileoperation.cpp
util/downloadutil.cpp
util/environment.cpp
util/commandparser.cpp
util/themeparser.cpp
util/fileutils.cpp
util/fuzzymatcher.cpp
supportfile/language.cpp
supportfile/editorstyle.cpp
supportfile/windowstyle.cpp
supportfile/dapconfig.cpp
dialog/commondialog.cpp
dialog/propertiesdialog.cpp
dialog/pip3dialog.cpp
dialog/processdialog.cpp
dialog/wgetdialog.cpp
widget/configurewidget.cpp
widget/collapsewidget.cpp
widget/detailsbutton.cpp
widget/statuswidget.cpp
widget/elidedlabel.cpp
widget/singlechoicebox.cpp
widget/generator.cpp
widget/pagewidget.cpp
widget/outputpane.cpp
toolchain/toolchain.cpp
type/constants.cpp
type/task.cpp
actionmanager/actionmanager.cpp
actionmanager/command.cpp
FILE(GLOB COMMON_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/*/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/*/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/*/*/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/*/*/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/*/*/*/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/*/*/*/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/*.json"
)

add_library(
${PROJECT_NAME}
SHARED
${CXX_H}
${CXX_CPP}
${COMMON_FILES}
resource/common.qrc
)

Expand Down
File renamed without changes.
File renamed without changes.
61 changes: 7 additions & 54 deletions src/plugins/debugger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,64 +5,17 @@ project(debugger)
set(CPPDAP_DIR ${CMAKE_SOURCE_DIR}/3rdparty/cppdap)
include_directories(${CPPDAP_DIR}/include)

set(CXX_CPP
debugger.json
debuggerplugin.cpp
debuggerrunparameters.cpp
dap/dapdebugger.cpp
dap/debugsession.cpp
event/eventreceiver.cpp
debugmanager.cpp
dap/rawdebugsession.cpp
runtimecfgprovider.cpp
dap/debugservice.cpp
dap/debugmodel.cpp
interface/stackframemodel.cpp
stackframe.cpp
interface/localtreeitem.cpp
interface/localtreemodel.cpp
interface/stackframeview.cpp
interface/breakpointitem.cpp
breakpoint.cpp
interface/breakpointmodel.cpp
interface/messagebox.cpp
interface/menumanager.cpp
runner/runner.cpp
)

set(CXX_H
debuggerplugin.h
debuggerrunparameters.h
dap/dapdebugger.h
dap/debugsession.h
debuggerglobals.h
debuggersignals.h
event/eventreceiver.h
debugmanager.h
dap/rawdebugsession.h
dap/objects.hpp
runtimecfgprovider.h
debug.h
dap/debugservice.h
dap/debugmodel.h
interface/stackframemodel.h
stackframe.h
interface/localtreeitem.h
interface/localtreemodel.h
interface/variable.h
interface/stackframeview.h
interface/breakpointitem.h
breakpoint.h
interface/breakpointmodel.h
interface/messagebox.h
interface/menumanager.h
runner/runner.h
FILE(GLOB DEBUGGER_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/*/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/*/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/*.json"
)

add_library(${PROJECT_NAME}
SHARED
${CXX_H}
${CXX_CPP}
${DEBUGGER_FILES}
resource.qrc
)

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/debugger/dap/dapdebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "interface/appoutputpane.h"
#include "interface/stackframemodel.h"
#include "interface/stackframeview.h"
#include "interface/messagebox.h"
#include "common/widget/messagebox.h"
#include "interface/breakpointmodel.h"
#include "event/eventreceiver.h"
#include "common/common.h"
Expand Down
Loading

0 comments on commit a4a71fc

Please sign in to comment.