mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-05 17:55:25 +08:00
update
This commit is contained in:
@ -224,17 +224,14 @@ void FluHttp::download(QString url,QJSValue callable,QString filePath,QVariantMa
|
||||
connect(reply,&QNetworkReply::downloadProgress,this,[=](qint64 bytesReceived, qint64 bytesTotal){
|
||||
onDownloadProgress(callable,bytesReceived,bytesTotal);
|
||||
});
|
||||
connect(reply,&QNetworkReply::readyRead,this,[=](){
|
||||
file->write(reply->readAll());
|
||||
});
|
||||
loop.exec();
|
||||
if (reply->error() == QNetworkReply::NoError) {
|
||||
file->write(reply->readAll());
|
||||
onSuccess(callable,filePath);
|
||||
}else{
|
||||
onError(callable,reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(),reply->errorString());
|
||||
}
|
||||
_cache.removeOne(reply);
|
||||
file->close();
|
||||
reply->deleteLater();
|
||||
reply = nullptr;
|
||||
onFinish(callable);
|
||||
|
@ -5,7 +5,7 @@ import FluentUI
|
||||
|
||||
Item{
|
||||
property var radius:[0,0,0,0]
|
||||
property color color : "#FFFFFF"
|
||||
property color color : FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
||||
property bool shadow: true
|
||||
default property alias contentItem: container.data
|
||||
id:control
|
||||
|
Reference in New Issue
Block a user