fixed the problem of not clearing the profile
This commit is contained in:
parent
a5705dbd70
commit
bbb5a19700
3 changed files with 20 additions and 3 deletions
|
|
@ -68,6 +68,13 @@ QVariant ProtocolsModel::data(const QModelIndex &index, int role) const
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ProtocolsModel::reload()
|
||||||
|
{
|
||||||
|
beginResetModel();
|
||||||
|
endResetModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ProtocolsModel::updateModel(const QJsonObject &content)
|
void ProtocolsModel::updateModel(const QJsonObject &content)
|
||||||
{
|
{
|
||||||
m_container = ContainerProps::containerFromString(content.value(config_key::container).toString());
|
m_container = ContainerProps::containerFromString(content.value(config_key::container).toString());
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ public:
|
||||||
|
|
||||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||||
|
|
||||||
|
Q_INVOKABLE void reload();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateModel(const QJsonObject &content);
|
void updateModel(const QJsonObject &content);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,19 @@ PageType {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: header
|
id: header
|
||||||
|
|
||||||
Connections {
|
/*Connections {
|
||||||
target: InstallController
|
target: InstallController
|
||||||
function onCachedProfileCleared(message) {
|
function onCachedProfileCleared(message) {
|
||||||
ProtocolsModel.updateModel(ProtocolsModel.getConfig())
|
console.log("СИГНАЛ cachedProfileCleared СРАБОТАЛ:", message)
|
||||||
|
//ProtocolsModel.updateModel(ProtocolsModel.getConfig())
|
||||||
|
ProtocolsModel.clear()
|
||||||
|
console.log("isClientProtocolExists =", ProtocolsModel.get(0).isClientProtocolExists)
|
||||||
|
/*PageController.goToPage(PageEnum.PageMainSettings)
|
||||||
|
Qt.callLater(function() {
|
||||||
|
PageController.goToPage(PageEnum.PageSettingsServerProtocol)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
@ -193,6 +200,7 @@ PageType {
|
||||||
|
|
||||||
PageController.showBusyIndicator(true)
|
PageController.showBusyIndicator(true)
|
||||||
InstallController.clearCachedProfile()
|
InstallController.clearCachedProfile()
|
||||||
|
ProtocolsModel.reload()
|
||||||
PageController.showBusyIndicator(false)
|
PageController.showBusyIndicator(false)
|
||||||
}
|
}
|
||||||
var noButtonFunction = function() {
|
var noButtonFunction = function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue