This commit is contained in:
朱子楚\zhuzi
2024-01-05 20:00:28 +08:00
parent ae2d517ad0
commit d397b88892
5 changed files with 20 additions and 8 deletions

View File

@ -364,6 +364,18 @@ void FluNetwork::handleDownload(NetworkParams* params,NetworkCallable* c){
}
});
loop.exec();
int httpStatus = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
if(httpStatus == 200){
if(!callable.isNull()){
callable->success(destPath);
}
printRequestEndLog(request,params,reply,destPath);
}else{
if(!callable.isNull()){
callable->error(httpStatus,reply->errorString(),destPath);
}
printRequestEndLog(request,params,reply,destPath);
}
if(conn_destoryed){
disconnect(conn_destoryed);
}

View File

@ -70,7 +70,7 @@ Button {
color: FluTheme.primaryColor
anchors.bottom: parent.bottom
Behavior on height{
enabled: control.progress === 1
enabled: control.progress !== 0
SequentialAnimation {
PauseAnimation {
duration: FluTheme.enableAnimation ? 167 : 0

View File

@ -71,7 +71,7 @@ Button {
color: FluTheme.primaryColor
anchors.bottom: parent.bottom
Behavior on height{
enabled: control.progress === 1
enabled: control.progress !== 0
SequentialAnimation {
PauseAnimation {
duration: FluTheme.enableAnimation ? 167 : 0