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

View File

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

View File

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

View File

@ -1,9 +1,18 @@
import json import json
import eventemitter import eventemitter
import ../status/libstatus
import ../status/accounts as status_accounts 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 type
AccountModel* = ref object AccountModel* = ref object

View File

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

View File

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

View File

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

View File

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