Browse Source

Use right enums for single instance

CURA-9183
Jaime van Kessel 2 years ago
parent
commit
c1ed7b97f9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cura/SingleInstance.py

+ 2 - 2
cura/SingleInstance.py

@@ -29,7 +29,7 @@ class SingleInstance:
         single_instance_socket.connectToServer("ultimaker-cura")
         single_instance_socket.waitForConnected(msecs = 3000)  # wait for 3 seconds
 
-        if single_instance_socket.state() != QLocalSocket.ConnectedState:
+        if single_instance_socket.state() != QLocalSocket.LocalSocketState.ConnectedState:
             return False
 
         # We only send the files that need to be opened.
@@ -37,7 +37,7 @@ class SingleInstance:
             Logger.log("i", "No file need to be opened, do nothing.")
             return True
 
-        if single_instance_socket.state() == QLocalSocket.ConnectedState:
+        if single_instance_socket.state() == QLocalSocket.LocalSocketState.ConnectedState:
             Logger.log("i", "Connection has been made to the single-instance Cura socket.")
 
             # Protocol is one line of JSON terminated with a carriage return.