diff --git a/src/FluNetwork.cpp b/src/FluNetwork.cpp index a030a9e0..06a1de1e 100644 --- a/src/FluNetwork.cpp +++ b/src/FluNetwork.cpp @@ -214,15 +214,15 @@ void FluNetwork::handle(FluNetworkParams* params,FluNetworkCallable* c){ reply->abort(); } }; - QMetaObject::Connection conn_destoryed = {}; + QMetaObject::Connection conn_destroyed = {}; QMetaObject::Connection conn_quit = {}; if(params->_target){ - conn_destoryed = connect(params->_target,&QObject::destroyed,&manager,abortCallable); + conn_destroyed = connect(params->_target,&QObject::destroyed,&manager,abortCallable); } conn_quit = connect(qApp,&QGuiApplication::aboutToQuit,&manager, abortCallable); loop.exec(); - if(conn_destoryed){ - disconnect(conn_destoryed); + if(conn_destroyed){ + disconnect(conn_destroyed); } if(conn_quit){ disconnect(conn_quit); @@ -336,10 +336,10 @@ void FluNetwork::handleDownload(FluNetworkParams* params,FluNetworkCallable* c){ }; connect(&manager,&QNetworkAccessManager::finished,&manager,[&loop](QNetworkReply *reply){loop.quit();}); connect(qApp,&QGuiApplication::aboutToQuit,&manager, [&loop,reply](){reply->abort(),loop.quit();}); - QMetaObject::Connection conn_destoryed = {}; + QMetaObject::Connection conn_destroyed = {}; QMetaObject::Connection conn_quit = {}; if(params->_target){ - conn_destoryed = connect(params->_target,&QObject::destroyed,&manager,abortCallable); + conn_destroyed = connect(params->_target,&QObject::destroyed,&manager,abortCallable); } conn_quit = connect(qApp,&QGuiApplication::aboutToQuit,&manager, abortCallable); connect(reply,&QNetworkReply::readyRead,reply,[reply,seek,destFile,cacheFile,callable]{ @@ -377,8 +377,8 @@ void FluNetwork::handleDownload(FluNetworkParams* params,FluNetworkCallable* c){ } printRequestEndLog(request,params,reply,destPath); } - if(conn_destoryed){ - disconnect(conn_destoryed); + if(conn_destroyed){ + disconnect(conn_destroyed); } if(conn_quit){ disconnect(conn_quit); diff --git a/src/FluWindowLifecycle.cpp b/src/FluWindowLifecycle.cpp index 1e16e119..c45b0003 100644 --- a/src/FluWindowLifecycle.cpp +++ b/src/FluWindowLifecycle.cpp @@ -13,7 +13,7 @@ void FluWindowLifecycle::onCompleted(QQuickWindow* window){ } } -void FluWindowLifecycle::onDestoryOnClose(){ +void FluWindowLifecycle::onDestroyOnClose(){ if(_window && _window->transientParent() == nullptr){ FluApp::getInstance()->removeWindow(_window); _window = nullptr; diff --git a/src/FluWindowLifecycle.h b/src/FluWindowLifecycle.h index 809af001..15374047 100644 --- a/src/FluWindowLifecycle.h +++ b/src/FluWindowLifecycle.h @@ -20,7 +20,7 @@ public: Q_INVOKABLE void onCompleted(QQuickWindow* window); Q_INVOKABLE void onDestruction(); Q_INVOKABLE void onVisible(bool visible); - Q_INVOKABLE void onDestoryOnClose(); + Q_INVOKABLE void onDestroyOnClose(); private: QQuickWindow* _window = nullptr; }; diff --git a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml index cac8cb5c..b2c4bdde 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml @@ -39,7 +39,7 @@ Window { property bool autoMaximize: false property bool autoVisible: true property bool autoCenter: true - property bool autoDestory: true + property bool autoDestroy: true property bool useSystemAppBar property color resizeBorderColor: { if(window.active){ @@ -49,8 +49,8 @@ Window { } property int resizeBorderWidth: 1 property var closeListener: function(event){ - if(autoDestory){ - destoryOnClose() + if(autoDestroy){ + destroyOnClose() }else{ window.visibility = Window.Hidden event.accepted = false @@ -263,8 +263,8 @@ Window { return com_border } } - function destoryOnClose(){ - lifecycle.onDestoryOnClose() + function destroyOnClose(){ + lifecycle.onDestroyOnClose() } function showLoading(text = qsTr("Loading..."),cancel = true){ loader_loading.loadingText = text diff --git a/src/Qt5/imports/FluentUI/Controls/FluWindowDialog.qml b/src/Qt5/imports/FluentUI/Controls/FluWindowDialog.qml index 2a939130..7446fee2 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluWindowDialog.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluWindowDialog.qml @@ -9,12 +9,12 @@ FluWindow { property Component contentDelegate autoVisible: false autoCenter: false - autoDestory: true + autoDestroy: true fixSize: true Loader{ anchors.fill: parent sourceComponent: { - if(control.autoDestory){ + if(control.autoDestroy){ return control.visible ? control.contentDelegate : undefined } return control.contentDelegate diff --git a/src/Qt6/imports/FluentUI/Controls/FluWindow.qml b/src/Qt6/imports/FluentUI/Controls/FluWindow.qml index 1e5b813f..a568aaf1 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluWindow.qml @@ -38,7 +38,7 @@ Window { property bool autoMaximize: false property bool autoVisible: true property bool autoCenter: true - property bool autoDestory: true + property bool autoDestroy: true property bool useSystemAppBar property color resizeBorderColor: { if(window.active){ @@ -48,8 +48,8 @@ Window { } property int resizeBorderWidth: 1 property var closeListener: function(event){ - if(autoDestory){ - destoryOnClose() + if(autoDestroy){ + destroyOnClose() }else{ window.visibility = Window.Hidden event.accepted = false @@ -262,8 +262,8 @@ Window { return com_border } } - function destoryOnClose(){ - lifecycle.onDestoryOnClose() + function destroyOnClose(){ + lifecycle.onDestroyOnClose() } function showLoading(text = qsTr("Loading..."),cancel = true){ loader_loading.loadingText = text diff --git a/src/Qt6/imports/FluentUI/Controls/FluWindowDialog.qml b/src/Qt6/imports/FluentUI/Controls/FluWindowDialog.qml index 5f522298..57a27586 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluWindowDialog.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluWindowDialog.qml @@ -9,12 +9,12 @@ FluWindow { property Component contentDelegate autoVisible: false autoCenter: false - autoDestory: true + autoDestroy: true fixSize: true Loader{ anchors.fill: parent sourceComponent: { - if(control.autoDestory){ + if(control.autoDestroy){ return control.visible ? control.contentDelegate : undefined } return control.contentDelegate