mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-29 15:25:02 +08:00
Use right enums for single instance
CURA-9183
This commit is contained in:
parent
e1ec9d68f8
commit
c1ed7b97f9
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user