fix: create copy of signal data

This commit is contained in:
Richard Ramos 2020-07-24 16:22:27 -04:00
parent 7fd1f9c468
commit b4a70d6aa4
No known key found for this signature in database
GPG Key ID: 80D4B01265FDFE8F
2 changed files with 6 additions and 6 deletions

View File

@ -37,12 +37,12 @@ QtObject:
self.signalSubscribers[signalType].add(subscriber)
proc processSignal(self: SignalsController) =
var jsonSignal:JsonNode
proc processSignal(self: SignalsController, statusSignal: string) =
var jsonSignal: JsonNode
try:
jsonSignal = self.statusSignal.parseJson
jsonSignal = statusSignal.parseJson
except:
error "Invalid signal received", data = self.statusSignal
error "Invalid signal received", data = statusSignal
return
let signalString = jsonSignal["type"].getStr
@ -94,7 +94,7 @@ QtObject:
proc receiveSignal(self: SignalsController, signal: string) {.slot.} =
self.statusSignal = signal
self.processSignal()
self.processSignal(signal)
self.signalReceived(signal)
QtProperty[string] statusSignal:

2
vendor/DOtherSide vendored

@ -1 +1 @@
Subproject commit e3baf29683f713ec418d3bb5c39fa043bd87f92f
Subproject commit b758bf3025f0f3912e5005b232c3b4430848de1a