change slot name

This commit is contained in:
Vance 2022-06-10 15:48:18 +08:00 committed by GitHub
parent 4a261cac1a
commit fa5b1d9978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -2102,7 +2102,7 @@ void MainWindow::instanceChanged(const QModelIndex &current, const QModelIndex &
return;
}
if (m_selectedInstance) {
disconnect(m_selectedInstance.get(), &BaseInstance::runningStatusChanged, this, &MainWindow::on_InstanceState_changed);
disconnect(m_selectedInstance.get(), &BaseInstance::runningStatusChanged, this, &MainWindow::refreshCurrentInstance);
}
QString id = current.data(InstanceList::InstanceIDRole).toString();
m_selectedInstance = APPLICATION->instances()->getInstanceById(id);
@ -2131,7 +2131,7 @@ void MainWindow::instanceChanged(const QModelIndex &current, const QModelIndex &
APPLICATION->settings()->set("SelectedInstance", m_selectedInstance->id());
connect(m_selectedInstance.get(), &BaseInstance::runningStatusChanged, this, &MainWindow::on_InstanceState_changed);
connect(m_selectedInstance.get(), &BaseInstance::runningStatusChanged, this, &MainWindow::refreshCurrentInstance);
}
else
{
@ -2222,7 +2222,7 @@ void MainWindow::updateStatusCenter()
}
}
void MainWindow::on_InstanceState_changed(bool running)
void MainWindow::refreshCurrentInstance(bool running)
{
auto current = view->selectionModel()->currentIndex();
instanceChanged(current, current);

View File

@ -192,7 +192,7 @@ private slots:
void keyReleaseEvent(QKeyEvent *event) override;
#endif
void on_InstanceState_changed(bool running);
void refreshCurrentInstance(bool running);
private:
void retranslateUi();