Skip to content

Commit d6b8cf9

Browse files
committed
[Qt 版本更新及HttpClient组件重构]: 主要更新了Qt版本,并重构了HttpClient组件,提升了JSON请求和上传下载功能的支持。
- 更新了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版本和路径。
1 parent 78d6f9a commit d6b8cf9

File tree

18 files changed

+502
-572
lines changed

18 files changed

+502
-572
lines changed

.github/actions/install-dependencies/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ inputs:
1313
qt_ver:
1414
description: 'qt version'
1515
required: false
16-
default: '6.7.2'
16+
default: '6.8.1'
1717
type: string
1818

1919
runs:
@@ -48,7 +48,7 @@ runs:
4848
gcc --version
4949
5050
- name: Install Qt
51-
uses: jurplel/install-qt-action@v3
51+
uses: jurplel/install-qt-action@v4
5252
with:
5353
version: ${{ inputs.qt_ver }}
5454
modules: ${{ inputs.qt_modules }}

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
},
55
"cmake.generator": "Ninja",
66
"cmake.environment": {
7-
"PATH": "C:\\Qt\\6.7.2\\msvc2019_64\\bin;${env:PATH};"
7+
"PATH": "C:\\Qt\\6.8.1\\msvc2022_64\\bin;${env:PATH};"
88
}
99
}

HttpClient/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
set(PROJECT_SOURCES main.cpp mainwindow.cpp mainwindow.h httpclient.h
2-
httpclient.cpp)
1+
set(PROJECT_SOURCES main.cpp httpclient.cc httpclient.hpp)
32

43
qt_add_executable(HttpClient MANUAL_FINALIZATION ${PROJECT_SOURCES})
5-
target_link_libraries(HttpClient PRIVATE Qt6::Widgets Qt6::Network
6-
Qt6::Concurrent)
4+
target_link_libraries(HttpClient PRIVATE Qt6::Network Qt6::Concurrent)
75
qt_finalize_executable(HttpClient)

HttpClient/HttpClient.pro

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ DEFINES += QT_DEPRECATED_WARNINGS
1616
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
1717

1818
SOURCES += \
19-
httpclient.cpp \
20-
main.cpp \
21-
mainwindow.cpp
19+
httpclient.cc \
20+
main.cpp
2221

2322
HEADERS += \
24-
httpclient.h \
25-
mainwindow.h
23+
httpclient.hpp
2624

2725
# Default rules for deployment.
2826
qnx: target.path = /tmp/$${TARGET}/bin

0 commit comments

Comments
 (0)