chore: fix a couple of warnings

This commit is contained in:
Jonathan Rainville 2020-05-22 16:06:57 -04:00 committed by Iuri Matias
parent 10b51956f2
commit e371d2fe4b
8 changed files with 24 additions and 18 deletions

View File

@ -1,5 +1,5 @@
import NimQml
import json, sets, eventemitter
import json, eventemitter
import ../../status/chat as status_chat
import view
import messages
@ -40,7 +40,7 @@ proc load*(self: ChatController, chatId: string) =
discard self.view.joinChat(chatId)
self.view.setActiveChannelByIndex(0)
method onSignal(self: ChatController, data: Signal) =
proc onSignal(self: ChatController, data: Signal) =
var chatSignal = cast[ChatSignal](data)
for message in chatSignal.messages:
let chatMessage = newChatMessage()

View File

@ -2,7 +2,6 @@ import NimQml
import Tables
import messages
import messageList
import ../signals/types
import ../../models/chat
type

View File

@ -46,13 +46,13 @@ QtObject:
proc setDefaultAccount*(self: WalletView, account: string) =
self.defaultAccount = account
method getDefaultAccount*(self: WalletView): string {.slot.} =
proc getDefaultAccount*(self: WalletView): string {.slot.} =
return self.defaultAccount
method rowCount(self: WalletView, index: QModelIndex = nil): int =
proc rowCount(self: WalletView, index: QModelIndex = nil): int =
return self.assets.len
method data(self: WalletView, index: QModelIndex, role: int): QVariant =
proc data(self: WalletView, index: QModelIndex, role: int): QVariant =
if not index.isValid:
return
if index.row < 0 or index.row >= self.assets.len:

View File

@ -1,9 +1,18 @@
import json
import eventemitter
import ../status/libstatus
import ../status/accounts as status_accounts
import ../status/utils
import ../status/types
type
GeneratedAccount* = object
publicKey*: string
address*: string
id*: string
keyUid*: string
mnemonic*: string
derived*: JsonNode
username*: string
key*: string
identicon*: string
type
AccountModel* = ref object

View File

@ -16,7 +16,6 @@ import models/accounts
import state
import status/types
import eventemitter
import os
var signalsQObjPointer: pointer

View File

@ -1,6 +1,3 @@
import status/types
import tables
##########################################################
## warning: this file is still very much in flux
##########################################################

View File

@ -36,9 +36,9 @@ SplitView {
id: testDescription
color: Theme.lightBlueText
text: "latest block (auto updates):"
Layout.rightMargin: Theme.padding
Layout.leftMargin: Theme.padding
Layout.fillWidth: true
anchors.left: walletAmountValue.right
anchors.leftMargin: 5
font.weight: Font.Medium
font.pixelSize: 20
}
@ -46,9 +46,9 @@ SplitView {
id: test
color: Theme.lightBlueText
text: nodeModel.lastMessage
Layout.rightMargin: Theme.padding
Layout.leftMargin: Theme.padding
Layout.fillWidth: true
anchors.left: walletAmountValue.right
anchors.leftMargin: 5
font.weight: Font.Medium
font.pixelSize: 20
}
@ -57,6 +57,8 @@ SplitView {
RowLayout {
id: resultContainer
Layout.fillHeight: true
Layout.rightMargin: Theme.padding
Layout.leftMargin: Theme.padding
TextArea { id: callResult; Layout.fillWidth: true; text: nodeModel.callResult; readOnly: true }
}

View File

@ -32,7 +32,7 @@ SwipeView {
anchors.horizontalCenter: parent.horizontalCenter
}
Row {
RowLayout {
Layout.fillHeight: true
Layout.fillWidth: true
spacing: 10