fix(CommunitiesModule): Qt props fixed to not crash MonitoringTool

Closes: #14493
This commit is contained in:
Michał Cieślak 2024-04-23 09:43:20 +02:00 committed by Michał
parent 2de601c293
commit 26b875ea16
1 changed files with 3 additions and 2 deletions

View File

@ -212,7 +212,7 @@ QtObject:
return self.discordImportedChannelId return self.discordImportedChannelId
QtProperty[int] discordImportedChannelId: QtProperty[int] discordImportedChannelId:
read = getDiscordImportedChannelIdCount read = getDiscordImportedChannelId
notify = discordImportedChannelIdChanged notify = discordImportedChannelIdChanged
proc setDiscordImportErrorsCount*(self: View, count: int) = proc setDiscordImportErrorsCount*(self: View, count: int) =
@ -838,7 +838,8 @@ QtObject:
proc keypairsSigningModelChanged*(self: View) {.signal.} proc keypairsSigningModelChanged*(self: View) {.signal.}
proc getKeypairsSigningModel(self: View): QVariant {.slot.} = proc getKeypairsSigningModel(self: View): QVariant {.slot.} =
return newQVariant(self.keypairsSigningModel) return (if self.keypairsSigningModel.isNil: newQVariant() else: newQVariant(self.keypairsSigningModel))
QtProperty[QVariant] keypairsSigningModel: QtProperty[QVariant] keypairsSigningModel:
read = getKeypairsSigningModel read = getKeypairsSigningModel
notify = keypairsSigningModelChanged notify = keypairsSigningModelChanged