mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 05:17:05 +08:00
update
This commit is contained in:
parent
ae2d517ad0
commit
d397b88892
@ -407,7 +407,7 @@ FluContentPage{
|
||||
text: "Download File"
|
||||
onClicked: {
|
||||
folder_dialog.showDialog(function(path){
|
||||
FluNetwork.get("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
|
||||
FluNetwork.get("http://vjs.zencdn.net/v/oceans.mp4")
|
||||
.toDownload(path)
|
||||
.bind(root)
|
||||
.go(callable_download_file)
|
||||
@ -421,7 +421,7 @@ FluContentPage{
|
||||
text: "Breakpoint Download File"
|
||||
onClicked: {
|
||||
folder_dialog.showDialog(function(path){
|
||||
FluNetwork.get("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
|
||||
FluNetwork.get("http://vjs.zencdn.net/v/oceans.mp4")
|
||||
.toDownload(path,true)
|
||||
.bind(root)
|
||||
.go(callable_breakpoint_download_file)
|
||||
@ -521,7 +521,7 @@ FluContentPage{
|
||||
property var onSelectListener
|
||||
id: folder_dialog
|
||||
folder: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]
|
||||
currentFile: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]+"/big_buck_bunny.mp4"
|
||||
currentFile: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]+"/oceans.mp4"
|
||||
fileMode: FileDialog.SaveFile
|
||||
onAccepted: {
|
||||
folder_dialog.onSelectListener(FluTools.toLocalPath(folder_dialog.currentFile))
|
||||
|
@ -408,7 +408,7 @@ FluContentPage{
|
||||
text: "Download File"
|
||||
onClicked: {
|
||||
folder_dialog.showDialog(function(path){
|
||||
FluNetwork.get("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
|
||||
FluNetwork.get("http://vjs.zencdn.net/v/oceans.mp4")
|
||||
.toDownload(path)
|
||||
.bind(root)
|
||||
.go(callable_download_file)
|
||||
@ -422,7 +422,7 @@ FluContentPage{
|
||||
text: "Breakpoint Download File"
|
||||
onClicked: {
|
||||
folder_dialog.showDialog(function(path){
|
||||
FluNetwork.get("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
|
||||
FluNetwork.get("http://vjs.zencdn.net/v/oceans.mp4")
|
||||
.toDownload(path,true)
|
||||
.bind(root)
|
||||
.go(callable_breakpoint_download_file)
|
||||
@ -522,7 +522,7 @@ FluContentPage{
|
||||
property var onSelectListener
|
||||
id: folder_dialog
|
||||
folder: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]
|
||||
currentFile: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]+"/big_buck_bunny.mp4"
|
||||
currentFile: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]+"/oceans.mp4"
|
||||
fileMode: FileDialog.SaveFile
|
||||
onAccepted: {
|
||||
folder_dialog.onSelectListener(FluTools.toLocalPath(folder_dialog.currentFile))
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user