Skip to content

Commit

Permalink
[Qt 版本更新及HttpClient组件重构]: 主要更新了Qt版本,并重构了HttpClient组件,提升了JSON请求和上传下载功能…
Browse files Browse the repository at this point in the history
…的支持。

- 更新了Qt版本,从6.7.2升级到6.8.1,并相应更新了`action.yml`文件中的Qt版本号,以及`CMakeLists.txt`和`HttpClient/*.pro`文件中的相关配置。
- 重构了`HttpClient`组件,引入了新的`httpclient.hpp`和`httpclient.cc`文件,替换了原有的`httpclient.h`和`httpclient.cpp`文件,提供了更加现代化的HTTP客户端功能。
- 移除了旧的`MainWindow`类相关文件,包括`mainwindow.h`和`mainwindow.cpp`,因为新的`HttpClient`组件不再依赖于图形界面。
- 更新了`.vscode/settings.json`文件,修改了Qt的路径和版本信息,以适应新的Qt版本。
- 添加了`.github/dependabot.yml`文件,启用了Dependabot版本更新,以自动维护项目依赖。
- 更新了`README.md`文件,简要描述了`HttpClient`组件的新功能和用途。
- 修改了跨平台构建脚本,包括`packaging/macos/build.py`、`packaging/macos/package.sh`、`packaging/ubuntu/build.py`和`packaging/windows/build.py`,以适应新的Qt版本和路径。
  • Loading branch information
RealChuan committed Dec 16, 2024
1 parent 78d6f9a commit d6b8cf9
Show file tree
Hide file tree
Showing 18 changed files with 502 additions and 572 deletions.
4 changes: 2 additions & 2 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inputs:
qt_ver:
description: 'qt version'
required: false
default: '6.7.2'
default: '6.8.1'
type: string

runs:
Expand Down Expand Up @@ -48,7 +48,7 @@ runs:
gcc --version
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: ${{ inputs.qt_ver }}
modules: ${{ inputs.qt_modules }}
Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
},
"cmake.generator": "Ninja",
"cmake.environment": {
"PATH": "C:\\Qt\\6.7.2\\msvc2019_64\\bin;${env:PATH};"
"PATH": "C:\\Qt\\6.8.1\\msvc2022_64\\bin;${env:PATH};"
}
}
6 changes: 2 additions & 4 deletions HttpClient/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
set(PROJECT_SOURCES main.cpp mainwindow.cpp mainwindow.h httpclient.h
httpclient.cpp)
set(PROJECT_SOURCES main.cpp httpclient.cc httpclient.hpp)

qt_add_executable(HttpClient MANUAL_FINALIZATION ${PROJECT_SOURCES})
target_link_libraries(HttpClient PRIVATE Qt6::Widgets Qt6::Network
Qt6::Concurrent)
target_link_libraries(HttpClient PRIVATE Qt6::Network Qt6::Concurrent)
qt_finalize_executable(HttpClient)
8 changes: 3 additions & 5 deletions HttpClient/HttpClient.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
httpclient.cpp \
main.cpp \
mainwindow.cpp
httpclient.cc \
main.cpp

HEADERS += \
httpclient.h \
mainwindow.h
httpclient.hpp

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
Expand Down
Loading

0 comments on commit d6b8cf9

Please sign in to comment.