Manager: Update machine configuration on change

(signaled by the VM or upon closing the standalone settings dialog)
This commit is contained in:
Alexander Babikov
2025-08-02 00:34:53 +05:00
parent a828626177
commit 4827da23f4
18 changed files with 80 additions and 19 deletions

View File

@@ -482,6 +482,8 @@ VMManagerSystem::launchSettings() {
qInfo().nospace().noquote() << "Abnormal program termination while launching settings: exit code " << exitCode << ", exit status " << exitStatus;
return;
}
configurationChangeReceived();
});
}
@@ -818,6 +820,7 @@ VMManagerSystem::startServer() {
connect(socket_server, &VMManagerServerSocket::dataReceived, this, &VMManagerSystem::dataReceived);
connect(socket_server, &VMManagerServerSocket::windowStatusChanged, this, &VMManagerSystem::windowStatusChangeReceived);
connect(socket_server, &VMManagerServerSocket::runningStatusChanged, this, &VMManagerSystem::runningStatusChangeReceived);
connect(socket_server, &VMManagerServerSocket::configurationChanged, this, &VMManagerSystem::configurationChangeReceived);
connect(socket_server, &VMManagerServerSocket::winIdReceived, this, [this] (WId id) { this->id = id; });
return true;
} else {
@@ -956,6 +959,12 @@ VMManagerSystem::runningStatusChangeReceived(VMManagerProtocol::RunningState sta
processStatusChanged();
}
void
VMManagerSystem::configurationChangeReceived()
{
reloadConfig();
emit configurationChanged(this->uuid);
}
void
VMManagerSystem::reloadConfig()
{
loadSettings();