mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Re-implement ConnectionStatus by adding a pyqtSignal to HttpRequestMgr
and using ConnectionStatus as proxy for it. CURA-7492
This commit is contained in:
parent
9bf9bf9a3f
commit
994f9fbde7
2 changed files with 14 additions and 14 deletions
|
@ -106,8 +106,6 @@ class CloudOutputDeviceManager:
|
|||
def _onGetRemoteClustersFinished(self, clusters: List[CloudClusterResponse]) -> None:
|
||||
"""Callback for when the request for getting the clusters is successful and finished."""
|
||||
|
||||
# Remote clusters were successfully retrieved, which means that the computer is online
|
||||
CuraApplication.getInstance().getCuraAPI().connectionStatus.setOnlineStatus(True)
|
||||
self._um_cloud_printers = {m.getMetaDataEntry(self.META_CLUSTER_ID): m for m in
|
||||
CuraApplication.getInstance().getContainerRegistry().findContainerStacks(
|
||||
type = "machine") if m.getMetaDataEntry(self.META_CLUSTER_ID, None)}
|
||||
|
@ -152,9 +150,6 @@ class CloudOutputDeviceManager:
|
|||
def _onGetRemoteClusterFailed(self, reply: QNetworkReply, error: QNetworkReply.NetworkError) -> None:
|
||||
self._syncing = False
|
||||
self._account.setSyncState(self.SYNC_SERVICE_NAME, SyncState.ERROR)
|
||||
# If getting the remote clusters fails, then the cloud printers are unreachable, so we need to inform the
|
||||
# connection status
|
||||
CuraApplication.getInstance().getCuraAPI().connectionStatus.setOnlineStatus(False)
|
||||
|
||||
def _onDevicesDiscovered(self, clusters: List[CloudClusterResponse]) -> None:
|
||||
"""**Synchronously** create machines for discovered devices
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue